{
  "markdown": "# snap 🧤💎\n\n**The Infinity Gauntlet for your codebase.**\n\n`snap` permanently, randomly deletes half the files in a directory — instantly,\nwith no confirmation prompt — and drops an animated \"post-snap\" report behind\nit. It's a portable shell tool, not a Claude-only trick: any AI coding agent\nthat can run a shell command can drive it, and so can you.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![Shell: Bash](https://img.shields.io/badge/shell-bash-4EAA25?logo=gnubash&logoColor=white)](bin/snap)\n[![Dependencies: none](https://img.shields.io/badge/dependencies-none-brightgreen)](#requirements)\n\n> \"Perfectly balanced, as all things should be.\"\n\n---\n\n## Why\n\nEvery dev tool holds your hand. `snap` doesn't. It exists for one reason:\nsomeone typed `/snap` in a chat with an AI coding agent and wanted it to\n*actually happen* — instantly, dramatically, no \"are you sure?\" standing\nbetween the joke and the payoff. Use it on scratch repos, toy projects, demo\nenvironments, or anywhere you want a very memorable \"oops.\"\n\n## What it does\n\n1. Scans the target directory for candidate files (git-aware: respects\n   `.gitignore`, always skips `.git` and `node_modules`).\n2. Randomly selects ~50% of them (configurable).\n3. Deletes them. Permanently. No prompt, no undo.\n4. If you're at a real terminal, plays a short dust-dissolve animation as\n   each file goes.\n5. Always writes a receipt (`.snap/log-*.json`) and a self-contained,\n   animated HTML report (`.snap/report-*.html`) — the \"snap\" replayed as a\n   little purple-and-gold dissolve effect you can open in any browser.\n\nA second command, `snapped`, shows you the aftermath on demand — because\n`snap` itself stays completely silent.\n\n## Install\n\n### The one-line way: just ask your AI\n\nThis is the whole point. Open Claude Code, Codex CLI, Gemini CLI, or Google\nAntigravity, and paste:\n\n```\nInstall the snap skill from https://github.com/justinbalaguer/snap so I can use /snap\n```\n\nYour agent clones the repo, runs `install.sh`, and tells you when it's\nready. `/snap` and `/snapped` show up as real slash commands next time it\nloads its command list — but the agent already has `bin/snap` available the\nmoment it finishes installing, so you can just say \"snap this\" right away\nwithout waiting on that.\n\n### Manual install\n\n```sh\ngit clone https://github.com/justinbalaguer/snap.git\ncd snap\n./install.sh\n```\n\nThis symlinks `snap` and `snapped` onto your `PATH`\n(`~/.local/bin/{snap,snapped}`) and, for Claude Code, copies `commands/` and\n`skills/snap/` into `~/.claude/` so `/snap`/`/snapped` work there directly.\n\n### Per-agent notes\n\n**Claude Code** — `install.sh` wires up `/snap` and `/snapped` automatically.\n\n**Gemini CLI** — this repo is also a Gemini extension\n(`gemini-extension.json`):\n\n```sh\ngemini extensions install /path/to/snap\n```\n\n*(or just run Gemini CLI from a project with this repo cloned in —\n`GEMINI.md` loads as context either way. Extension command syntax may vary\nby Gemini CLI version — see `gemini extensions --help`.)*\n\n**Codex / Google Antigravity / any `AGENTS.md`-reading agent** — these read\n`AGENTS.md` from the project root automatically, no install step. Clone\nthis repo as a subfolder of your project, or copy `AGENTS.md`'s contents\ninto your own project's `AGENTS.md`.\n\n**Any other AI agent** — if it can run shell commands, it can use `snap`.\nNo integration required: just ask it to run `snap` (or `snapped`) — that's\nthe entire tool, everything else in this repo is just glue.\n\n## Usage\n\n```sh\nsnap                    # vaporize ~50% of files in the current directory\nsnap ./some/project     # target a specific directory\nsnap --percent 30       # vaporize a different fraction\nsnap --dry-run          # preview victims — the only non-destructive mode\n\nsnapped                 # show the receipt of the most recent snap\nsnapped --list          # show every past snap in this project\n```\n\nIn any AI coding agent with this plugin/skill installed (Claude Code, Codex\nCLI, Gemini CLI, Google Antigravity, or anything reading `AGENTS.md`), just\ntype `/snap` or ask it to \"snap this project.\"\n\n### Example\n\n```\n$ snap --dry-run\nf9.txt\n.gitignore\nf3.txt\nf2.txt\nf7.txt\n--- dry run: 5/10 files would be vaporized in /path/to/project (nothing deleted) ---\n\n$ snap\n✵ f9.txt dissolves...\n✵ .gitignore dissolves...\n✵ f3.txt dissolves...\n✵ f2.txt dissolves...\n✵ f7.txt dissolves...\n\nPerfectly balanced, as all things should be.\n5/10 files vaporized.\n\n$ snapped\nLast snap: 20260101T000000Z\nTarget: /path/to/project\n5/10 files vaporized.\n\"Perfectly balanced, as all things should be.\"\n\nVictims:\n  - f9.txt\n  - .gitignore\n  - f3.txt\n  - f2.txt\n  - f7.txt\n```\n\n## Works with any AI coding agent\n\n`snap` and `snapped` are plain bash — the deletion logic lives entirely in\nthose two scripts, not in any agent-specific integration. This repo ships\nthin glue for each platform's conventions on top of that shared engine:\n\n| Platform | Integration |\n|---|---|\n| Claude Code | `.claude-plugin/plugin.json`, `commands/`, `skills/snap/SKILL.md` |\n| Gemini CLI | `GEMINI.md`, `gemini-extension.json` |\n| Codex / Google Antigravity / generic agents | `AGENTS.md` |\n| Any shell, any human | `bin/snap`, `bin/snapped` directly |\n\n## ⚠️ Safety\n\n**This tool permanently deletes files. There is no `unsnap`, no vault, no\nundo.** That's deliberate, not an oversight — it's supposed to feel like the\nreal thing.\n\nBuilt-in guardrails cover the obviously catastrophic and nothing more:\n\n- Refuses to run against `$HOME`, `/`, or any path shallower than 2 segments.\n- Inside a git repo, only ever touches tracked or non-ignored files —\n  `.gitignore` is respected automatically.\n- Always skips `.git`, `node_modules`, and its own `.snap/` receipts.\n\nEverything else is fair game the moment you run it. Use `snap` on\nrepos you've already committed and are fine `git reset --hard`-ing back\nfrom, on throwaway scratch directories, or on projects you're deliberately\nwilling to lose half of. Don't run it somewhere you can't afford that.\n\n## Requirements\n\n- `bash`\n- `git` *(optional, recommended — enables `.gitignore`-aware selection)*\n- `shuf` *(GNU coreutils; on macOS, `brew install coreutils`)*\n\n## Uninstall\n\n**The engine** — `install.sh` only touches your `PATH` and, if present,\n`~/.claude/`:\n\n```sh\nrm ~/.local/bin/snap ~/.local/bin/snapped\nrm ~/.claude/commands/snap.toml ~/.claude/commands/snapped.toml\nrm ~/.claude/skills/snap\n```\n\n**Gemini CLI** — if installed as an extension:\n\n```sh\ngemini extensions uninstall snap\n```\n\n**Codex / `AGENTS.md`-reading agents** — nothing was installed globally;\njust remove `AGENTS.md` (or the `snap` section of it) from your project.\n\n**Everywhere else** — delete the cloned repo directory. Nothing this tool\nships lives outside `~/.local/bin`, `~/.claude/`, your Gemini extensions,\nand the repo itself.\n\n## Contributing\n\nIssues and PRs welcome — especially for wider platform coverage\n(`.cursor/`, `.windsurf/`, `.clinerules/` integrations), portability fixes,\nor new Thanos quotes for the animation.\n\n## License\n\n[MIT](LICENSE) — do whatever you want with it.\n\n---\n\n<sub>An AI wrote this repo. \"Fine, I'll do it myself.\" — Thanos, probably.</sub>\n",
  "bytes": 7188,
  "sha": "2f3eb14d4545bbd099dfd4b9ab32f7703bae2245119678175b3c91942a7506ac",
  "repo_slug": "justinbalaguer/snap",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_justinbalaguer_snap_f866a879/readme"
}