/paperthin:deidfrom paperthin
Finds and replaces one person's or organization's leaked data in shared repositories, folders, or artifacts using owner-specific needles, reports historical commits, and rewrites them on approval.
Ships in paperthin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Find one owner's data in a shared artifact with needles built from that owner's records, replace each hit with the role it plays, report which commits still carry it, and rewrite those commits once the repository's owner approves.
A shared artifact (a public repository, a template, a fixture set, a deliverable) holds nothing that belongs to one person or one organization, and still works: each leaked value is replaced by the role it plays or a placeholder that exercises the same code, or kept with a stated reason when it is already public. The working tree is changed only through a recorded decision file, so a rerun replays the same decisions. History is read first: the run lists where the repository's history carries a needle. Rewriting it is the repository owner's decision, and on their approval the same decision file rewrites the past commits into new ones. The run moves no ref: it hands over a map file of old and new ids, and whoever moves the refs works from it.
The scope is what the human named: one artifact and one owner. The run never picks its own target or widens either.
{ "label": "...", "value": "...", "ci": true, "regex": true } rows, ci and regex optional, every label unique and naming the kind of value (client-phone, owner-name-ko), never the value itself, since labels are printed. Spell each value every way it is written (a name in each script and order, a phone with and without separators and with the country code, an email in any case, an id with and without its prefix). A short or common word becomes a regex with boundaries, since the script refuses a plain needle under three characters. \b knows only ASCII letters, digits and the underscore, so a word in any other script (Hangul, kana, Cyrillic, a Latin word that starts or ends with an accented letter) is bounded by lookarounds on that script's letters, as (?<![가-힣])길동(?![가-힣]) for a Korean given name; the script compiles no Unicode property escape such as \p{L} and refuses a needle that uses one. Keep the file outside the artifact or under a gitignored local name, and never print a value: every later step names a needle by its label.node scripts/deid.mjs scan <root> --needles <file> [--decisions <file>] [--no-git] [--json]. Inside a git work tree it reads every file git does not ignore; --no-git reads every file under the root. It prints each hit as file, line, column and label, never the value; a needle in the file's name or a folder above it is a hit marked (path), and every printed path shows a needle in it as <label>. Exit 0 means no hit, 3 hits, 2 a usage error or a broken needle file. Every file that is not UTF-8 text is listed whether or not it hits, its hits carry no line, and it is never rewritten: one that opens with a UTF-16 byte-order mark is read as UTF-16, and any other is searched byte for byte, so a needle written in another encoding (Hangul in a legacy Korean code page, UTF-16 with no mark) stays unseen in it. A listed file that could hold the owner's data is named in the report for a person to check.{ "needle": "<label>", "replace": "..." } or { "needle": "<label>", "keep": "<reason>" } rows with optional "paths": [globs] matched against the path relative to the root the script was given (in history and rewrite, the repository's top folder), where ** crosses folders, * and ? stay inside one, and a glob with no wildcard also names a folder and everything under it. A row with paths decides only files under them; a row without decides every hit, history's messages, identities and refs included. The first row whose needle and paths fit a hit decides it, so put scoped rows before general ones. A needle in a path is decided like one in text: a replace moves the file to the path it gives, and since a link or import naming that path carries the same needle, a row without paths rewrites both alike. The script refuses a replacement that itself carries a needle. Keep this file beside the needle file.node scripts/deid.mjs apply <root> --needles <file> --decisions <file> [--no-git] [--json], passing --no-git exactly when the scan did, since it decides which files are read. It rewrites only files whose text changes, moves a file whose path a decision changes (removing a folder the move empties, and refusing a move onto a path another file holds or one that empties a name), resolves overlapping needles to the earliest, then the longest, and leaves a hit no decision fits in place; exit 3 means hits are still open. Repeat steps 4 and 5 until scan with --decisions exits 0, or until every hit it still lists sits in a file that is not UTF-8 text, which no decision rewrites: the report names each such file for the person to re-export, edit or remove, and a scan after their change closes it. Then run the artifact's own tests and checks; a failure goes back into the decision file as a better placeholder, never into a hand edit.node scripts/deid.mjs history <root> --needles <file> [--decisions <file>] [--rev <rev>]... [--json]. It reads every ref in this clone, remote-tracking ones included, unless --rev names some, and changes nothing. In those refs it reads every past file (decoded as scan decodes it), every file path, every commit's message, author and committer, and every ref's name with an annotated tag's tagger and message. Per needle label it lists the commits that entered the needle into a file or a path, the commits whose message or identity carries it, the refs whose name or tag message carries it, and the annotated tags whose tagger does. A commit enters a needle into a file when that file holds more occurrences than the same path in every parent, and into a path when it adds a path that carries it; so a rename is listed under its new path, and an edit or merge that only carries the needle is not. Message and identity hits print the commit id only, and a needle inside a printed path or ref name prints as <label>. A keep decision hides the hits it fits; a replace decision hides none, since the past still holds the value. Exit 0 means history is clean, 3 that a past file, path, message or ref still carries a needle, 4 that only identities do (an author, a committer or a tagger), which no rewrite changes (step 8), and 2 a usage error or a folder outside git.node scripts/deid.mjs rewrite <root> --needles <file> --decisions <file> [--rev <rev>]... --json and save its whole output as UTF-8 to a new file beside the decision file, never over the earlier map file. Exits 0, 3 and 4 print a map, which then replaces the earlier one; exit 2 prints none, and the earlier one stays. It reads the refs history reads and applies the decision file to every past file, path and commit message in them as apply does to the working tree, leaving a file that is not UTF-8 text, and a path under a name that is not UTF-8, as they were. Each commit keeps its author, its committer, both dates and its other headers byte for byte, and one no needle reaches, directly or through a parent, keeps its id. A rewritten commit that carried a signature is signed again with user.signingkey when the repository's user (user.email) committed it, one git commit-tree -S call each, and otherwise comes back unsigned, since a signature would claim someone else's commit; the JSON counts those under unsigned. A commit that carried no signature stays unsigned, so a user who never signs needs no key, and with user.email unset every signed commit comes back unsigned. It writes new objects and moves no ref. Its JSON holds map, each old commit id to its new one in the shape re0-git's rebuild.mjs prints; refs, each ref on a rewritten commit (a ref on any other commit is not listed, though step 6 lists its name if it spells a needle) with its masked name (ref), its kind (ref, annotated tag or remote-tracking), the commit it reaches (old) and its new one (new), the id it holds now (lease, which for an annotated tag is the tag object), the needles its name or tag message still spells (carries) and those its tagger spells (tagger); and check, a history run over the rewritten commits and their ancestors. The rewrite never changes a file or name that is not UTF-8, a ref's name or tag message, a commit older than a --rev range, or an identity: it keeps every author, committer and tagger, so a needle in one is the expected residue, which check and tagger list apart from open hits and the report names per commit and tag for the repository's owner. Exit 0 means nothing is left in the rewritten commits and the refs on them, 4 that only that identity residue is, and 3 that something open is: a hit no decision fits goes back to step 4, where a rerun starts again from the unmoved refs and replaces the map file, and a ref name or tag message in carries goes to the repository's owner at step 10. Exit 2 is a usage error or a refusal made before anything is written: a shallow clone, a move onto a path a past tree already holds, or a signed commit of the user's to sign again with user.signingkey unset or with a header signing would drop.refs entry takes the id it holds now (a branch, its remote-tracking ref's; a tag, its own). They also give a local branch to each remote branch that has none and either has a remote-tracking entry or reaches a commit the tool must change, at the new of its entry or, with no entry, at its remote-tracking ref, so the tool and the check below reach every commit a push sends. The repository's owner, or the human on their word, then runs a tool of their choice that rewrites authorship over the local branches and tags only, and any backup ref it leaves is deleted, since step 11 reads every ref. Before anything is pushed, history with the decision file and a --rev for each local branch and tag must list no identity the repository's owner chose to replace; one it still lists goes back to the tool. The tool records its old-to-new ids in its own form; converted to a JSON object of full ids, they are a second map.map for every commit and its refs for each ref to move. refs masks every needle a name spells as <label>, kept or open, so the real name of each entry whose ref shows one is read before the ref moves, from git for-each-ref --points-at <lease> among the refs of the entry's kind. When the repository's owner wants an identity replaced (step 9), whichever route moves the refs stops after the local moves and pushes only once that rewrite has run. /re0-git takes the whole file in its ref steps, which the human runs: they plan the moves with rebuild.mjs refs --map <map file>, re-create each annotated tag, carry over commits pushed to the remote after the rewrite read the refs, and push each ref with a lease. Where it is not installed, the human moves each ref entry with git update-ref <ref> <new> <lease>, then runs a mixed git reset -q in each worktree that has that branch checked out, since update-ref leaves the old tree in its index, where the next commit would bring the needle back; the reset keeps the files. Each annotated tag entry is made again by piping git cat-file tag <lease>, its object line set to <new>, its type line to commit and any signature block after the message removed, to git mktag, which keeps the tagger, its date and the message, then moved with git update-ref <ref> <tag id> <lease>. A tag of a tag, whose lease is the outer tag, comes back pointing straight at <new>, without the inner one. Each branch is pushed with git push --force-with-lease=<ref>:<old> <remote> <branch>. <old> is the old of the branch's remote-tracking entry. A branch whose remote commit kept its id has no such entry, and takes <old> from git rev-parse refs/remotes/<remote>/<branch>. After the local moves and before any step 9 tool runs, every branch to be pushed, moved or not, is checked to contain what its remote holds, the new of its remote-tracking entry or else that remote-tracking ref (git merge-base --is-ancestor <that id> <branch>): a branch behind or apart from its remote would drop the remote's commits under the force push, so the human first carries them over: git merge --ff-only <that id> for one only behind, /re0-git for one apart. Each tag, lightweight or annotated, is pushed with --force-with-lease=<ref>:<lease>. A ref the remote does not hold is pushed without a lease, and a refused lease means someone pushed after the rewrite read the refs, so the human stops and carries their commits over with /re0-git. A remote-tracking entry is never moved by hand: it holds what the remote had, and the push moves it; one with no local branch is pushed as git push --force-with-lease=refs/heads/<name>:<old> <remote> <new>:refs/heads/<name>. A ref whose name or tag message still spells a needle is named for the repository's owner to rename or reword as it moves. The run waits here until the human says the refs have moved, and otherwise ends with the report and the map file.history again without --rev and with the decision file. It must exit 0 over every ref, or 4 when what it still lists is identity residue step 8 named and the repository's owner kept (step 9), and the report names anything it still lists. Under 3, a ref name or tag message goes to the repository's owner to rename or reword, and any other hit goes back to step 4. Then run node scripts/deid.mjs stale <root> --needles <file> --map <map file> [--write] [--json] with the rewrite's map, and again with step 9's second map if there is one. It lists every ref, worktree and reflog that still names a rewritten commit's old id, and every citation of one in the working tree, a full id or a prefix of seven or more hex digits. --write replaces each citation that names one commit with its new id at the same length, for the human to commit; an ambiguous one is listed for a hand fix. Exit 0 means nothing here holds an old id, 3 that something does. A moved ref's reflog still names its old id, so stale stays at 3 until the human expires the reflogs, which this run never does: that is the expected end. Report each holder, and that the old objects stay in this clone until its reflogs expire and git gc prunes them.apply and past commits only through rewrite, both from the decision file; a hand edit goes back into that file so the next run replays it. stale --write changes nothing but old commit ids.Before finishing, confirm:
scan with the decision file exits 0 on the working tree, or every hit it still lists sits in a file that is not UTF-8 text and the report names that file for the person; and the artifact's own tests and checks pass after apply.scan <that folder> --needles <file> --no-git with exit 0 before it is sent.rewrite left open went back to step 4 or is named for the repository's owner, the map went to the ref move, and once the refs have moved, history over every ref with the decision file exits 0, or 4 with each identity it lists named in the report per commit or tag as the residue of keeping authorship, and stale exits 0 or the report names each holder (the moved refs' reflogs at least, until the human expires them), with the clones, forks and host that keep the old commits.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub lilmgenius/paperthin --plugin paperthin45 skills in this plugin
/aimWhen data lands with a thin ask (files, a repo, a paste, a chat scrollback), read it and propose what the user is trying to do with it for them to confirm. Use the moment material arrives without a fully-formed ask, or when the ask reads thinner than the data suggests./autobahnCarve guardrail-adjacent items out of scope with safe alternatives before risk-adjacent work starts, then run the safe remainder at full strength in a fresh subagent that only ever sees the carved prompt, never the risky input. Use when a task includes stealth, scraping, privacy, IP, policy, licensing, security, or other safety-adjacent material that could be silently dropped, over-elaborated, or needlessly diluted. Fires on the impulse, not only the topic: the moment you notice yourself about to hedge, soften, silently skip, or brace for a refusal, carve before you execute./Other plugins' skills for the same job