Skip to content

About

Complete Claude Code environment: global guidelines, skills, hooks, settings, version-controlled memory and learnings, and shared git config

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1,443 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Code Environment

A complete Claude Code environment: global guidelines, reusable skills, hooks, settings, version-controlled memory and learnings, and shared git configuration — everything symlinked into place from one repo.

Skills


Create / Update PR

Prepares commits on a feature branch, pushes, and opens or updates a PR to main.

Command: /pr-create

Features:

  • Reads the associated plan document for context
  • Uses /reset to unwind the branch's commits, then regroups them as claude/skills/shared/commit-grouping.md describes and commits each group through claude/skills/shared/commit.py, so clean, atomic commits get the same message check, privacy scan and signature as any other
  • Rebases onto main before pushing so pr-merge can fast-forward
  • Creates a new PR or updates the existing one (title, description, force-push)
  • Drafts a detailed PR description with overview, changes, design decisions, and scope reconciliation

Merge PR

Merges a PR locally via fast-forward to preserve your GPG-signed commits.

Command: /pr-merge

Features:

  • Avoids GitHub's merge UI, which re-signs commits with GitHub's own key
  • Fast-forwards main to the PR branch (rebases as fallback if needed)
  • Stashes uncommitted changes and restores them after merge
  • Cleans up remote and local branches, prunes stale remote-tracking refs
  • After pushing main, asks the session working on the same repo on the other machine to run /pull (see Peer)

Prepare PR

Summarizes what was done, how it matches the plan, and which commits fixed review findings — all in one report before creating a PR.

Command: /pr-prepare

Features:

  • Reads the plan doc, commits and diff to build a complete picture
  • Reports plan alignment: implemented items, unplanned additions, missing items
  • Lists the review fixes the commit messages record; dismissed findings and open concerns are kept in none of those, so it does not report them
  • Read-only analysis — does not modify files or create commits

Clean Code

Audits modified files for dead code, duplication, needless complexity, and import hygiene.

Command: /clean-code

Features:

  • Removes debug prints left from development
  • Dead code audit: runs the project's own configured dead-code tooling first (an unused-symbol lint rule, knip, vulture), then traces callers to find unreachable methods, fields, imports, type members
  • Duplication audit: flags repeated logic and proposes consolidation
  • Complexity audit: flags nesting, nested ternaries, single-caller abstractions and unrequested generality, and proposes the simpler form
  • Optimizes imports in modified files
  • Iterates until clean — each removal pass may reveal new dead code

Review Manual

Runs a read-only review of the current change and lets the user choose what gets fixed, then fixes exactly that.

Command: /review-manual

Features:

  • Calls the saved review-auto workflow with fix: false, building its scope, lenses and gate from the conversation, and passing the user's settled decisions and earlier dropped findings as context so they are not reported again
  • Shows the findings as a table over the session, through claude/scripts/review_picker.py and a blocking agterm overlay, which first closes any page the session's overlay already holds, hidden or shown, each row a pair of fix / leave pills preset to the session's recommendation and drawn in lighter grey where the fix changes only wording or documentation; a row's ✎ button takes a note on how to fix it, and writing one sets the row to fix
  • Outside agterm, publishes the same page on the tailnet and hands over its link; there Apply becomes Copy answer, and the user pastes the copied answer into the chat
  • Falls back to the same table in chat when the page is closed without Apply, or when it is outside agterm and the page cannot be published
  • Fixes only the rows set to fix, following their notes, adds tests where behaviour changed, and runs the project's gate
  • After fixes, says the tree changed: the next /wrap-up or /yolo then commits the reviewed tree first and the fixes as follow-up commits, which the next review covers, unless HEAD has moved since the review (see Review Scope)
  • With nothing set to fix, shows the commit plan and on your yes commits exactly the reviewed tree through claude/skills/shared/commit.py --reviewed, which stages it from the recorded review tree, then moves the bookmark. It never pushes: the next /wrap-up or /yolo pushes those commits

Tests: python claude/tests/review-picker.py — exit 0 when every case behaves, 1 otherwise. It stubs agtermctl on PATH and pins the picker's exit statuses and printed answer, including that a closed page is never read as taking the recommendations, and that a malformed spec is refused with a reason rather than a traceback. The publish outside agterm prints NOT COVERED, since a test must not publish on the tailnet, and so does the page's own script — the detail button, the single choice and the clock — which was run by hand in a browser. On Windows the cases inside agterm print NOT COVERED, since an extensionless stub is invisible to a Windows PATH lookup and agterm does not run there. The stub, and the replies it gives, live in claude/tests/agterm_stub.py, which the memo suite drives the same way.


Yolo

Commits everything pending and pushes it, so the work can be tested now and reviewed later. The quick counterpart to /wrap-up: no review, no reflection and no questions in the normal case, while every check that keeps something from being published still runs.

Command: /yolo

Features:

  • Skips review-auto, /reflect, /docs-relevance and /screenshot-relevance, and keeps only one step of /clean-code: removing debug prints added during the work. A print the session still needs to read the result of the test it is pushing for stays, and the report names it so the session takes it out by hand once the test is read, since what /yolo pushed falls outside the scope of /wrap-up's clean-up passes (the change_scope.py bullet under Shared Commit and Push Steps)
  • Never skips the privacy scan, the project gate (.claude/commit-checks.sh), the commit-message check or the signature, all run through the same shared commit and push steps /wrap-up uses
  • Stops and asks only on a blocking privacy finding, a failing gate, a branch that has diverged from its upstream, or a path another live session may still be writing, and after the push it asks before starting a session for another repo it wrote files in; anything else a step reports, such as a review-class scan finding or junk left in place, goes in the final report
  • Brings a branch that is only behind up to date first, following the /pull procedure, which moves aside only the local edits the incoming files collide with
  • Groups the change set as claude/skills/shared/commit-grouping.md describes, honouring the reviewed/follow-up split where a review was recorded, and shows the commits after the push rather than a plan before it
  • Leaves the review to the next /wrap-up: the review bookmark covers every commit pushed since the last recorded review, so what /yolo sent is reviewed there
  • Watches CI in the background after the push when the repo has workflows, reporting each run as it exits, and hands files this session wrote in other repos to the live session that owns each, asking first to start one where none is running
  • After a push, asks the session working on the same repo on the other machine to run /pull (see Peer)

Shared Commit and Push Steps

The steps every committing and pushing skill is built from, under claude/skills/shared/. No skill invokes another top-level skill to commit or push: each calls these steps directly, so none has to guess what a nested skill already did, and a check added to a step reaches every way work enters history.

Files: commit.py, push.py, commit-grouping.md, sync-and-push.md, project_memory.sh, change_scope.py and peer_repo_changes.py, all in claude/skills/shared/

Features:

  • commit.py is the only place a commit is made. Each call clears the index, so work staged before the run cannot ride along; stages exactly the paths given, a directory standing for every file under it, or with --reviewed stages them from the tree a completed review recorded, so the commit holds what the review read whatever happened to the disk copy since, and with --from-file PATH=FILE commits a path with another file's content while leaving the disk copy alone; gives a new script its execute bit in the index (on Windows, where the disk carries no bit, only a git/hooks/ file; any other new script there takes it from git add --chmod=+x); refuses unless the index holds exactly those paths; checks the message with claude/scripts/check-commit-message.py; runs the privacy scan over the lines the index adds and refuses on a blocking finding, printing the review findings for the caller to read; then commits, GPG-signed unless commit.gpgsign is explicitly false, and confirms the commit holds those paths. It never pushes, so a skill can commit without publishing. Exit 0 committed, 1 refused by a check with the index cleared again (a +x staged before the call goes with it, and the refusal names the paths to stage it on again, along with any new git/hooks/ file or script the run marked itself, which a retry marks again), 2 could not run
  • push.py is the push every skill pushing the default branch makes; /pr-create, which force-pushes a feature branch with --force-with-lease, runs its own gate and push, so a step added to push.py does not reach it. It gates the state the push would publish through gate_pushed_tree.py and refuses on a failure, pushes (setting an upstream on a first push), reading from git's own report where the pushed branch stood, publishes the review bookmark with review_scope.py push, asks the other machine's session to pull with notify_peer_pull.py unless the push moved nothing, lists the CI runs the push started only when the repo has .github/workflows/, and ends on review_scope.py status, so whether the bookmark moved is read last
  • commit-grouping.md is the judgement half: what belongs in the change set, holding back a path another live session may still be writing, an inbound file duplicating one already in the tree, junk and orphaned data, plan files committed with their implementation, finished plans, closing the memos a change set delivers, the reviewed/follow-up split read from review_scope.py layout, and the messages
  • sync-and-push.md holds the steps either side of committing that /yolo and /wrap-up share: the sync with the upstream before grouping, and after the push, watching CI and handing files written in other repos to the sessions that own them, starting one after asking where none is running
  • project_memory.sh is the project-memory step /yolo and /wrap-up run from their Context before grouping: it wires the machine-local memory cache into the repo through claude/scripts/link-project-memory.sh when it is not linked yet, asking that script for the cache path rather than deriving it, then strips the per-session telemetry the harness can write into committed memory files with claude/scripts/sanitize-project-memory.sh
  • change_scope.py decides which of /clean-code, /docs-relevance and /screenshot-relevance /wrap-up runs. It classifies the working tree and the unpushed range and prints RUN or SKIP per sub-skill with the paths behind the verdict, since those passes review unpushed commits on the same terms as uncommitted ones. A SKIP is reported in one line rather than passed over silently, and a scope git cannot be read from prints RUN for all three. /clean-code and /docs-relevance are skipped over a tree the review-auto workflow already polished, /clean-code unless code changed after it and /docs-relevance unless code or documentation did. /screenshot-relevance follows the repo's SCREENSHOTS flag: no skips it, yes runs it whenever code or documentation changed, and an unset flag prints ASK with a recommendation, which /wrap-up turns into a summary line and records as the answer
  • repo_flags.py reads and writes a repo's committed .claude/repo-flags: one KEY=yes|no line per thing the repo has said it does or does not do, so a skill stops making an offer the repo has turned down. RELEASES=no stops /wrap-up's release offer, which a fork whose v* tags are upstream's releases needs, and RELEASES=yes keeps the offer and stops the question a declined offer asks; SCREENSHOTS alone decides whether a repo's docs carry screenshots: no turns off /screenshot-relevance and stops /docs-screenshot taking a picture on its own initiative, yes runs every screenshot pass, private repo or not. An unset RELEASES keeps the offer and, after a decline, asks once which value to record, and an unset SCREENSHOTS is asked, and every read refuses the whole file on an unknown key, a value other than yes or no, or a repeated key, since a misspelt opt-out read as unset would switch nothing off. set also refuses to write a file git ignores, as a .gitignore allowlisting .claude/ does unless it names !.claude/repo-flags, since the flag would then exist on one machine only. A key is added beside the skill that first reads it. Convention version 019 moves a CLAUDE.md screenshot ban into SCREENSHOTS=no, and a CLAUDE.md request for the missing-shot pass in a private repo into SCREENSHOTS=yes; every other value is written when a skill asks and the user answers
  • peer_repo_changes.py lists the repos outside this one the session wrote to, each with the live session that owns it, so the files can be handed over rather than committed here
  • The privacy scan is one script, claude/scripts/scan-commit-confidentiality.py. For --staged and --range it reads only the lines a change adds, which is what a commit or a push publishes; paths given on the command line are read whole. Its findings come in two kinds. A blocking finding — a private key, this machine's home path, a machine name from the private coordinates file, a tailnet host that is not a placeholder, a public IPv4 address or one in Tailscale's 100.64.0.0/10 range (a CIDR prefix, a version string of four single digits and private, link-local, loopback and documentation addresses name no reachable machine), an email address outside the reserved example domains other than git@github.com and an @2x-style asset name — stops commit.py and the pre-push hook. A review finding — a credential word, a public domain, an ssh host shape, a .local name, any other absolute path — is printed for the session to triage. A blocking false positive is cleared through a committed per-repo .claude/confidentiality-allow, one fingerprint per line, which the scanner prints beside each blocking finding as a hash of its path and line text, so the entry never contains the value. It reports each occurrence with its file and line rather than the matched value, so a scan for the user's own hostnames does not republish them into the transcript it protects, and exits 2 when a positive control could not run, a third answer distinct from both a clean scan and findings. Its self-test runs in this repo's own commit gate, asserting each control still fails loudly

Tests: python claude/tests/commit.py — exit 0 when every case behaves, 1 otherwise. It runs commit.py for real against a scratch repo sealed from this machine's git config, and asserts that each refusal fires — a bad message, a blocking scan finding, a stray staged path — that --reviewed stages the reviewed content while the disk copy differs, and that a clean call leaves a commit holding exactly its paths.

python claude/tests/push.py covers push.py. It checks that the pushed-to URL reaches gh in a form it parses by calling the parser directly on a sample of git's porcelain output; every other case runs against a real clone of a bare origin, with a stub gate and the dashboard pointed at a port nothing listens on, so no peer is messaged: a failing gate refuses the push with nothing reaching origin, a passing gate pushes, a first push sets up tracking, the peer notice is reported, the bookmark's status line comes last, a CI line appears only in a repo with workflows, a push that moved nothing sends no peer notice, and in a fork with an upstream remote the CI lookup and the re-query it prints both name the remote the push went to. On Windows the fork case prints NOT COVERED, since its PATH stub for gh cannot run there. Exit 0 when every case behaves, 1 otherwise.

python claude/tests/no-raw-commits.py holds commit.py to being the only place a commit is made: it fails when a skill's allowed-tools grants git commit, or a script under a skill other than shared/commit.py runs it, since either commits past every check above. Exit 0 when nothing commits on its own, 1 otherwise.

python claude/tests/change-scope.py runs change_scope.py against a scratch repo and its bare origin, and presses on the skips: a polish record covering the tree, a file written after the polish, a record that cannot be read, and the SCREENSHOTS flag: unset prints ASK, recommending yes only when the docs hold an image outside raw/, yes runs the pass and no skips it whatever the docs hold, and a refused flags file prints RUN. Exit 0 when every case behaves, 1 otherwise.

python claude/tests/repo-flags.py covers repo_flags.py and the one reader that is a script, release_candidates.sh. It checks that a missing file and an unnamed key read as unset, that set replaces a key in place and keeps comments and other keys, that an unknown key, a value other than yes or no, a repeated key and a line that is not KEY=value each exit 2 naming the line on get and before set writes anything, that set refuses a flags file a .gitignore hides, naming the rule and writing nothing, and writes once the allowlist names it, and, against a scratch repo, that RELEASES=no turns the release check off and a refused file stops it with exit 1. Exit 0 when every case behaves, 1 otherwise.


Reset

Unwinds selected unpushed commits back into the working tree so they can be re-committed. The counterpart to claude/skills/shared/commit.py, which never amends: an unpushed commit is corrected by putting it back and committing again.

Command: /reset

Features:

  • Lists every unpushed commit with hash, timestamp and subject, newest first, offering each as "this commit only" or "this plus everything above it"
  • Always offers "don't reset" as option 0, so the list can be inspected without committing to an action
  • Defaults to the most recent commit alone — except where the newest commits form a contiguous run of fix: address code review findings, where the default unwinds the whole run
  • Resets to the parent of the chosen commit, so nothing is discarded; the changes land back in the working tree for the next /wrap-up or /yolo to regroup
  • Will not commit, push, or switch branches — unwinding is the whole job

Pull

Brings the branch up to date with its upstream when the working tree is dirty — the normal case in repos worked from two machines and several concurrent sessions. /yolo follows its procedure when the branch is only behind, and stops at a branch that has diverged.

Command: /pull

Features:

  • Fetches and classifies the divergence first, stopping on an untracked branch, a failed fetch, or a branch already current
  • Intersects the locally-changed files with the incoming ones, and stashes nothing at all when they are disjoint — git's refusal to fast-forward is per-path
  • Scopes the stash to exactly the overlapping paths when they do intersect, so files another session is mid-edit in never leave the disk
  • Restores with git stash pop --index, preserving the staged/unstaged split that a plain pop silently flattens
  • Verifies against the stash commit as a baseline, then checks the two failure modes that produce no conflict at all: one document asserting the same thing twice, and an incoming file duplicating one already in the tree
  • Reads its procedure from @{upstream} when the repo being pulled is this one, since a behind checkout's documentation is behind by the same commits
  • Proposes a rebase on a diverged branch rather than running one, and will not commit or push
  • Runs when a session on the other machine asks for it: every skill that pushes there sends that request afterwards, /yolo, /wrap-up, /release and /pr-merge among them
  • Tells the local dashboard when a run left nothing to come back to, so a session asked to pull by a peer stops reading as though it holds work — not sent after a conflict, a question put to the user, or a failed fetch, each of which is something to return to

Upstream Sync

Catches a fork up with the third-party project it tracks, works out what each of the fork's own commits should become, and triages upstream's new features against how the user actually uses the product.

Command: /upstream-sync

Features:

  • Reads the fork's topology from project memory and git: which remote is upstream, which branch carries the patches, rebase or merge
  • Classifies every fork commit against the incoming range: independent, duplicated by upstream, made obsolete, renumbered, or interacting semantically with new upstream code and tests
  • Predicts conflicts with git merge-tree and apply-checks vendored-dependency patches in a scratch checkout before touching the tree
  • Inventories the user's real usage from transcripts and integrating repos, so each feature is rated against it
  • Integrates only on a yes, force-pushes a rebased fork with a lease, and queries CI on the fork rather than upstream
  • Publishes a features page whose pending and processed tables record each decision and whose context section survives /clear

Docs Relevance

Scans project documentation for stale references and fixes them.

Invoked by: /wrap-up as a clean-up pass when change_scope.py says RUN, by the review-auto workflow's polish phase, which follows its Process unattended, or by asking whether the docs are stale. It carries user-invocable: false, so it has no entry in the / menu.

Features:

  • Runs as a backgrounded forked subagent at effort: medium, so /wrap-up launches it and carries on with the steps that depend on nothing it produces. A fork starts fresh with the skill body and CLAUDE.md and sees none of the conversation, so every step derives what it needs from the repository
  • Edits a detached worktree outside the repo rather than the user's tree, created by claude/scripts/worktree-sandbox.py and carrying the pending change set — the uncommitted edits, the new files, the deletions — then hands back a unified diff for the caller to read and git apply. A fork's writes land outside the session's checkpoints, so /rewind cannot undo them; routing them through a patch keeps one writer
  • Reports the patch path even when the patch is empty, so "nothing to fix" and "the run failed" cannot be confused
  • Flags every claim the run could not check, not only a cross-repo file path — a sentence asserting how another repo's code behaves is just as unverifiable from the sandbox, and a word the document already uses is not evidence for it
  • Reads the project's own CLAUDE.md first and lets it override any step, and says in the report which of its rules applied
  • Reports a documentation gap in a file the project's upstream owns and edits nothing there — no patch and no memo for the docs of a fork's upstream or of a third-party clone, unless the gap belongs to a change the user carries on their own branch or to an issue they have already raised, which are theirs and handled as normal; the rest reaches upstream only as an issue they ask for, since the backlog holds work this repo has undertaken
  • Checks README, docs/pages/, CLAUDE.md, and source comments against current code, including a TODO or FIXME whose work the code now does
  • Fixes stale paths, API references, and behavior descriptions
  • Keeps curated feature listings (features page, docs index, README) in sync with the diff
  • Regenerates dimensioned-draft drawings when the model they document changed
  • Suggests new documentation files or reorganization when beneficial

Screenshot Relevance

Checks that a project's documentation screenshots still show the product, carry an edge, and exist where a page needs one.

Invoked by: /wrap-up as a clean-up pass, on change_scope.py's own verdict for it, or by asking whether the docs' screenshots are stale. It carries user-invocable: false, so it has no entry in the / menu.

Features:

  • Runs as a backgrounded fork in a sandbox and hands back a patch, exactly as /docs-relevance does; both read their sandbox procedure from claude/skills/shared/forked-sandbox.md
  • Follows the repo's SCREENSHOTS flag: no runs nothing, yes runs every step whether the repo is public or private, and unset runs nothing and reports a recommended value for the caller to ask about. A CLAUDE.md screenshot ban is not read: convention 019 moves it into the flag
  • Reconciles documentation screenshots against the docs that cite them, and proves a shot stale by grepping the text visible in it against source
  • Records each shot in a docs/screenshots/screenshots.json manifest — what the frame shows, how to reproduce it, and whether replacement is auto, confirm or never
  • Checks every published screenshot for an edge on every run, whoever took it, and reports a bare one as NO EDGE (hairline.py --check, which writes nothing)
  • Names the shots that do not exist: sweeps pages for sections doing a picture's work in prose, proposes the two or three strongest, and captures none of them without an explicit yes
  • Hands every capture its policy permits, and every frame it has to border, to /docs-screenshot; a capture that would raise a window or move the pointer comes back to the caller as pending, since a backgrounded fork cannot ask first
  • Counts the images a fork's upstream owns and checks none of them

Docs Screenshot

Takes, frames and files a documentation screenshot, then shows it on a contact sheet and asks for a verdict.

Invoked by: asking to take, re-shoot or replace a screenshot in a project's docs, by any turn that changes an image file, or by /screenshot-relevance when a frame's policy permits a capture.

Features:

  • Asks once before a capture that takes the machine (what counts is defined by the screenshot skill), covering everything from staging to the shutter; a headless render needs no ask
  • Keeps the outgoing file in tmp/screenshot-originals-<date>/ before anything overwrites it, and sets the entry's verifiedAt to at-capture
  • Captures through a committed docs/screenshots/capture/<id>.sh (or <id>.ps1 on Windows, which calls the shared window-shot.ps1 and windows-capture.ps1 of the screenshot skill) so the second capture is free and the diff shows how the image was made; a shot you supply yourself is filed the same way
  • Stages the content a frame needs by replaying a committed fixture through an input the product already takes, never a demo mode or seed data inside it
  • Gives a screenshot the edge its own capture lacks: a hairline traced inside a shaped frame's silhouette or grown outside an opaque one (hairline.py), or for a Windows capture the frame DWM draws, rebuilt from its measured model (winframe.py)
  • Writes a contact sheet with contact-sheet.py, which derives it from the manifest, the images, their raws and git so that only the verdict notes are written by hand — one self-contained HTML page carrying every screenshot, replacements as before/after pairs, each frame numbered and one click apart, with two nav checkboxes: Show previous version, ticked by default, for the committed file a frame replaces, and Show before framing, unticked, for each framed file's capture before its edge was added — and publishes it on the tailnet, handing over a link that opens on either machine; under confirm the sheet is the proposal, written before anything is captured
  • Follows the repo's SCREENSHOTS flag: under no it takes no picture on any skill's initiative, and on a direct request it says the request contradicts the flag and asks whether to set it to yes; when the flag is unset it asks which value to record
  • Takes the picture itself through the /screenshot skill's shutter and framing tools, which the project's capture scripts call by path

Screenshot

Takes a picture of a window, a region or a menu on this machine, for any purpose, a throwaway debugging capture included.

Invoked by: any screen capture about to be taken, or a capture that failed or came back blank.

Features:

  • Captures on macOS through DocShot, which holds the Screen Recording grant the terminal lacks (see Screenshot capture helper), and on Windows through window-shot.ps1
  • Asks once before a capture that takes the machine, covering every action from the first one that touches the screen through the shutter
  • Probes the macOS grant with DocShot's --check rather than reading a blank capture as "nothing on screen"
  • Holds the machinery every project's capture scripts call by path, under claude/skills/screenshot/scripts/ — the shutter on each platform and the framing tools; moving it is a convention version, since nothing else reports a caller left on the old path

Docs Style

Governs how a document is written, where Docs Relevance governs whether it is still true. Invoked before drafting or rewriting long-form prose — a docs page, a README section, a learnings file, a convention version README.

Command: /docs-style

Features:

  • Opens on why the thing exists rather than on what it is, since a definition-first first paragraph would survive unchanged in a glossary
  • Cuts the sentences that defend the text around them, the commonest source of removable words in a draft that already reads well
  • Names the actor instead of leaving a procedure in the passive, and refuses a header a reader cannot predict the content of
  • Carries the before/after pairs in references/style-guide.md, every one of them text that shipped and was then replaced
  • Names what it will not do: never cut a warning, prerequisite or edge case to make a page shorter, and never rewrite a quote
  • Resolves the reader from the file's path where that settles it, and declines a skill's own files outright — a SKILL.md is a procedure Claude executes, so trimming it to read better removes what a run needs

Create GitHub Repository

Creates a GitHub repo for a local project that has content but no remote yet, then wires it up without publishing anything. The remote ends up holding exactly one commit — a LICENSE — with local history rebased on top of it and still unpushed.

Command: /github-create

Features:

  • Proposes repository names derived from the folder, manifest, and README, filtered against names already taken on the account
  • Confirms visibility with public preselected, so an autopilot invocation can't silently publish
  • Seeds a LICENSE-only initial commit through the Contents API, avoiding the README that gh repo create --add-readme would otherwise force into it
  • Detects the states that break the rebase up front — a pre-existing LICENSE, a staged or dirty index, an index file left behind in a repo with no commits, a local branch that doesn't match the remote default
  • Subscribes the repo so new issues generate email, and explains the account-level toggle that delivery also depends on
  • Leaves committing and pushing to /yolo or /wrap-up, per the rule that creating a repo is neither

GitHub Pages Layout

Arranges a project's README and GitHub Pages docs into a consistent user-first layout — short README that links out, Jekyll site with a user-facing index, one page per user-facing feature, and exactly one developer page.

Command: /github-pages

Features:

  • Enforces single-source-of-truth docs on GH Pages so the README stays under a screen
  • Separates user-facing pages from the one developer entry-point page (development.md)
  • Supports flat and monorepo variants with consistent navigation and screenshots
  • Aligns new repos to the shape of existing reference implementations
  • Pins the remote theme to a release tag, so an upstream commit cannot change the site with nothing changing in the repo
  • Enables Pages once docs/ is pushed and points the repo's description and homepage at it

Deploy

Configures and runs the local deploy — it makes the current code runnable on this machine and never ships anywhere public. Either installs the built app locally (Tauri, IntelliJ plugin, .NET, or a project's own make target) or starts the project's local web server. On first use in a project, sets up the deploy bash function and writes the project's settings to config/deploy.env, which is committed, so every clone deploys the same way.

Shipping outward is a different verb: a versioned artifact goes through the release skill, and a running site through the Publish skill or the project's own CI. Where CI already publishes on push, the push is the ship and the project gets no local publish script at all.

Command: /deploy

Features:

  • Auto-configures deploy() shell function in the platform-appropriate rc file (~/.zshrc on macOS, ~/.bashrc on Windows Git Bash / Linux)
  • One entry point for every project: deploy runs the skill's run.sh, which reads DEPLOY_TYPE from the committed config/deploy.env and calls that target. A project keeps no wrapper of its own
  • What differs between machines, such as an IDE's plugin directory, goes in the ignored config/deploy.local.env, whose keys override the committed file's
  • Installed apps go to /Applications on macOS and C:/Programs/<binary name> on Windows unless INSTALL_DIR says otherwise
  • A project whose Makefile already builds and installs the app, as an Xcode project's does, takes the make type: deploy runs make deploy at the repo root, or the target MAKE_TARGET names, and leaves the stack to the Makefile. INSTALL_DIR, when set, is passed through as the make variable of that name, so it applies only where the Makefile reads it; unset, the Makefile's own default stands. Make's output goes to tmp/deploy-make.log; the terminal shows a progress line every 20 s and then the log's last lines with the verdict, more of them on failure
  • The Tauri target delivers secrets from Doppler two ways: it renders config/local.template.json into the app's config for an app whose config the project owns, and for an app that keeps settings of its own it writes only the named fields (SECRET_FILE, SECRET_FIELDS) into the existing file
  • Install targets run the full pipeline: build → stop app → clean install dir → copy → launch → verify. The build runs first, so a failed build leaves the running app untouched
  • The Tauri target asks cargo metadata where the build landed, so an app inside a Cargo workspace installs the binary just built rather than a stale one from src-tauri/target
  • The Tauri target confirms the relaunch against the process table: on macOS and Linux the stop step waits for the old process to disappear before anything overwrites its files, and the verify step polls for the new one, since macOS open exits 0 for a launch that only activated a dying instance and -600 for one it went on to honour
  • The Tauri and .NET targets' verify step also requires the new process to still be running 2 s after it appears, since Start-Process returns once the process exists and an app that crashes a second after launch would otherwise pass
  • Asks right before a run that starts, restarts or closes an app with a window — the install targets that launch the installed app, the IntelliJ target when it is set to close the IDE, and the make target when its recipe does either — and runs only on a yes; the dev-server target opens no window and runs without asking
  • Local web servers (a package.json with a dev script, or a plain static index.html) relaunch detached, and the run succeeds only once the server answers an HTTP request on its port, so a server that binds and then crashes (Next with its database down) fails the deploy and names its logs. The port is configured nowhere: the script asks the Ports registry for the dev-server claim ports.py dev-use-case names (keyed on the physical project folder, which can differ from the GitHub repo name) on every run and exports it as PORT, so config/deploy.env names no port and a DEV_PORT line left in an old one is read by nothing
  • Prints the tailnet URL as its last line, fronted on a second registry port (the tailnet claim ports.py dev-use-case names) rather than the one the server binds — a tailscale serve mapping holds the wildcard address, so fronting a server from its own number stops it rebinding at the next restart while every process listing shows that port free. DEV_TAILNET=no keeps the localhost URL for a project whose origin is pinned there
  • An optional DEV_PRESTART_CMD runs the project's own script — fetching a fixture, rendering a generated file — in the gap between stopping the old server and starting the new one, on every deploy
  • An optional DEV_DB_SYNC_CMD runs only on deploy --db, in that same gap: the project's script that replaces the local database with production's, so a plain deploy never reaches production. A failed sync still restarts the server and is repeated beside the URL
  • A successful start also reports the port, the repo path, the agterm session id, the Claude Code session id and the published tailnet URL to the tauri-dashboard (TAURI_DASHBOARD_URL, default http://127.0.0.1:9077), so the agterm session that started the server shows it, and so does the other machine's ⇄ tab onto that session's row. Either session id and the URL go out as null when absent. The dashboard picks the row from the Claude Code session's anchor, else from the repo path; a deploy from outside agterm shows nothing on this machine, but the other machine's ⇄ tab for that row still shows it. The report is best-effort and silent
  • After first /deploy, use ! deploy for instant deploys without LLM overhead

Cleanup

The destructive counterpart to deploy: stops the running app, removes the installed bundle, and wipes its user-data and cache directories — the "before a clean install" reset. Reuses the deploy settings, so the install location is never entered twice.

Command: /cleanup

Features:

  • Auto-configures cleanup() shell function in the platform-appropriate rc file (~/.zshrc on macOS, ~/.bashrc on Windows Git Bash / Linux)
  • Creates scripts/cleanup.sh wrapper pointing to the global cleanup script
  • Always asks which of bundle / app data / caches to remove — never assumes
  • On macOS and Linux the stop step waits for the app to be gone before anything is removed, through the same wait the Tauri deploy target uses: rm -rf over a bundle whose process is still running unmaps the binary under it. The Windows path keeps a short sleep instead, since whether a handle outlives Stop-Process there is unmeasured
  • Backs up paths listed in BACKUP_FILES= to .cleanup-backups/<timestamp>/ before wiping data
  • Recognizes Tauri projects; after first /cleanup, use ! cleanup for instant runs

Broom

Reclaims disk space on the Mac and warns before it runs out. The deterministic half is claude/scripts/reclaim-disk.sh, which sweeps what a rule already calls regenerable; the skill is the judgement the script cannot encode: settling the rows it refuses to settle alone, and classifying a consumer no rule covers yet.

Command: /broom

Features:

  • reclaim-disk.sh with no flag reports and deletes nothing; --apply removes the candidates whose class authorizes a delete and leaves the rest in the report
  • Every candidate carries a class, and a guard that refuses one prints its reason; the script's header defines the classes and documents every guard
  • --alarm only measures free space and sends a Telegram notice below the warn and critical floors the script's usage block sets; --install loads it as a daily LaunchAgent, --uninstall removes it
  • Separate age gates for build artifacts, tool caches and signed-bundle clones
  • Scope is the Mac's own free space: a disk inside a VM or container filling up is that tool's concern, since pruning inside it frees nothing on the Mac

Build

Configures a build shortcut for any project. On first use, sets up the build bash function, creates a local scripts/build.sh wrapper, and updates .gitignore. Then auto-detects the project type and builds. Optionally generates a GitHub Actions CI workflow.

Command: /build

Features:

  • Auto-configures build() bash function in ~/.bashrc if missing
  • Creates scripts/build.sh wrapper pointing to the global build script
  • Auto-detects project type: npm, dotnet, or Tauri
  • Runs npm ci first when an npm project has no node_modules, so a fresh clone builds, and when package-lock.json is newer than node_modules/.package-lock.json, so a pull that changed the lockfile reinstalls. A tree with package-lock.json but no node_modules/.package-lock.json, as npm 6 leaves it, reinstalls on every build
  • Optionally generates .github/workflows/build.yml with CI for push/PR builds (Tauri uses a Windows + macOS matrix)
  • After first /build, use ! build for instant builds without LLM overhead

Release

Tags a new version, pushes to trigger CI, monitors the build, and updates the GitHub release with final notes. Supports dotnet and Tauri projects (Tauri builds for Windows + macOS).

Command: /release

Features:

  • Validates preconditions: clean tree, on main, in sync with remote
  • Auto-detects project type (dotnet or Tauri) and extracts project name
  • Recommends version bump from commit history, checked against what the release actually ships, then asks for confirmation
  • Bumps version in all manifest files before tagging (csproj / package.json / tauri.conf.json / Cargo.toml)
  • After pushing the bump commit, asks the session working on the same repo on the other machine to run /pull (see Peer) — the tag and the GitHub Release both look like the outcome while the branch is what moved, so nothing else in the flow reports that clone being behind
  • Creates signed annotated tags for GitHub "Verified" badge
  • Compiles platform-appropriate release notes (SmartScreen + Gatekeeper first-launch warnings)
  • Monitors CI (single-platform for dotnet, matrix for Tauri) until completion
  • Replaces draft notes and un-drafts Tauri releases (GitHub auto-renders the assets list)
  • Watches the runs the publish triggers, including ones it dispatches to other repos (a tap's cask bump), and reports a failed one

Publish

Ships a project outward to where its users are — the counterpart to deploy, which only makes the code runnable on this machine. Writes config/publish.env and a per-machine scripts/publish.sh wrapper, then publishes and verifies the live result. Supports Dockerised apps on a box reached over SSH; a Chrome extension goes through /publish-chrome-extension and a versioned artifact through /release.

Command: /publish

Features:

  • Declines to write a wrapper at all for a project that publishes from CI — there the push is the ship, and a local path would upload a working tree stamped with local HEAD
  • Ships only committed, pushed code: a dirty tree or a HEAD that isn't origin/<branch> stops it before the box is touched. A project with no users can waive that with ALLOW_DIRTY_PUBLISH=1 in its config/publish.env and ship the working tree instead — the box then runs code no commit describes, which is why the key is per-project and never inherited by a co-tenant
  • Reconciles the box's checkout with a hard reset to the remote, cloning it on the first publish so step one behaves like every later one
  • Renders the production env file from Doppler straight onto the box over SSH, so no value reaches this terminal, the transcript, or shell history
  • Detaches the compose build and polls its log, since a build routinely outlives the tool timeout that invoked the script
  • Recreates the proxy only when its config actually changed — a bind-mounted config keeps its old inode, so a reload reports "config is unchanged" and the new vhost never gets a certificate. Handles both shapes: a co-tenant vhost gets installed into somebody else's proxy (validated before it goes live, restored on failure), while a repo that owns its proxy already has the file in the checkout and only needs the "did it change" answer
  • Proves success by observing the target: a real user-facing page must return 200 and the container's restart count must not climb, because a health probe passes while every database-backed page 502s and a crash-looping container answers between restarts
  • Asserts identity, not just liveness, where a box hosts several projects — a 200 proves something answered, never that it was yours, and a name collision routes a hostname at a neighbour's app just as healthily. The optional IDENTITY_CHECK runs twice: once before anything is built, to prove the check itself can run, and once after the deploy to assert the answer. "Serving the wrong app" and "the check could not run" are reported as different things, because only one of them justifies a rollback
  • Writes every run to <repo>/tmp/publish.log, ending with a PUBLISH-EXIT=<status> line. When the permission mode keeps the agent from publishing and the user runs ! publish instead, the agent first starts await-publish.sh in the background; it exits with that run's status once the log shows a finished publish, so the agent reports the result without the user having to say it is done

Publish Chrome Extension

Republishes a new version of an existing Chrome extension to the Chrome Web Store: takes the zip from a GitHub release, checks the store listing still covers what the package now does, uploads over the Web Store API and submits for review. Usually run straight after /release.

Command: /publish-chrome-extension

Features:

  • Verifies the version inside the release zip's manifest.json against the tag before uploading, so an asset that doesn't contain what its tag claims stops the run
  • Keeps cws-publish.json beside manifest.json as the tracked mirror of the dashboard-only listing data the API can neither read nor write — one per extension folder, so a repo can host several
  • Diffs the package's permissions and host_permissions against the recorded justifications, drafting the missing ones and flagging orphans: the dashboard blocks submission on exactly this, and the API cannot fix it
  • Re-checks the single-purpose statement and store description against the user-visible changes since the last published version, rather than assuming they still hold
  • Walks the one-time Google Cloud OAuth setup on first run, and re-runs only the token steps when a refresh token expires
  • Will not create a listing or edit listing content — that stays in the dashboard

Backup

Gives a project on the shared VPS a nightly off-box backup, or works on one it already has: provisions its Backblaze bucket and bucket-scoped key, writes the job and its systemd units, renders the credentials, and proves the restore by running it. Encodes one shape across every co-tenant — restic to B2, one bucket per project, credentials in /etc/<tenant>/backup.env, a staggered timer, a drill.

Command: /backup

Features:

  • Provisions Backblaze end to end over the native API — bucket, lifecycle rule and a key scoped to that bucket alone — with an explicit boundary between what it may create unasked and what needs the user (deleting anything, or touching another project's)
  • Sets the bucket lifecycle rule at creation, because the S3-compatible backend only hides what it deletes: without it forget --prune reclaims nothing while every nightly run exits 0 and the bill grows with no signal anywhere
  • Insists on a fixed staging path — restic forget groups snapshots by host and paths, so a per-run tmpdir silently turns the whole retention policy into a no-op
  • Renders credentials from a workstation over an ssh pipe with umask 077, since the box deliberately has no Doppler and > then chmod leaves the passphrase world-readable for a window
  • Keeps backup credentials out of the publish-time required-secrets list, so a durability credential can never refuse a change to what the box is serving
  • Catches the failures that report success: restic's exit 3 writes a partial snapshot, Type=oneshot disables systemd's start timeout by default, and an ExecStart under the repo directory name rather than the deploy path dies 203/EXEC on every fire
  • Asserts the bucket's lifecycle rule field by field from the box's own self-check — the one failure that lives entirely in B2, where every backup-side check stays green while forget --prune reclaims nothing; a presence check passes anything, because B2 returns an unset field as null rather than omitting it
  • Proves the restore by counting what came back — and, where the box still serves, by matching a restored artefact's digest against the live one
  • A per-engine table for taking a consistent copy (SQLite online backup, pg_dump with credentials read inside the container, mongodump from the image that matches the server), and the authorization boundary in references/b2-provisioning.md for what may be created without asking

Heartbeat

Gives a scheduled job a dead-man's switch, so its silence is noticed. A scheduled job cannot report its own absence: every other check runs inside the thing being checked, so when the thing stops, so do they, and a stopped check is indistinguishable from a passing one. Derives the grace from the job's own cadence, creates the check over the healthchecks.io API, puts the ping URL where the job's other credentials live, and proves it by watching the alarm fire.

Command: /heartbeat

Features:

  • Separates the two questions a job answers — did it pass (the verdict: mail, report, log) from did it run at all (the heartbeat) — so a failing job never looks dead and a dead job never looks merely failing; the heartbeat fires on a failed run too
  • Treats the ping URL as a credential: scripts/hc.py never prints one, store-url pipes it straight into the job's own Doppler config, and list strips the uuid as well, since the ping URL is that uuid in longer form
  • Defaults a new check to all integrations, because the API's own default is none — a check with nowhere to send an alert goes red on the dashboard and tells nobody, the exact silent failure the skill exists to prevent
  • Refuses to send a schedule and a period together: healthchecks.io keeps the schedule and silently discards the period, so a caller passing both would get a cadence it never asked for and no error saying so
  • Audits every check the key can see and names the inert ones — never pinged, so it sits in new forever and can never alert; or no integrations, so it can go down and nobody is told
  • The one check permitted to degrade quietly: an unset or unreachable ping URL is a note, never a failure, since a heartbeat able to fail the job would turn a monitoring aid into an outage
  • Keeps the inventory of what is and is not monitored out of this public repo — check names and unwatched machines are a map of where nobody is looking, so the method lives here and the map lives in the private repo that owns the thing being watched
  • Grace derivation in references/grace-derivation.md; the healthchecks.io API key is per-project, so one key audits one project

Auth

Gives a web app sign-in through a shared, self-hosted OpenID Connect service, in place of an edge password, a stubbed user or a password in the environment. A person proves who they are once, with a passkey or an emailed code, and each app keeps its own session and decides what that person may do. The skill carries the method, the sign-in module every app installs unchanged, and the test that proves the module against a real identity provider.

Command: /auth

Features:

  • One module, module/signin.ts, for every app: the three /auth routes, a signed session cookie and a deny-by-default gate, written against web-standard Request and Response so proxy.ts, a route handler and the test harness call the same functions
  • An end-to-end test, scripts/e2e.mjs, that starts a throwaway Pocket ID in Docker and drives every path over HTTP: the sign-in round trip, replayed and forged callbacks, an unverified address, a user outside the app's group, forged and expired session cookies, open-redirect attempts, sign-out, and the development user
  • Refuses the sign-ins that matter: a callback is accepted only with the flow cookie of the sign-in that started it, an address nobody vouched for gets no session, and next can only be a path on the app itself
  • Signs out of the service as well as the app, by handing back the ID token it issued, since an app-only sign-out would let the next visitor on that browser straight back in
  • Registers an app with one command whose stdout is the client secret and nothing else, piped into the secret store, so the secret never reaches a terminal or a transcript
  • Settles whose data it is before any code, with one recipe per case the user's apps present: everyone admitted shares the records; records a stand-in user owns today pass to the first person who signs in, and each person after gets a row of their own, with a role where not everyone may change the shared records; public pages show the owner's records to everyone. A case no recipe covers stops the adoption until its design is settled with the user
  • A development user for local work, which the module refuses outright in production
  • Keeps the service's address and where its admin credential is stored out of this public repo: the skill reads them from the private repo that owns the service and stops when that checkout is absent. The registration script carries the two names it needs in the open: it names each app's group after the app's compose project, and reads the admin key from AUTH_ADMIN_API_KEY

Document Data Flow

Generates or updates a data-flow architecture document (docs/data-flow.md).

Command: /document-data-flow

Features:

  • Discovers the project's architecture by exploring the codebase
  • Produces step-by-step flow diagrams with data transition annotations
  • Generates message/API protocol tables for all message types and endpoints
  • Follows strict formatting rules for consistency across updates

Reflect

Extracts durable knowledge from the current conversation and persists it to long-term memory before /clear or context compaction wipes it. Also runs as part of /wrap-up, invoked with draft so its findings join the one close-out summary and session learnings are committed alongside the changes they came from.

Command: /reflect

Features:

  • Scans the conversation for feedback, project context, user profile, and external reference pointers
  • Writes new memories or updates existing ones in global or project-scoped memory dirs
  • Re-checks every project-scoped finding against "would this help in another repo tomorrow?", promoting what is actually global and splitting what is only partly so
  • Audits already-stored project memories the same way, proposing promotions rather than performing them silently
  • Flags candidate skill updates and learnings worth distilling
  • Writes evidence taken from the user's own data (sites in their history, fares, account figures) in generalized form, since learnings and memory are committed to a public repo
  • Falls back to direct file reads when the gather-context helper is blocked by permissions

Memo

Parks an off-task idea in the project's memo backlog so it isn't lost — without derailing the current task — or lists the backlog to pick something up.

Command: /memo [idea]

Features:

  • /memo <text> writes one markdown file to <repo>/.claude/memos/ (created on first use); /memo with no args shows the open backlog as a page whose rows can be set to start or done, as an overlay inside agterm and as a tailnet link anywhere else
  • Files an idea whose every change lives in a sibling project with that project's live session, through the peer skill, instead of this repo's backlog
  • One memo is one file — a frontmatter block carrying created: and optionally platform:, an # H1 title, and a body as long as the idea needs; open versus addressed is memos/ versus memos/done/, so nothing parses a status marker
  • An addressed memo is named <close-date>-<slug>.md and is kept for good — there is no command that clears done/. That directory is the one place the sort key sits in the filename rather than in frontmatter, because nothing lists it: list and show both resolve against the open backlog, leaving ls and git status as its only readers, and a name is all either sorts by
  • Read one in full with show, close it with done, undo that with reopen, and delete a redundant duplicate outright with drop — a listing shows titles only, with a trailing … marking a memo that has more to read
  • --platform macos|windows binds the minority of memos one box cannot act on — a codepage, a PowerShell API, a toolchain on one side only. Absent means either machine, and an unbound memo writes the bytes it always did. It marks and never filters: the memo keeps its place, its number and its close command, so a tag can never desync a listing from the number used to act on it.
  • The three that change the backlog — done, reopen and drop — each take several identifiers at once and resolve them all before acting, because a number indexes the live listing and closing one renumbers the rest
  • Memos are deliberately lighter than GitHub issues — half-formed thoughts, committed with the project
  • The backlog never surfaces unasked — no session start, commit or finished task lists it, so the notices those carry are not buried under dozens of lines nobody can act on at that moment
  • Capturing a memo never starts the work — that's the point; addressing one is always an explicit, separate choice
  • Every command refuses in a repo that has not adopted this layout, naming the version and pointing at /adopt — otherwise a listing reports an empty backlog while the old file holds items, and an add writes a memo beside it and leaves the migration half done. It asks the adopted version rather than looking for the old file, so the next format change needs no edit here. Where no version can be asked — a clone of someone else's project, an exempt repo, a directory outside git, or a version check that fails outright with a note on stderr — it refuses instead when a .claude/memos.md is present, since nothing will ever split that file and a listing would otherwise read as an empty backlog

Tests: python claude/tests/memos.py — exit 0 all cases behave, 1 otherwise. It pins the numbering (one snapshot per command, and that two commands cannot share one), the case folding that keeps a generated filename off an existing memo on a case-insensitive filesystem, the undo hint naming where a memo went rather than where it came from, the close date riding in the name and nowhere else — uniqueness tested on the prefixed form, the -2 suffix kept behind the date, and a reopen dropping the prefix by deriving from the title rather than by recognising a date — that add refuses a leading flag nothing takes, such as --help or a mistyped --titel, rather than filing it as a memo — that a clone holding a hand-written .claude/memos.md is refused rather than counted as empty, including when the version check itself fails — and the platform binding — that it marks without filtering, that an unbound memo still writes the bytes it did before the field existed, and that a value reaching the file by hand renders rather than reading as "either machine". Its platform cases are written against memos.THIS_PLATFORM, so the suite asserts the same thing on the mac and on the Windows box. It pins the page as well — rows keyed by slug and labelled with the listing's number, an answer matched exactly and whole before anything moves, and a stale answer moving nothing — and page-or-add, the one entry every memo wrapper runs, which files every word it is given, a first add or count included. The listing and link page prints outside agterm print NOT COVERED, since showing a page publishes it on the tailnet, and on Windows so does page over an agterm session.


Wrap Up

Closes out a section of work with one approval. It reviews the change through the review-auto workflow, re-reads the current session's transcript from disk for the business left unfinished — questions Claude asked that were never answered, concerns raised and passed over, ideas that should have been memo'd, follow-ups promised but never delivered — drafts what /reflect would save, and groups the commits. Then it stops once, on a single summary (or, when there is nothing to commit, push or decide, prints no prompt and goes on), and one answer applies the dispositions, saves, commits and pushes. Afterwards the committed change is offered to whichever of the project's own deploy and publish paths exist, a release is offered when features or fixes went in since the last one, and the run ends by recommending a /clear.

Command: /wrap-up

Features:

  • Runs review-auto in fix mode over everything since the last recorded review — the working tree and every commit /yolo pushed since — in the background while it reads the transcript, and skips it only when nothing has changed since the bookmark
  • Settles what belongs in the tree before launching that review, deleting junk such as crash dumps and checking every path the session did not write for another live session still writing it, since the review snapshots every untracked file that is not ignored and a reviewed path left out of the commits stops the bookmark from moving
  • Reads the transcript on disk rather than the live context, so a session that has been compacted still gets a complete review
  • Starts that reading after the last earlier /wrap-up in the session that went on to commit, push or move the review bookmark, whether the user typed it or Claude invoked it through the Skill tool, or at the last /clear when that comes later, so a session that carries on after a wrap-up needs no /clear to keep the next one to the new work, and a run interrupted or diverted before its commit step hides nothing said before it
  • Keeps every word both sides said and discards tool traffic; prose is a small fraction of a transcript (82 KB of a 3.5 MB session, measured), so no keyword heuristic has to decide which findings are allowed to surface
  • Restores answers given through question prompts, which carry direction that often appears nowhere else in the session
  • Checks each candidate against the current working tree before presenting it, dropping whatever is already settled: a later message, an existing memo, an earlier /wrap-up, or a step of this skill that owns it
  • Invokes /reflect with draft, so its feedback-derived saves come back as summary lines instead of questions, and runs /clean-code, /docs-relevance and /screenshot-relevance as claude/skills/shared/change_scope.py decides, each proposal it would ask about becoming a summary line. A repo that has not set SCREENSHOTS in .claude/repo-flags gets no screenshot pass and a summary line asking yes or no, preset to the value the verdict recommends, and the answer is committed as its own chore(repo-flags) commit
  • Gates the tree before presenting anything, and stops on a failure rather than asking for approval over code that fails its own checks
  • Presents one numbered summary — the review's triage table, the transcript's open items under a heading per category, what /reflect would save, the repo checks (clean-up proposals, untracked skills, related open issues, finished plans to archive), and the commit plan ending on where the review bookmark will sit — leaving out every heading with nothing under it, and with each line carrying a recommendation; go takes them all, and any line can be overridden by its section letter and number, such as memo C2, hold keeping everything but the push
  • Shows that summary as a page over the session through claude/scripts/review_picker.py, the same blocking agterm overlay /review-manual uses, closing any page already in the session's overlay, each item a row of disposition pills preset to its recommendation with a ✎ note, and a Push after committing checkbox standing in for hold; outside agterm it publishes the page on the tailnet and takes the pasted answer or a reply in chat, and it prints the summary in chat when the page is closed or cannot be shown
  • A run with nothing to commit, push or decide prints no prompt and goes on without stopping, still moving the review bookmark when a review was recorded and handing files written in other repos to their sessions
  • Settles each finding as answered now, memo'd for later, pinged to the session that owns it, or dropped, and commits and pushes through the shared commit and push steps; after the answer it asks again only where a step names its own question, such as before opening a window or on a blocking privacy finding, which the skill's step 8 lists
  • Routes work only the other machine can do to the live session there rather than parking it as a memo, and holds that message until the push when the peer has to pull this session's work before it can act
  • Reports a finding in a file the project's upstream owns and goes no further — no memo and no ping — unless it touches a change carried on the user's own branch or an issue they already raised upstream
  • Offers to run the committed code on this machine and then to ship it outward, so a closed section is not left unrun here or on the previous version for its users — one offer per verb the repo has configured, run through the script the shell function runs (run.sh for deploy, scripts/publish.sh for publish) rather than the skill that configures it, and nothing said about a verb the project has not configured. A deploy that relaunches an app with a window carries the machine-takeover ask immediately before it, which every DEPLOY_TYPE other than dev-server gets; the skill exempts that one value rather than listing the window-raising ones, so a repo below convention 017 that names no type still gets the ask. The publish offer leaves the shipping guard to the publish script rather than restating it, and is withheld in the one case that script cannot see: a push the user declined, which a project waiving the guard with ALLOW_DIRTY_PUBLISH=1 would ship anyway. It asks for the verb by name, which is what the publish skill's authorization bar requires
  • Offers, just before the publish offer, each check a repo declares in a committed .claude/pre-publish: one too slow, costly or nondeterministic for its commit gate, such as an evaluation run against a live model. A check's result informs the publish offer and never withholds it
  • Offers /release when feat or fix commits have gone in since the last v* tag, listing them so the user judges whether they reach users; counted after the push, with tags fetched first so a release cut on the other machine is not counted again, and silent for a project never tagged, whose first release stays a deliberate act, or one carrying RELEASES=no in .claude/repo-flags. When the offer is declined and RELEASES is unset, it asks once whether the repo is never released and records the answer either way: RELEASES=no stops the offers, RELEASES=yes keeps them and stops the question
  • Ends by recommending /clear as the sign that the section is finished, and withholds it where the push was declined or a run left something to fix; a run a peer on this machine drove sends its closing report to that peer instead, which clears the session with peer_relay.py clear once its turn has ended

Tests: python claude/tests/session-scan.py — exit 0 when every case behaves, 1 otherwise. It writes transcripts under a scratch HOME and pins where the digest starts: after an earlier /wrap-up that reached its commit step, typed or invoked through the Skill tool, not at one interrupted or diverted before it, nor at a trailing one the current run wrote, and at a later /clear when there is one.


Peer

Finds, messages and routes work to other Claude Code sessions, on this machine or on the other one, and settles what arrives from them. When a message is worth sending is the peer_messaging memory's call; this skill is how it is sent.

Command: /peer

Features:

  • Reaches sessions on this machine through SendMessage, finding the one working in a project with peer_relay.py session, which asks the dashboard to match by working directory so a renamed session is still found, and starting one with peer_relay.py open --dir when none is running, after asking since it opens a terminal window; sessions on the other machine are reached through the Claude Code Dashboard relay
  • Sends cross-machine with one shared client, skills/shared/peer_relay.py, which addresses the project on the peer and lets the peer's dashboard resolve the session
  • Clears a session on this machine that a peer drove through /wrap-up with peer_relay.py clear --project, which has the dashboard type /clear into its composer and refuses over a draft; the peer runs it only when the closing report says the wrap-up finished and pushed. A typed receipt exits 0 and a refusal exits 1 with its reason, where busy means the session's turn has not ended yet, so the peer waits for its idle notice and runs clear once rather than looping; a dashboard that did not answer or predates the route prints UNMEASURED and exits 1
  • Reports each relay receipt literally, keeping "written" apart from "delivered" and "not sent" apart from "nobody there"
  • Explains each relay refusal code and what to do about it
  • Covers the receiving side: requests to act, commit handoffs, routed learnings and relayed approvals
  • Owns the post-push notice every pushing skill sends, skills/shared/notify_peer_pull.py — one message per peer device asking that machine's session on the same project to run /pull, listing the commits the push carried; a push that moved nothing sends none. /release, /yolo, /wrap-up and /pr-merge reach it through claude/skills/shared/push.py, which passes each caller's name; /pr-create is exempt, since it pushes a feature branch rather than the branch the peer is on
  • Owns the pre-push gate run every pushing skill makes, skills/shared/gate_pushed_tree.py — it runs the repo's own .claude/commit-checks.sh over the state a push would publish, after every commit is made, and exits non-zero when that state fails. A gate run earlier measures neither thing the push sends: it happens before staging, so it reads a working tree still holding whatever the plan held back, and it never saw commits that existed before the skill ran. A clean tree is byte-identical to HEAD, which is what makes the verdict binding; a dirty one gets the run with the differing paths named instead of glossed. Every pushing skill runs it, most through claude/skills/shared/push.py. A repo carrying no such script gets a NOT COVERED line and no block, while an unpushed range git cannot read, or a machine with no bash on PATH to run the gate with, exits non-zero — an unmeasured range is not a pass. /yolo, /wrap-up and /adopt also call it with --record for their pre-commit gate run, which on a pass writes down the tree it measured under the git dir; the next plain run prints SKIPPED instead of gating again when HEAD holds exactly that tree, and the record is consumed by that run and expires after an hour, so a stale pass never stands for a later push. Interior revisions stay unchecked and it says so every run, since gating each commit's own tree would need a checkout per commit — which this repo cannot have, its conventions asserting the ~/.claude symlinks and deriving a project id from the checkout path, so any scratch worktree collects 17 violations across two rules that say nothing about the tree

Tests: python claude/tests/push-notifies-peer.py — exit 0 when every skill the push rule clears calls the notifier, 1 otherwise. Which skills may push is the clear condition on claude/settings.json's Push to GitHub rule, so the check reads that list rather than hunting for git push: a skill not named there is already refused by the permission gate, while one added to the list with no notice wired is stopped by nothing. A skill pushing through claude/skills/shared/push.py counts as notifying and as reporting the bookmark, and the check then asserts the script itself still calls both the notifier and review_scope.py status. It asserts both directions, that each exemption still covers a skill that cannot send the notice, and that every cleared skill, exempt or not, either pushes through push.py or points at claude/skills/shared/review-bookmark-status.md, which must itself run review_scope.py status. A clear condition it cannot parse prints NOT CHECKED and fails rather than reporting a pass.

python claude/tests/peer-relay.py covers clear against a stand-in dashboard on a loopback port: the request body, the receipt line and exit code for typed and for a refusal, the project defaulting to this repo's, and UNMEASURED both for no dashboard and for one answering an empty 404. Exit 0 when every case behaves, 1 otherwise.

python claude/tests/gate-pushed-tree.py covers the gate run: against a real clone of a bare origin with a stub gate that counts its runs, it tries to make the pre-push run skip when it must not — a file held back from the commits, an edit after the pre-commit run, an expired record, a gate that failed or rewrote a file — and asserts that each of those gates again. Exit 0 when every case behaves, 1 otherwise.


GitHub Status

Cross-machine overview of all your GitHub-owned local clones — branch, behind/ahead counts, uncommitted file/line totals, oldest pending work, open issues, how far behind /adopt each clone is, and a description synthesized from the pending changes for each machine that has any. Prints a box table and publishes a self-contained HTML report on the tailnet, so the one link it hands over opens on either machine.

Command: /github-status

Features:

  • Walks PROJECTS_ROOT (configured per-machine on first run), filters to repos owned by your GitHub user
  • Covers both machines in one run — the peer is scanned by piping this same script into its interpreter over SSH, so nothing is installed on the far side and the two ends cannot run different versions of the scan
  • Merges the two on each repo's OWNER/REPO origin slug, the only identity that survives a different clone path per machine; in the terminal table a machine gets a line only where it has a clone, so which machines a block lists is itself where the repo exists, while the report shows only outstanding work and leaves clean and absent alike as an empty column
  • Fetches every repo's origin in parallel on both machines before reading state, so counts reflect the current remote — and where a fetch fails, that clone's REMOTE cell reads ? rather than a count taken from a tracking ref nothing updated, since a frozen ref answers 0 and reads exactly like a clone that is current
  • Auto-pulls clean repos with inbound commits via git pull --ff-only on both machines, marks pulled repos with ✓
  • Reports each clone's convention gap in a CONV column and in the report card, so a repo behind on /adopt appears even with a clean tree — it imports the conventions engine rather than re-reading .claude/conventions, since two readers of one format drift the day either changes shape. Per machine, not per repo: the two dotfiles checkouts are routinely at different commits, so each machine's summary line names the version set its column was measured against
  • Says when it could not measure — a machine whose dotfiles checkout predates /adopt, a record that will not parse, one naming a version newer than the version set — rather than leaving an empty column that reads as a fleet with nothing to adopt
  • Auto-hides columns nothing fills — MACHINE disappears on a single-machine run, BRANCH when every clone is on main — and drops DESCRIPTION entirely on a terminal too narrow to hold prose, rather than wrapping every summary into a four-line ribbon
  • Describes each clone once, not once per run — a description is reused whenever the work behind it is byte-identical, judged by a content digest of the pending state rather than a modification date, which a deleted file leaves none of. Each machine caches only its own clones and resolves them during the scan, so the peer's answers ride back inside its snapshot and a report run from either machine starts warm; --no-cache crosses the hop to refresh both. The scan itself is never cached — its cost is the per-repo fetch and gh issue list, and both ask the remote something no local state can answer
  • Degrades loudly when the peer is unreachable: the SSH error is named once in the summary and the report header, and the table falls back to the single-machine shape rather than quietly dropping half the picture
  • Writes an HTML report to the repo's gitignored tmp/ — one full-width block per project with the machines side by side in a column each, named once in a sticky header carrying their OS, projects root and scan age, so a column's position is what attributes its contents
  • Publishes the report on the tailnet, so the one link handed over opens on either machine and on the phone — the two machines' projects roots share no path, so a file:/// link opens on only one of them. It publishes through the shared skills/shared/tailnet_publish.py, the same path every file handed to the user takes; the URL names whichever machine ran the scan and answers while that machine is awake, and any failure falls back to the local path with its reason on stderr
  • Recomputes every interval in the page rather than baking it in, so a report left open or reopened tomorrow still reads correctly; exact timestamps sit on hover
  • Reports uncommitted-file lists and unpushed-commit subjects for the clones still awaiting a description, so Claude reads only the work that actually moved
  • Scopes to one repo with --repo, which is what /repo-status invokes — the peer is told the slug too, so both ends scan one repo; the scoped run renders a block per machine instead of this table, writes no HTML, and merges the description cache rather than rebuilding it

Repo Status

Cross-machine status of a single repo — this machine's clone and the peer's, side by side. The other half of /github-status: same scanner, same config, same description cache, scoped with --repo to the repo you are standing in. It answers "how does this repo stand" where the fleet report answers "which repos need attention", and it costs seconds rather than minutes because the peer is told the slug too and scans one repo instead of its own fleet.

Command: /repo-status

Features:

  • Has no scripts of its own — one SKILL.md invoking github-status/scripts/repos-status.py --repo, so the scanner, the per-machine config and the description cache are shared rather than duplicated
  • Resolves the repo to its OWNER/REPO origin slug before crossing to the peer, so the peer finds its own clone whatever path it keeps it at; a path or a slug both work as the argument
  • Prints a block per machine, not the fleet's table — columns exist to align repos against each other, and one repo has nothing to align with
  • Omits every fact sitting at its default: branch main, an upstream level in both directions, a current convention record, zero open issues. A clone with none of them reads clean, which is the whole line — what remains is only what is not ordinary
  • Distinguishes unknown from zero — gh failing to answer prints open issues unknown rather than nothing, which would assert a count nobody checked
  • Names a machine that was not reached with its SSH error, and one holding no clone as no clone here, rather than leaving either silent
  • Shares the description cache and merges into it instead of rebuilding — a run that saw one repo has no opinion about the rest, so every other entry carries through untouched, on both machines; the peer's merge runs on the peer, which is the only side holding its own entries
  • Terminal only. A repo found on no machine exits non-zero naming the reason, so an empty block never stands in for a clean one

Move Project

Moves or renames the current project folder while preserving the Claude Code data tied to it — session logs, memory, subagent history — and the Claude Code dashboard's data for the project. The session data lives in its own directory keyed by a mangled form of the project's path, so a plain mv orphans it.

Command: /move-project

Features:

  • Derives the old and new ~/.claude/projects/<key> directory names from the path-mangling rule in claude/skills/skill/references/claude-project-memory-paths.md, so the session history follows the folder
  • Moves the data directory of every subfolder a session ran in (<key>-web beside <key>) along with the root one, telling a sibling folder's look-alike key apart by the cwd its session logs record
  • Re-points a project memory link made by link-project-memory.sh at the new folder, since the link's absolute target would otherwise dangle; on Windows that step needs an Administrator shell
  • Previews every move and the relink with their resolved paths before anything runs, and refuses a destination that already exists, except for a case-only rename (Web → web), which a case-insensitive file system reports as existing because it is the same folder
  • Ends the printed commands with a call to the dashboard's /api/project/rename route, chained after the moves so it runs only once the folder has actually moved; the project's dashboard history and custom name then follow it to the new path
  • Adds a ports.py release for the dev-server claims a folder rename strands, since those claims are keyed on the folder name and the next deploy allocates new ones
  • Prints the commands rather than running them — moving the working directory out from under a live session would break it, so they are run from elsewhere and Claude reopened at the new location
  • Prints PowerShell alongside bash on Windows, bash alone on macOS and Linux; the PowerShell variant posts with Invoke-RestMethod and a UTF-8 charset, since Windows PowerShell 5.1 otherwise sends a non-ASCII folder name as ?
  • Skips the root data move for a project that has no ~/.claude/projects/ directory yet, while still moving any subfolder keys

Annotate

Opens any file in Plannotator's browser annotation UI, not just the markdown and HTML it takes natively. Anything else is wrapped in a temporary .md with its contents in a fenced code block, annotated there, and the temporary file deleted afterwards.

Command: /annotate <file>

Features:

  • Passes .md and .html straight through to plannotator-annotate; wraps everything else
  • Infers the fence's language tag from the file's extension using the mapping table in the skill, and emits a bare fence for an extension it does not recognize
  • Copies the file byte-for-byte into the fence — never transformed or summarized — so annotations line up with what is on disk
  • Treats returned annotations as referring to the original file; the temporary .md is a presentation surface only
  • Cleans up through trap/try-finally so the temporary file goes even on failure, warns before very large files, and refuses binaries

Update Plannotator Plugin

Force-updates the plannotator plugin by clearing stale caches and reinstalling. The plugin only — the plannotator CLI has its own installer, and neither path moves the other.

Command: /plannotator-update

Features:

  • Removes the marketplace cache (stale git clone that prevents updates)
  • Removes the plugin cache
  • Guides through reinstallation after restart
  • Repairs the install registry, which the reinstall does not: deleting the cache leaves installed_plugins.json naming a version and a path that no longer exist, so /plugin install reports "already installed" and writes nothing
  • Says what it does not cover, so a current plugin is not mistaken for a current CLI

Doppler

Manages env-style secrets — API keys, tokens, passwords, connection strings — in Doppler instead of a plaintext .env. Owns every doppler command template, so the coordinates and quoting are never reconstructed from memory.

Command: /doppler

Features:

  • Reads the real project and config list up front, so -p/-c are never guessed (the workplace name is not a project, and a new app is a config inside a shared project rather than a project of its own)
  • Emits a copy-ready, fenced command for every operation, with {{placeholder}} marking only what the user supplies
  • Offers the clipboard route first for a value only the user holds — it pipes clipboard → Doppler behind a prefix guard, so nothing occupies a command line — and the copy-ready command as the alternative, routed to a separate terminal because the ! prefix records the value in the transcript
  • Hands a stored value back to the clipboard without printing it, reporting a label, length and digest, and leaves a cb script that re-fetches it hours later when the clipboard has moved on
  • Prefers stdin over the command line, which also dodges Git Bash's path mangling on Windows
  • Reads values without materializing them, deriving a boolean via doppler run instead of printing the secret
  • Separate references for project wiring (doppler.yaml, directory binding, second-machine onboarding) and for failure modes that succeed silently with a wrong value

Ports

Hands out and records the TCP ports this machine's projects take, from one committed registry keyed by use case. Before it, nothing recorded who owned which number: five projects declared a dev port in a globally-gitignored config/deploy.env, others pinned theirs in a package script, a Rust default or a compose file, and the deploy skill's whole allocation rule was a regex guess over a package.json with 3000 as its fallback — which is printlab's dev port.

Command: /ports

Features:

  • claude/skills/ports/registry.json is the record and scripts/ports.py its only writer, with allocate / amend / get / list / release / check / repo-name / dev-use-case as the whole surface. repo-name prints the name a claim's owner spells for a repo so a shell caller asks rather than keeping a copy; dev-use-case prints the use case a project's dev server or its tailnet front claims, derived from the physical path of the directory it is launched from, and with --owner that claim's owner, so deploy-dev-server.sh and the dev-port command ask one definition rather than each building the name. allocate assigns and amend corrects: allocate is idempotent on the use case and never writes to a claim it found, because a launch script calls it on every run and prints the port alone on stdout to take the answer inline — so a --pinned or --front-for disagreeing with the record exits 1 and names amend, while a disagreeing --notes is dropped without a word, since the dev-port command sends a generic one at every launch. amend is what changes what a recorded claim says, never the number it holds: it needs one of --notes / --pinned / --front-for, refuses a use case the registry does not hold, re-checks the whole registry before writing so a change the gate would reject writes nothing, and reports changing nothing rather than passing over it in silence. A field it does not reach — the port, the owner, the scope, machines — is still a hand-edit of registry.json followed by check. What check cannot answer is whether a note is still true: it reads the document and this machine's ports, never a note against the repo it describes, so a dev-server note restating that repo's dev script goes stale the day that repo adopts 015, and the re-read belongs beside the /adopt walk that moves its number
  • Reads both the record and the machine, because liveness is an oracle in neither direction: at the 2026-10-05 survey nineteen file-claimed ports had no process behind them, so probing alone would reassign a port a project owns but is not running, while four live listeners were claimed by no file, so the record alone would hand out a number the OS already holds
  • Three scopes, since only one of them is a namespace where sharing is a defect — machine (uniqueness enforced), remote (a port on another host, recorded so a familiar number has an owner), and container (four apps sharing 3000 inside Docker networks is correct, and recording them stops it reading as a collision)
  • Refuses a number the WHATWG blocked set, the privileged range or the ephemeral range makes unusable, unless --pinned "<why>" records why that number and no other — a value an outside party fixed, such as a URL-restricted API key or a protocol default; a default compiled into a binary; or a literal in a file no launch path ever runs. That pin is also what lets the ports-from-registry rule allow the one literal a project cannot remove
  • Resolves a project's port at launch rather than storing it in the project: deploy-dev-server.sh asks for the use case ports.py dev-use-case prints and exports PORT, and the dev-port command, which the install puts on PATH, asks for the same use case so a hand-run npm run dev arrives at the same answer instead of starting on 3000 and drifting upward on a collision
  • Allocates the tailnet front port as a separate claim (the tailnet use case ports.py dev-use-case prints, --front-for <origin>), because a tailscale serve mapping takes the wildcard and tailnet addresses and leaves only loopback: a server fronted from its own number starts once and then cannot rebind, with every process listing showing the port free. shared/tailnet_publish.py refuses a same-number publish over a wildcard-bound origin and says so. Measured mechanics in claude/learnings/tailscale-serve-port-ownership.md
  • Answers "what is on port N?" with shared/port_probe.py verdict, which tries the bind as well as the listing — the holder no unprivileged lsof shows is a tailscale serve mapping's listener inside a root-owned system extension, and that is the shape of every "EADDRINUSE but the port is free" report
  • check reads the registry as a document; --live adds what this machine takes that it does not record, and --repo <path> reports both halves of the per-repo question: a port literal in a launch-determining file (package.json scripts, scripts/, a compose host publish, a Vite config, src-tauri/src/config.rs, build.gradle.kts), and an unpinned port the registry assigns that repo which no launch-determining file asks for. Which repo that is comes from its GitHub repository name, read from origin, so two clones in differently named folders are one repo; without a GitHub origin it comes from the main worktree's directory name. Never the basename of the path given, so a linked worktree and a subdirectory are both judged as the checkout containing them, and an owner naming several repos is matched as whole comma-separated tokens rather than as a substring. Both failures were silent in two directions at once — every pinned literal read as some other repo's while the genuine finding vanished, at the same count and the same exit status; the commands, and what still answers from the directory name, are in claude/learnings/git-identifying-the-repo-a-check-is-in.md. The files it reads are the ones the repo would commit — tracked and merely untracked alike, with the ignored ones left out, so a package.json inside node_modules/ is nobody's declaration while a resolver a migration has just written counts before it is staged. Reading the index alone reported a port nothing resolves and told the reader to copy in a dev.mjs already sitting in scripts/, which every v15 adoption hit, because a file not yet committed is unstaged when the gate runs: claude/skills/shared/commit.py clears the index on every call. The resolver is looked for in those same files, so a README or CLAUDE.md sentence naming the tool never passes for one. The second half is why the first is worth anything — a dev script with no -p and no resolver takes its framework's default and drifts on a collision, which two projects were measurably doing while reporting zero literals. Prose is deliberately out of scope: ten launch-path literals across the fleet against 134 in prose, examples and tests, so a scan that read everything would bury its own findings
  • Reaches project repos as the convention rule ports-from-registry, which version 015 introduces, so an adopted repo is checked at every commit without wiring anything and an unadopted one reads as unchecked rather than clean

Tests: python claude/tests/ports.py — exit 0 all cases behave, 1 otherwise. It asserts the allocator never hands out a number already claimed, already held on this machine, or unusable, and that it is idempotent on the use case and refuses a --pinned aimed at a claim that already exists, naming amend instead; that amend writes the fields it is given, refuses an unknown use case and an invocation with nothing to change, and leaves the claim untouched when the result would not pass the registry's own checker; that the per-repo check reports a port the registry assigns a repo which no launch-determining file there asks for, goes quiet once one does, keeps reporting it when the only mention of the resolver is a document naming the tool, counts an untracked launch file and ignores a gitignored one, and names the repo from its GitHub origin, ssh and https forms alike and from a subdirectory too, falling back to its main worktree so a pinned literal stays allowed when the scan is pointed at a linked worktree or a subdirectory, with an owner matched as whole tokens so one repo's name can no longer prefix-match another's claim; and separately that the committed registry.json passes its own checker, since that file is edited by hand as often as by the allocator and a duplicate claim there is a port given to two projects. The live probe is stubbed, so no case passes or fails on which servers happen to be running; this repo's .claude/commit-checks.sh runs ports.py check beside it as the half that does read the machine.

node claude/tests/dev-port.mjs covers the other half — the dev-port command every registry-resolved dev server starts through, which the suite above only ever names in a fixture. Both of its branches run for real against the real allocator under a scratch registry: that each delivers every argument whole when the command's own path and a --config argument carry spaces, that each exports the port the registry assigned, that the Windows branch hands cmd.exe one pre-quoted line rather than an argv array — asserted through the absence of DEP0190 as well as through the arguments arriving unsplit — that a shell metacharacter arrives as one token, and that an embedded double quote is refused by name on that branch while the argv branch carries it. run() picks its branch from process.platform, so each case spawns a driver that forces the value before importing the module, with a python stand-in on PATH because the same flag also chooses the interpreter the resolver asks for; the branch a host cannot drive is reported NOT COVERED in the summary line rather than counted as a pass. The technique, and what a forced platform does not move, are in claude/learnings/faking-a-platform-in-a-test.md. Two further cases redirect both home variables at a scratch tree to pin the resolver's own guard: a missing registry script reports an install, and a symlink resolving to nothing reports a repair and names the link, which is the state existsSync cannot tell from an absence and the one a moved dotfiles checkout produces. The command form runs through the launcher in claude/skills/ports/bin from a project's subdirectory, as npm run dev reaches it: it must ask for <project folder>-dev-server, the claim deploy-dev-server.sh asks for, record an owner, deliver its arguments, claim under the target's name when the project is entered through a differently named symlink, and refuse an empty command by naming the usage.


Hooks

Authoring guidance for Claude Code hooks — picking the event and matcher, keeping the per-invocation cost down, and the never-raise contract a hook script owes the harness. Invoked when writing a hook, editing a hooks entry in settings.json, or diagnosing one that never fires or fires too often.

Command: /hooks

Features:

  • A narrowing ladder that puts the zero-startup if rule first, the matcher second, and an in-script early return last
  • Measured cost tables for every implementation choice, so an interpreter is picked on evidence rather than intuition (references/performance.md)
  • Event catalog with cadence, matcher targets, timeouts, exit-code semantics and the stdin payload shape (references/events-and-payloads.md)
  • A frequency table pairing each event with the cost budget it can bear, from per-streaming-chunk down to once per session
  • The never-raise contract, plus the rule that hook errors are silent — so anything consequential logs to disk
  • A findings log that accumulates each surprise (a cost, a silent failure, a semantic) instead of leaving it in a session transcript

Skill Authoring

Conventions for writing and changing skills — the directory shape, the frontmatter, how the description controls auto-invocation, and what belongs in the body rather than a reference file. Read before creating or modifying any SKILL.md.

Command: /skill

Features:

  • Fixes the layout: SKILL.md as the entry point, optional scripts/ and references/ beside it, shared resources in skills/shared/
  • Treats the un-ignore line as part of creating a skill rather than a final step — an allowlisted skills directory leaves a new skill untracked and invisible, and the skill-tracked.py hook is a net, not the plan
  • Spells out the description field's double duty — the skill list and the auto-invocation trigger — with explicit TRIGGER when / DO NOT TRIGGER when conditions
  • Names a skill for its scope, splitting one that carries a narrow procedure under a generic name so the narrow skill's DO NOT TRIGGER clause cannot shut the general case out of the knowledge both need
  • Tabulates the frontmatter that decides where a skill runs — context: fork, agent, model, effort, background, user-invocable, disallowed-tools, paths — so a forked, cheaper, read-only or Claude-only pass is configured rather than hand-built out of Agent calls
  • Points at claude/learnings/claude-code-skill-profiling.md for what a skill costs in wall-clock seconds and how to attribute it, measured with claude/scripts/profile-skill-run.py against a session transcript
  • Covers injecting dynamic context through ! commands, and what that costs on every invocation
  • Points at references/claude-project-memory-paths.md for the ~/.claude/projects/<project-id>/ mangling rule, so no skill re-derives it, and at claude/skills/shared/transcripts.py, which every Python script that opens a transcript imports for the rule and for reading records
  • Carries the checks owed before writing anywhere shared — whether the destination is published, and which gitignore scope applies — plus the cross-platform rules for scripts that run on both Windows and macOS

Skill Outputs

Collects what a skill actually printed across every project's sessions since a given moment and shows it on one tailnet page, so a change to a skill's output format is judged against real runs.

Command: /skill-outputs

Features:

  • Lists one tab per run, labelled with its project and local time, and renders the selected run's markdown beside it; a summary shown as a page, which never reaches chat as text, is found by the write of its wrap-up-summary.json and rendered back into the same markdown, its recommended choices in bold and each row's folded detail after its table
  • Builds a toggle for each section from the headings the runs actually use, so hiding one section hides it in every run, and summaries written before and after a format change both split correctly
  • Takes the moment from the skill's own history when the user names a change rather than a time
  • Recognises /wrap-up's summary only; the script is generalised against the next skill when one is asked for, not ahead of it

Adopt

Brings one repo into the shape the conventions in this repo currently require. Each change an already-conforming repo has to act on ships as a numbered version — one folder of prose under claude/conventions/versions/, written as instructions an agent follows — and /adopt, run in the repo that is behind, walks the versions that repo has not adopted yet and commits the record through claude/skills/shared/commit.py. What a version hands over for good is a rule, run from then on by the checker in that repo's commit gate.

Command: /adopt, or /adopt unattended for a walk nobody is watching

Features:

  • Keeps a repo's whole convention state as one integer in a committed .claude/conventions — a version is a migration, so it ran here or it did not, and the number says how far. One file and nothing beside it: a property that is per-machine rather than per-repo can never be a migration, since no number could be true of both machines at once, so it becomes a universal rule instead
  • Lets a fork — origin the user's, upstream someone else's — decline a version whose README says optional: forks, as a decline <n> <reason> line under the number, so a fork staying close to its upstream can leave out a Node pin or a LICENSE the upstream never asked for. The version decides whether the choice exists and the fork only answers it, checked when the decline is written; after that the decline travels with the repo, since the upstream remote that makes it a fork is never committed. The checker runs none of a declined version's rules. A third-party clone stays out of every version, with no choice offered
  • Advances that number by exactly one per version, through a command that refuses to lower it, to skip, or to name a version this dotfiles checkout does not have — a walk cannot leave the record claiming a migration nobody read
  • Reads each version's prose in full and performs the migration itself; a version carries a script only where the work is mechanical and tedious, and every mutation is shown before it happens and applied only on a yes, except in an unattended walk, below
  • Settles "does this apply here" on the positive evidence the version names, so "nothing found" can never be read off "nothing looked at" — and a version that does not apply is still decided, with the number advancing and nothing mutated
  • Puts a version's question to the user verbatim wherever no file can settle it — whether a deleted backlog file is restored or was emptied deliberately, whether a missing LICENSE is deliberate — with what the repo holds that bears on it laid out beside it, and never answers it on their behalf
  • Runs unattended as /adopt unattended. Each version's README declares in its required asks: frontmatter whether its migration needs the user — never, always, or when <case> — and engine.py prints that line under each version it lists. The walk adopts versions until the first whose question holds in this repo, commits what it adopted, and ends with that question and its evidence instead of asking. A rewrite or deletion of a committed file needs no yes there, since the commit is local and reviewed before any push, and each one is listed in the report; deleting a file git does not track still stops the walk, except a wrapper the version names as holding nothing it did not carry elsewhere, such as v17's standard pass-through
  • Stops on a branch behind its push target, where a migration's delete merges cleanly against the other machine's append and loses it in silence — but never on a dirty tree, since the record and the pending change are meant to commit together. The push target is the branch this clone pushes to, which in a fork that pulls from the third-party project is not its upstream
  • Walks one clone of a repo, never both. A repo behind on conventions is behind in both clones, so the session-start notice fires in both, and two walks from one base migrate the same files twice and write two records claiming the same number. The machine the user typed /adopt in walks; the other clone takes that commit through /pull, which the push step of the next /yolo or /wrap-up asks its session for. It reads /repo-status to find out whether the peer is already walking — a question about convention records, asked after the behind-its-push-target gate rather than instead of it, since that one is about commits — and a peer it cannot reach is reported as unmeasured rather than taken for an all-clear
  • Hands every continuing property a version defines to claude/conventions/check.py, which runs the rules the repo's number entitles it to on every commit, reports a rule that could not look as UNMEASURED rather than as a pass, and is the reason there is nothing here to re-sample by hand
  • Keeps a second, ungated class of rule in claude/conventions/universal/ for the properties no number could ever be true of — the memory-cache link is per-machine, so a fresh clone has genuinely not made it and a cleared cache breaks it years after any adoption, and the install links are the same shape one step closer to home, since v9 tells every repo to dial ~/.claude/conventions/check.py and the gate therefore reads one of those links to run at all. These run in every repo whose gate calls the checker, whatever its number, fail that gate exactly as a versioned rule does, and each names the command that repairs what it found, since a repo meeting one for the first time has no version prose to read. Reaching every such repo with no adoption in between is the price, so anything a repo can adopt stays a version
  • Lets a tool gate itself on the adopted number — it names the version it needs as a constant beside the code that reads the format, so a repo that has not migrated is refused rather than silently read with the wrong parser
  • Enumerates what can never carry a version at all — agent behaviour, code content, unbounded properties, global settings — in claude/conventions/not-versioned.md, so "current" means every versionable convention has been decided rather than every rule in CLAUDE.md being satisfied

Full guide: Conventions — how the system works: what a version is, what the record holds, how the notice → /adopt → commit loop runs, and where the checker takes over. What the conventions require is the companion list — the set as it stands, one line per version, whether each can stop to ask you something, and which of them keep being re-checked.

Authoring a version: claude/conventions/authoring.md — the contract for adding one: the narrow test for when a version is owed at all, which half of a change is a migration and which is a continuing rule, the folder's four mandatory sections and its required asks: field, the rule signature, and the two things every rule has to get right.

Authoring gate: python claude/conventions/tests.py — exit 0 the version set and its rules are sound, 1 otherwise. It asserts that every version folder parses and the numbers run contiguously, that all four mandatory sections are present, that every version declares a well-formed asks: field and the requirements page's asks column matches it, that the requirements page ticks its fork column exactly where a version says optional: forks, that versions and rules name each other in both directions, that only a fork may decline and only such a version, that a universal rule is introduced by no version and names the command that fixes what it finds, and that each rule comes back clean on a conforming tree, non-empty on each violating one and raising on a tree where git cannot answer — each built in a temp directory by the test itself, so no broken fixture tree is committed. This repo's .claude/commit-checks.sh runs it alongside every other check in that script — claude/conventions/check.py, the tests under claude/tests/, and the self-checks the scripts under claude/scripts/ carry — so a version that would edit every other repo on the machine cannot be committed here untested.


Tune Output

Changes how Claude's replies are shaped — adopting, revising or rejecting a response-style rule — and records each pass in a ledger, so the next one starts from what was already measured rather than from scratch.

Command: /tune-output

Features:

  • Keeps a ledger whose two most useful fields are the rejections and what evidence would re-open each one, since a rejection nobody wrote down gets re-proposed within months
  • Routes a rule to one of four homes from a decision table — the output style for shape, the Overused Phrases section for a banned phrase, a memory file for a preference with a why, and CLAUDE.md for anything a subagent must also obey
  • Records the verified mechanics behind that table in references/mechanisms.md: why CLAUDE.md is not system-prompt level, why a missing keep-coding-instructions: true silently drops the built-in engineering instructions, and why an unresolvable style name is a no-op that looks like a working session
  • Tests a candidate before it ships, with both arms loading the real global CLAUDE.md — a config-less baseline measures the rule against a bare Claude and flatters it
  • Renders the two arms side by side with the sides shuffled per pair and the mapping written only to a key file, so the read is blind for whoever ran it
  • Requires trap cases, not just preference cases: an under-determined failure and a completion report whose items only look verified are what catch a rule that makes the model assert more than it knows
  • Names every rule for the behaviour it produces rather than for a characteristic of the reader, because this repo is public and a commit cannot be taken back

Transcrypt

Encrypts designated files with transcrypt so they are ciphertext in git history but plaintext in the working tree, or unlocks an already-encrypted repo after a fresh clone. See Encrypted memory for how this repo uses it.

Command: /transcrypt

Features:

  • Uses one shared passphrase from Doppler (tools/prd → TRANSCRYPT_KEY), never a freshly generated one
  • Marks files by the *.secret.* naming convention in .gitattributes
  • Verifies the index holds ciphertext while the working tree stays readable, and stages without committing
  • Relies on the global pre-commit guard as a safety net against committing an unencrypted secret
  • Silences OpenSSL's deprecated key derivation warning by pointing transcrypt.openssl-path at an idempotent shim, rather than touching the KDF — so blobs stay byte-compatible with a machine running stock transcrypt

Notion

Works with Notion through whichever of its two APIs can actually do the job — the MCP integration by default, and the internal v3 API (token_v2 cookie, /api/v3/) only for operations MCP cannot express.

Command: /notion

Features:

  • Routes each operation to a surface from a decision table up front, so v3 is a deliberate choice rather than the first thing tried after an error
  • Names the closed list of v3-only operations — select-option recolor and removal, date formats, reminders, conditional row colours, column widths, grouped views, trashing a row or view, and bulk row edits
  • Flags the two operations impossible on both surfaces (column text alignment, enabling Sub-items) so neither gets chased
  • Treats MCP as destructive too, calling out the three calls that wipe data despite MCP having no delete verb
  • Degrades to the MCP half alone when the notion_tools package or the v3 token is missing
  • Separate references for the MCP surface, reading data, and v3 transaction recipes

Transcript History

Searches and reads past Claude Code conversations on both machines, including sessions Claude Code's retention has already deleted from ~/.claude/projects, and lists the projects worked in recently. The archive and its query script live in the private transcripts repo, which must be checked out beside this repo; without that checkout the skill stops and says so.

Command: /transcript-history

Features:

  • Lists a project's sessions, searches them for terms, and prints one session, with or without the tools each reply used
  • Lists every project worked in over the last N days (default one) on each machine, with its last prompt
  • Defaults to the current repo's project, with --project for another one and --machine local to skip the other machine
  • Reports a machine it could not reach as NOT COVERED, so a negative result never reads as a search of both
  • Read-only: never writes to the archive, which holds the only copy of some sessions

Hooks

External Hook Paths

When a hook command needs a path outside ~/.claude/ or this repo, reference it via a CLAUDE_<NAME> user-scope environment variable instead of hardcoding the absolute path. The hook command field is executed via shell, so standard $VAR expansion works — the same mechanism that already makes $HOME/.claude/hooks/... portable across machines.

Why: claude/settings.json is symlinked to ~/.claude/settings.json on every machine that uses this repo. Hardcoded absolute paths pin it to one user's filesystem layout; env vars keep it portable, and a repo move or rename only touches the env var (not every hook entry).

Caveat: This works for hook command strings only. It does not work for MCP server args in ~/.claude.json — those are passed straight to child_process.spawn() with no shell, so paths there must be absolute. That file is not symlinked from this repo.

Currently used env vars — set these on a fresh machine before the corresponding hooks will work:

  • CLAUDE_AI_AGENT_DASHBOARD — points to a local clone of the tauri-dashboard repo. Every hook entry in claude/settings.json that runs its integrations/claude_hook.py reads it: the session-lifecycle and tool events feed live session-status updates, and PostModelSwitch tells the dashboard which model a session switched to.
  • CLAUDE_LANDLORD — points to a local clone of the landlord repo, which owns the shared-host tenancy rules Ingress Lint delegates to. Optional, and only consulted for a repo that publishes a vhost: the lookup falls back to a landlord sibling of the repo being linted, which is the layout both machines already have. Unlike CLAUDE_AI_AGENT_DASHBOARD, leaving it unset is not free — the tenancy half then reports NOT CHECKED rather than passing quietly.

Set on Windows (User scope, persistent):

[Environment]::SetEnvironmentVariable('CLAUDE_AI_AGENT_DASHBOARD', '{{path-to-tauri-dashboard}}', 'User')

Set on Linux / macOS (in your shell profile):

export CLAUDE_AI_AGENT_DASHBOARD="$HOME/projects/tauri-dashboard"

Install Check

File: claude/hooks/check-install.py

A SessionStart hook verifying every symlink, git setting and PATH entry the install blocks create — each link in those blocks, core.hooksPath, core.excludesFile and core.attributesFile, and the PATH_DIRS list. A PATH entry is read off the hook's own environment, so a shell started before the install reports it missing. The install-links-present rule, which every commit gate calling the checker runs, reads the links and git settings and leaves the PATH entries out: they serve a project's dev script rather than a commit, so a machine lacking one is told here at session start and still commits everywhere. Silent unless something is broken; it also runs by hand as python ~/.claude/hooks/check-install.py, where it prints a pass/fail line per check.

A missing link is silent in a way that looks like working software, and each one fails differently: no output-styles link leaves outputStyle in settings.json resolving to nothing, so response-style rules apply on one machine and not the other; no memory link sends saved memories outside the repo; no learnings link makes every lookup come back empty as though nothing had been written down. None of it shows in git, because the links are machine-local while the settings depending on them are committed and identical everywhere.

  • Paths are compared by inode (os.path.samefile), never as strings. These links store projects where the disk spells it Projects, so a textual comparison passes or fails depending on whether the script was reached through the symlink or from the repo. The inode test also catches a "link" that is really a copy — what Git-Bash ln -s leaves behind on Windows, and what every textual check calls healthy.
  • A link the OS refuses to follow is reported, not crashed on. Windows declines to follow a reparse point created by a non-administrator, samefile raises on one, and realpath then raised again from inside the handler explaining it — which exited 0 with no output at all, so a broken install read as a clean report. Three links were in that state on the Windows machine while this printed nothing. The check now names the refusal and where the link points; a crash anywhere in it prints the traceback by hand, and says the install is unverified as a hook.
  • No matcher, deliberately. The events reference lists | among the characters that keep a matcher an exact string, which would make startup|resume match nothing and the hook silently never fire; an absent matcher is the one form certain to run. A broken install is a persistent state rather than a passing event, so re-reporting it after a /clear is honest rather than noisy.
  • It cannot verify ~/.claude/settings.json or ~/.claude/hooks when run as a hook, since it is reached through them — but nothing else runs either when those are broken, so the hook firing at all is what vouches for them. Run it from the repo to check them for real.

Adding a link to the install blocks needs a matching line in the script's LINKS list, and adding a PATH entry a matching line in PATH_DIRS, which are the only other copies of that contract — and claude/tests/install-links.py, run by this repo's commit gate, fails the commit when they disagree or when the Windows and Linux blocks install different sets. That check exists because the conventions link was in both blocks and in neither list, so it was never created on either machine and this script called the install clean on both.


Conventions Check

File: claude/hooks/conventions-check.py

A SessionStart hook comparing two integers: the newest convention version in this dotfiles checkout, and the highest one the current repo has recorded. Silent when they agree. When they don't, it prints the gap and offers /adopt — at most five bullets and then ... N more, because a line per pending version at every session start is a wall nobody reads.

It runs no subprocess at all: the repo root by walking up for a .git, .git/config as text for the origin owner, the record file, one listdir of the versions directory with a head-read of each README's frontmatter, and this checkout's .git/HEAD for a short sha. Every message that claims a "latest" version names that sha, so that claim is never unqualified — the diagnostic messages, which name no version, carry no sha. It verifies nothing: whether the repo still holds the shape its number claims is the checker's question, asked at every commit rather than at every session start.

  • "Unrecorded" and "v0" are different facts and get different lines — a repo with no record file is asked to record where it stands, while one at v0 is told how far behind it is.
  • A record naming a version this checkout does not have means the dotfiles repo is behind, not the project. It says so and withholds the /adopt offer, since adopting against a stale version set records a repo as current against a latest that has already moved.
  • A directory with no .git is told once, and only where a .claude/ or a CLAUDE.md is present, so a scratch directory stays silent while a real project directory stops being outside the system with nothing anywhere saying so.
  • A record it cannot read at all — a content line that is neither a number, an exempt reason nor a well-formed decline line under a number, a permission bit, bytes that are not UTF-8 — names what stopped it and withholds /adopt, and so does a version set that will not load; an exempt record, or an origin owned by anyone other than the user, is silent.

The message is a systemMessage, so it reaches the screen and never the transcript; /adopt re-derives the gap itself rather than trusting what was pasted into it. The notice's shape and what its silence means are in Conventions.


Doppler Guard

File: claude/hooks/doppler-guard.py

A PreToolUse backstop on Bash, Write, and Edit. Hook matchers scope by tool name only, so the script self-filters: it exits silently unless the call's command, content, or path mentions Doppler anywhere. It has no if gate, because an if pattern cannot see a heredoc body, and a doppler secrets set inside ssh host <<'EOF' would then never reach the script. That costs one interpreter start on every Bash call.

When it matches, it does two things:

  • Injects the conventions — a condensed reminder citing the Doppler skill, so a wrong project or config gets corrected at the moment of the command even if the skill was never invoked.
  • Denies a doppler secrets set/delete that omits --silent — without it Doppler prints the full secrets table, every value included, into the transcript. The deny inspects only the Bash command, so prose or docs that merely mention the command still get the reminder rather than a block, and a bare -h/--help is exempt since usage output carries no values. It judges each command bash would run, read through claude/hooks/_shell.py, which it shares with the Secret Print Guard. So a write inside a loop or a subshell, or sent over ssh, is caught too, while a commit message or a heredoc describing one is not.

Windows Link Guard

File: claude/hooks/windows-link-guard.py

Windows does not follow a reparse point created by a non-administrator — RedirectionGuard, WinError 448 — and it refuses a symlink exactly as readily as a junction. A link made from an ordinary Git Bash is therefore created, resolves from the shell that made it, and raises in whichever process has to read it next. Measured 2026-09-18 on the Windows machine: three of the twelve ~/.claude install links and all 19 project memory caches were in that state, and the one that surfaced dropped a whole machine out of GitHub Status while leaving /adopt unable to load its own engine there.

A PreToolUse on Bash, gated by four if patterns — powershell *ItemType*, pwsh *ItemType*, cmd * and mklink * — so an ordinary command never starts the interpreter. It exits silently off Windows, and on a command that merely names the verbs rather than running them, since grep -rn "New-Item -ItemType Junction" is not an invocation. Otherwise it asks PowerShell whether this shell is elevated and, when the answer is no or unobtainable, blocks with exit 2, quoting the command it saw and naming the elevated form to run instead.

The if gate is best-effort and fails open — a command the harness cannot decompose reaches the script whatever the pattern says — so the script's own match is what decides, never the gate. It also only ever sees what Claude runs: a link made by hand in a terminal is caught later instead, by Install Check for the ones under ~/.claude and by the memory-cache-linked rule for each repo's own cache.


Secret Print Guard

File: claude/hooks/secret-print-guard.py

A printed secret has left the machine, and the only remedy is rotating it. This refuses the Bash commands known to print a repository's git config, where a transcrypt repo keeps its passphrase as transcrypt.password, each with the form that answers the same question safely: git config --list in any spelling, git var -l, a --get-regexp whose pattern reaches a secret key, a read of a secret key by name, transcrypt --display, any reader or redirection taking .git/config as a file (directly, or through a loop variable, xargs or find -exec), and the Read tool on that file. git config --get <key>, git config --list --name-only and --global listings run as normal.

A PreToolUse on Bash, gated by the if patterns *config*, *transcrypt*, *var -l* and *var --list*, and on Read, gated by Read(//**/.git/config), all with a 5-second timeout, so a call that matches none of them never starts the interpreter. The script judges the simple commands bash would run, which claude/hooks/_shell.py finds by tokenizing the way bash does. It shares that module with the Doppler Guard. It sees commands inside loops, subshells, $( … ) (also within double quotes), process substitution, unquoted heredocs, wrappers such as xargs, and scripts handed to another shell: ssh host '…', bash -c '…', eval, a heredoc fed to ssh or bash (once the guard has been started, which a heredoc alone never does), find -exec. It never takes quoted text, a comment or a quoted heredoc's body for a command, so a grep for these commands, or a commit message describing them, runs.

It is a net rather than a wall, and its docstring lists what it cannot see. The two limits that matter most are a script that loads a config and prints part of it, and a recursive search from a repository root such as grep -rn password ., which reads .git/config without naming it; the feedback_never_dump_secret_bearing_config memory covers both. A listing inside a script fed on a heredoc, such as ssh host <<'EOF', is missed too, because the if patterns see neither a heredoc body nor its <<, so nothing starts the guard. Nor does it see a skill's ! Context command, which runs when the skill loads, before any hook. claude/tests/bash-guards.py runs every one of those through the guard at commit time instead. The /transcrypt skill printed the shared passphrase that way on every load until the same day the guard was written.

Tests: python claude/tests/bash-guards.py — exit 0 when every pinned decision of this guard and the Doppler Guard holds, and no skill's Context command would be refused, 1 otherwise.


Skill Tracking

Files: claude/hooks/skill-tracked.py and claude/scripts/audit-skill-tracking.sh

A skills directory is ignore-everything-then-allowlist (claude/skills/* plus one !claude/skills/<name>/ line per skill), so a skill whose line was never added is invisible: it never appears in git status, nothing signals the omission, and the only copy stays on the machine that made it. Two complementary guards:

  • The hook — a PostToolUse on Write, gated by "if": "Write(//**/SKILL.md)". It asks git the moment a SKILL.md is written and names the exact file, line and pattern doing the ignoring. The if rule is what keeps it affordable: a matcher scopes by tool name alone, and on Windows an unfiltered Python hook costs ~200ms of interpreter startup on every edit. That pattern must stay root-anchored (//) — an unanchored **/SKILL.md matches nothing and silently disables the hook.
  • The audit script — a sweep over every skill directory regardless of how it arrived (copied, moved, renamed, or unpacked by a plugin), which is the case the hook cannot see. Run by /wrap-up while it prepares its summary, and standalone with bash ~/.claude/scripts/audit-skill-tracking.sh. It prints one line per skill a wildcard rule is swallowing, and nothing when all are accounted for.

A flagged skill is cleared one of two ways, both durable: add !claude/skills/<name>/ to .gitignore to keep it, or record its directory name in claude/untracked-skills.local.txt to keep it machine-local on purpose. That decisions file is itself gitignored and per-machine, since which skills are deliberately unshared differs between machines; a fresh clone has none and decides each skill again there. Symlinked skills and those matched by an exact, wildcard-free path are filtered out without needing an entry.


Local Time

File: claude/hooks/local-time.py

Logs, git's ISO dates and most JSON store UTC, and these machines run hours behind it. The rule to report times in local time sits in an always-loaded memory and still gets missed: the model rewrites 12:45:41Z as a friendly "12:45" and never shifts the zone. This hook repeats the rule at the moment such a timestamp enters the context, scoped to what the user is told, since the same value written into a file, code or a message to another agent must keep its zone.

A PostToolUse on Bash, Read and Grep. It finds every timestamp in the tool's output whose zone is stated and differs from the machine's (a trailing Z, UTC, GMT or a numeric offset), in ISO form, git's default Thu Oct 16 12:45:41 2026 +0000, or the Thu, 16 Oct 2026 12:45:41 GMT of HTTP and mail headers, and adds the reminder as additional context, hidden from the user. It skips the bashEditDiff field a Bash response carries for the files the command changed, which is the model's own writing. No if pattern can narrow it, since a command's text does not predict whether its output holds a timestamp, so it starts on every call of those tools; it does one regex pass and no IO, about 18 ms on the Mac. A timestamp written in UTC with no zone marker, and a Unix epoch number, look the same as a local time and a plain integer, so neither raises the reminder.

Tests: python claude/tests/local-time.py — exit 0 when the reminder fires on every foreign-zone case and stays silent on every local or zone-less one, 1 otherwise.


Model Default Guard

File: claude/hooks/model-default-guard.py

Enter in the /model picker saves the pick as the default for new sessions, where s applies it to the running session only, and the two keys sit side by side. A misclick writes model and modelSettings into ~/.claude/settings.json, which is this repo's claude/settings.json through the install link, so the default changes on both machines once the file is committed or synced. The model and effort keys are kept out of that file on purpose: the model is pinned by ANTHROPIC_MODEL, and the effort level is picked per session.

A PostModelSwitch hook, registered async: true since the event cannot block. After every model switch it deletes model, modelSettings and the older effortLevel from the settings file it reaches through the link, writes the rest back as two-space JSON with LF endings, and logs each removal to ~/.claude/model-default-guard.log. Measured on Claude Code 2.1.322, the save is on disk before the event fires, and the rewrite leaves the saving session and any other open session on the models they already run. An effort-only change, through /effort or the effort control inside the picker, fires no hook, so a saved effort level stays in the file until the next model switch.


Workflow Realism

File: claude/hooks/workflow-realism.py

A review loop that verifies and fixes on its own shows its findings to nobody, so the rule that rare, cheap-to-handle edge cases get a warning rather than code never gets a chance to apply, and every confirmed finding is coded. This PreToolUse on Workflow warns, without blocking, when an inline script (or the file a scriptPath run names) has a stage that fixes findings — "fix these confirmed defects", "apply fixes for these findings" — and mentions none of frequency, reached_by or the saved review-auto workflow. The fix verb has to take findings, defects, issues or bugs as its object, so "fix every compile error and test failure" in an implementation workflow does not count. Any mention of those three words silences it, whatever the script uses them for. A script that only reviews code — an adversarial or refuting stage, or a review of a diff, changes, commits or a branch — and never names review-auto gets a second warning pointing it at that workflow's fix: false mode, since only that workflow is widened by the review scope hook. Mentioning frequency or reached_by does not silence that one. The warning reaches the model as additional context, names that workflow and points at claude/skills/shared/review-auto-args.md for building its args; the run goes ahead either way. A run by name is not judged.

It is synchronous because a backgrounded hook cannot deliver context, which is affordable only because the matcher limits it to Workflow calls.

Tests: python claude/tests/workflow-realism.py — exit 0 when every case behaves, 1 otherwise.


Review Scope

Files: claude/hooks/review-scope.py, claude/scripts/review_scope.py

Small changes get pushed without a review, and a review scoped to the uncommitted diff would never see them. Each repo therefore carries a review bookmark: the ref refs/review/last, pushed to origin so both machines share it, pointing at the last commit whose content a review covered. This PreToolUse on Workflow fires when a call names the saved review-auto workflow. It brings the local bookmark up to origin's, appends every commit after it to args.scope, and passes the base, the tree at launch and the scope as the call wrote it as args.review_bookmark; a fix-diff round quotes that unwidened scope for context, since the appended commit list would tell its reviewers to re-read the whole range. The rewrite goes back as updatedInput, so the range is in the review whatever scope the model wrote. A call that already carries the hook's own rewrite passes through unchanged, and one whose scope already ends in the commit list keeps a single copy of it. Both are for auto mode: a call its classifier decides is refused once the hook has rewritten it, and the model is told to resend it as written, which runs only if the hook then changes nothing. A call an allow rule admits runs rewritten the first time. The /wrap-up and /review-manual skills list Workflow in their allowed-tools, a grant that reaches only calls made in the turn that invoked the skill (claude/learnings/claude-code-auto-mode-permissions.md says what ends that turn), so a relaunch or resume by name made in a later turn goes to the classifier and depends on that pass-through (the dated entry in the Hooks skill's findings log has the mechanics). A resume by scriptPath, the form claude/learnings/claude-code-workflow-recovery.md gives for a run whose agents died and the one /wrap-up follows, names no workflow, so this hook never sees it and the run gets only the args the call carries, which hold the commit list and the review_bookmark when they are copied as that file describes. The repo is args.repo when the call names one, else the project directory.

The bookmark moves in two later steps, and only forward over code a review saw:

  1. When a run finishes with every lens answered and every finding verified, its last agent runs review_scope.py mark, which records the reviewed tree in .git/. In fix mode the run must also have ended on a quiet round with its gate passing, since fixes no later round reviewed are unreviewed code; a run that reaches its round cap gets one verify-only round over its last fixes, and counts as converged when that round finds nothing fix-class. The record also says whether the workflow's polish ran over that tree, which change_scope.py reads so /wrap-up skips its own /clean-code and /docs-relevance passes.
  2. /wrap-up and /yolo run review_scope.py layout while grouping, as claude/skills/shared/commit-grouping.md describes, and commit the recorded tree exactly as reviewed: claude/skills/shared/commit.py --reviewed stages those paths from the recorded tree itself through review_scope.py stage-reviewed, and every change made after the review goes in follow-up commits, with a confidentiality fix the one exception. After its commits it runs review_scope.py advance, which moves the bookmark to the newest commit since the review's base whose tree is exactly the recorded one, leaving any follow-ups for the next review, and claude/skills/shared/push.py runs review_scope.py push after a successful push. The record also holds the HEAD it was made on, and layout offers no split once HEAD has moved, since the reviewed commit would then revert whatever arrived, such as the other machine's work pulled in by /yolo's or /wrap-up's remote sync.

A partial commit, an edit folded into a reviewed commit (the confidentiality fix included) or a commit made with no review_scope.py advance after it leaves the bookmark behind, and the next review covers those commits again; follow-up commits after the reviewed one do not hold it back. When no base can be trusted, because origin cannot be read or history was rewritten past the bookmark, the hook says so to the model and passes no review_bookmark, so that review is never recorded.

Every skill that pushes ends its report with review_scope.py status, one line giving the local and origin bookmarks and whether they agree, how many commits on HEAD the next review covers — counted from origin's bookmark when it is newer than the local one, so the count is the one the next plan takes — and any recorded review still waiting for advance, with the reason when advance would refuse it. The skill quotes beside it any not advanced or not pushed line the run printed. A skill pushing through claude/skills/shared/push.py gets that line as the script's last; any other points at claude/skills/shared/review-bookmark-status.md, which holds the command, and claude/tests/push-notifies-peer.py fails the commit gate when a skill the push rule clears does neither, or the file or the script no longer runs the command.

Tests: python claude/tests/review-scope.py runs the script and the hook against a bare origin and two clones.


Ingress Lint

Files: claude/hooks/ingress-lint.py and claude/scripts/ingress-lint.py

Where several projects share one box behind one reverse proxy, a generic name is a claim on a namespace someone else uses. Docker Compose publishes a service's name as a DNS alias on every network it joins, so two projects that both call a service app each publish an app alias and the proxy resolves whichever the daemon hands back — a resolver searches every network the asking container holds, so giving each tenant a network of its own leaves the proxy straddling both claims; a vhost dropped into a common conf.d is separated from its neighbours only by its basename. The failure is silent and stays green — HTTP 200, healthy containers, caddy validate clean — which is why it is caught at the moment the name is written rather than afterwards.

  • The rules live in claude/scripts/ingress-lint.py, a stdlib-only checker (Claude Code hooks run python -S, so PyYAML is not importable and the small YAML subset is read by hand). Run it over files or repo roots: python ~/.claude/scripts/ingress-lint.py [path ...] — exit 0 clean, 1 violations, 2 nothing to check. This is also what a repo's .claude/commit-checks.sh should call.
  • The hook is a PostToolUse adapter that feeds the checker one just-written path. It loads the rules by path instead of copying them, so there is exactly one copy. It is not registered in settings.json by default — its docstring carries the entry to add, along with the three things that fail silently if you get them wrong (the mandatory // root anchor, if belonging inside the hook object, and "async": false being set explicitly because a backgrounded hook cannot deliver additionalContext at all).
  • The tenancy rules are not implemented here. What a vhost may claim inside a shared conf.d belongs to the landlord repo, whose on-box gate enforces it; this checker loads landlord/bin/vhost-lint.py by path and applies it to the single file VHOST_SRC in config/publish.env names, so the two cannot disagree. A Caddy file the repo has answered for — it names a different one, or names none via an empty VHOST_SRC= — is skipped in silence, since a keyless global-options block, a snippet definition and a port-only address are all legitimate when you own the proxy. Every other way the rules fail to run is NOT CHECKED, never a bare "clean": no landlord checkout, no declaration at all, or a declaration naming a file that is not there. That third state is what the checker is for — an undeclared live tenant printed clean (2 file(s) checked) over a vhost no tenancy rule had touched, character-for-character what a real pass prints. See CLAUDE_LANDLORD.

Tests: python claude/tests/ingress-lint.py — exit 0 all cases behave, 1 otherwise. It pins the compose rules, the delegation, the silent skips and all three NOT CHECKED paths, and it stubs landlord so it runs on a machine with no checkout.

Related: claude/scripts/identity-check.py is the other half — the same problem checked from outside instead of prevented at the source. Given a per-host manifest it asserts, for every hostname on a box, that the host's own marker is present and that every other tenant's marker is absent; the second half is what turns "up" into "up and correct". The /publish skill wires it in via IDENTITY_CHECK. The manifest is per-host data and is passed in rather than kept here — see the note in Global Installation.


Git Hooks

Pre-Push Validation

File: git/hooks/pre-push

Prevents pushing commits that are Claude-attributed, not GPG-signed, or, in a repo carrying a conventions record, badly worded or carrying private content. Every new commit in the push — one that none of the destination remote's tracking refs holds, so a ref moving over commits already published there (the review bookmark passing main) re-checks none of them — is checked for:

  • Author or committer name/email containing "claude" or "anthropic"
  • Co-Authored-By trailers mentioning Claude or Anthropic
  • Missing good GPG signature (only G status passes)

A push that names a URL rather than a configured remote has no tracking refs of its own, so there a commit held by any remote's tracking refs counts as published and goes unchecked.

It then checks every new commit's message against the countable half of commit-message-rules.md, by running claude/scripts/check-commit-message.py over the pushed range — subject length and prefix, a capitalised or period-terminated description, the blank line, and the body's paragraph count, line count and width. A message cannot be corrected by a later commit, so the refusal names /reset as the route: bring the commits back into the tree and re-commit them. Only a repo carrying a .claude/conventions record is held to it, since core.hooksPath points every repo on the machine at this hook and a third-party clone keeps its own style. A missing checker is reported as unchecked rather than passed, and the signature and attribution checks still run. claude/skills/shared/commit.py runs the same script on every message before it commits, so the block is a backstop rather than the first notice.

In a fork — origin the user's, upstream someone else's, as python ~/.claude/conventions/engine.py fork <repo-root> decides it, the same answer /adopt gets — commits reachable from the upstream remote are exempt from every check above. A rebase onto upstream pushes the upstream author's commits to origin, carrying that author's signature and message style, and re-signing or rewording them would rewrite upstream's history. Only upstream is exempted: a remote of the user's own named upstream, or an upstream in a third-party clone, exempts nothing, and the fork's own commits on top are checked as usual. The one exception is a push to a URL, which treats every remote's commits as published, upstream and third remotes included. A missing engine prints a warning and checks everything.

It then runs the privacy scan, claude/scripts/scan-commit-confidentiality.py --range, over the lines the new commits add, and refuses the push on a blocking finding, of the classes Shared Commit and Push Steps lists. Review findings are left to the session that made the commit. The refusal shows the scanner's own advice on clearing a finding, and adds only that rewording an already-made commit means /reset and re-commit. A scan that could not run blocks too, since an unmeasured push is not a clean one. It is gated on the same .claude/conventions record as the message check, and a missing scanner prints a warning rather than blocking. See Shared Commit and Push Steps for the scanner itself.

It also uploads Git LFS objects, because with core.hooksPath global the hook Git LFS would install never runs. Wherever the push can carry LFS content — the repo has a local LFS object store, lfs.storage moves that store elsewhere, or a pushed commit's root .gitattributes names filter=lfs — it runs git lfs pre-push, and refuses the push if git-lfs is not on PATH. Everywhere else it skips the call, which would cost every push an SSH handshake and a locks request.

Tests: bash claude/tests/pre-push-hook.sh [hook] — exit 0 when every case behaves, 1 otherwise. Most cases are real pushes to bare repos on disk, sealed from this machine's git config and signing key; where git-lfs or SHA-256 support is missing, those cases are counted as NOT COVERED rather than passed. The privacy-scan cases push a commit adding a tailnet address and expect a refusal naming the finding, expect the same push to pass once its fingerprint is in .claude/confidentiality-allow, and expect a repo with no conventions record to go unscanned; with no installed scanner they are NOT COVERED. The message checker has its own cases in python claude/tests/check-commit-message.py, which pins each rule against a message that breaks it and one that only looks as though it does — an acronym or identifier opening the description (docs(learnings): LFS objects …) passes, a sentence-style capital does not, and a line carrying an unbreakable token is exempt from the width limit.

Global installation is covered in the Global Installation section below.


Pre-commit guard

File: git/hooks/pre-commit

Independent checks, ordered by cost. Because core.hooksPath is global this hook runs for every repo on the machine, so each check has to be inert where it doesn't apply — one that fires wrongly is one that gets disabled, and disabling it removes the case where it did apply.

  • config/publish.env must be marked for encryption before it can be committed. That file names the box, its paths, the container to watch and the vhost to install. No credential — which is exactly what made it easy to commit by accident. It is versioned rather than ignored, because per-machine copies drifted: one tenant was left pointing at a path another had deleted. The check is structural — is the path marked for transcrypt, filter=crypt or a named context's crypt-<name> — so it can't be fooled by a file that merely looks encrypted, and it refuses with instructions rather than leaking. This half is not a no-op in a repo without transcrypt: staging that path anywhere tells you to set it up. Only that one path is enforced; .env as a class is the wrong unit, since a plaintext host.env and a secret-carrying rendered .env share a suffix and need opposite handling.
  • A repo below convention 017 does not add its config/deploy.env. Before 017 the global excludes hid that file and each clone kept its own copy; once they stopped hiding it, one machine's copy shows as untracked in a repo that has not adopted 017, and a commit of everything pending would carry it in before the migration has read both clones. Only an added file is refused, since a tracked one was committed on purpose. The conventions engine's behind call decides the version; when it cannot answer, the hook refuses too and names the engine.py status command to run. The refusal says to run /adopt, or to commit anyway with git commit --no-verify and say why in the message.
  • A file marked filter=crypt must actually be ciphertext. It refuses a commit while any marked file in the index is anything but transcrypt's output — the last guard against a plaintext leak such as a *.secret.md from encrypted memory — and does nothing in a repo that marks no file. The hook reads the index itself in every clone and checks each blob's whole shape against what openssl enc -a writes, because transcrypt's own check reads a file's first eight bytes and its clean filter passes a file that already opens with the magic through unchanged, so ciphertext with a line appended would satisfy both. In a clone never unlocked, or one whose credentials were flushed, that reading is the only check: git ignores the unconfigured filter and stages a rewritten secret as plaintext, and the working copy there is the ciphertext, so an append is the likeliest edit. Where the clone is unlocked, transcrypt's check runs after the hook's reading, so plaintext already in history gets the hook's warning to rewrite it and rotate the value rather than transcrypt's re-stage advice. The hook's reading covers the default context only; a file marked for a named context gets transcrypt's check alone, and only where the clone is unlocked. It reads the whole index rather than this commit's files: rebase, am, cherry-pick, revert and a merge that needs no resolution commit without running pre-commit, so a leak they carry in is refused at the next ordinary commit.

Tests: bash claude/tests/pre-commit-hook.sh [hook] — exit 0 when every case behaves, 1 otherwise. Each case runs in a scratch repo sealed from this machine's git config, and a refusal counts only when the output carries the refusing check's own words; the unlocked cases, and the real-symlink case, are counted as NOT COVERED where transcrypt cannot initialise or the machine cannot make a symlink.


Learnings

The claude/learnings/ directory collects long-form, domain-specific reference notes — non-obvious behaviors learned through trial and error (framework quirks, API limitations, platform gotchas), each a topic-named markdown file with no frontmatter or index. They're available globally through the ~/.claude/learnings/ symlink, and the /reflect skill adds to them as new knowledge surfaces.

The filenames are the index — browse claude/learnings/ to see what's covered rather than maintaining a manifest here. To pull a topic into a project, point that project's CLAUDE.md at the file:

Read `~/.claude/learnings/chrome-extension.md` for domain-specific patterns.

Output Styles

The claude/output-styles/ directory holds response-shape rules — how a reply is laid out and worded, as opposed to what it is allowed to do. Each style is one markdown file whose frontmatter carries a name, a one-line description, and keep-coding-instructions: true; the body is the guidance itself. The /tune-output skill owns the process for changing them and keeps its ledger of what has already been tried.

A style takes effect only when claude/settings.json selects it by name:

"outputStyle": "action-first"

Two things about that key are worth knowing before debugging one. The name is resolved against ~/.claude/output-styles/ and the project's own .claude/output-styles/, so a missing symlink leaves the selection pointing at nothing — and an unresolvable name is a silent no-op: no warning, exit 0, a session that looks exactly like a working one. And omitting keep-coding-instructions: true from a style file quietly drops the built-in engineering instructions instead of adding to them. Run sh ~/.claude/skills/tune-output/scripts/preflight.sh to see the selected name and the resolved file separately, which is the only way to tell those apart.


Saved Workflows

The claude/workflows/ directory holds workflows any session can run by name, linked to ~/.claude/workflows/, which Claude Code reads as the user scope beside a project's own .claude/workflows/.

  • review-auto — the way to run an automated review, fixing what it finds or, with fix: false, read-only. Called as Workflow({name: "review-auto", args: {scope, lenses: [{key, prompt}], context, gate, fix, rounds}}), where rounds caps the review-and-fix rounds and defaults to 10, a guard rather than a target. It refuses to start without scope and lenses, so a session invoking it — /review-auto cap 6 typed by the user included — builds the whole object as claude/skills/shared/review-auto-args.md describes, reading a number in plain words as rounds. A read-only run reviews and verifies one round, changes nothing, and returns the same triage table; /review-manual is the way to run one. Every run's scope also takes in the commits pushed since the last review, which the review scope hook adds. Each round's diff is written once by review_scope.py pack to a file every reviewer and verifier reads in place of running the diff itself: whole when it has at most 200 changed lines (SMALL_DIFF), and by file section above that. A diff that small gets one reviewer carrying every lens (review:all:<round> in the journal), and a larger one a reviewer per lens; without a pack, a diff bounded by one round's fixes or one clean-up pass counts as small. Every finding must name who reaches it (a call site, a log line, a stored record), how often (common, plausible, rare, theoretical) and what leaving it costs. A skeptic per finding judges both truth and realism, except that two or more findings of one lens rated theoretical with nobody shown reaching them share one skeptic (verify-batch:<lens>:<round>), which still gives each its own verdict, and plain code decides what happens: a duplication is fixed whatever its frequency and whether or not anything reaches the divergence yet, because what that one costs is the next divergence between the copies rather than anything the rated scenario does; otherwise a finding nothing reaches is dropped; one that is reached and would lose data, crash, get core output wrong (wrong_output) or leak identity is fixed, as is anything common or plausible; a rare one gets a log line or a doc sentence and no logic; a theoretical one is dropped. A reviewer or skeptic that returns nothing, because it died or was skipped, is retried once; both are read-only, so a second run cannot apply anything twice, which is why the fixer and the polish passes are never retried. A finding whose skeptic returned nothing on its retry too is unverified, neither fixed nor counted as refuted, and the next round is asked to report it again. Each fix- and note-class row records what the fixer's report says happened to it — applied, skipped with its reason, or not applied — and each later round's reviewers see every earlier finding with that outcome, so they do not re-report a dropped case in new words. Each round after the first reviews only the diff the previous round's fixes made, bounded by tree snapshots taken before and after the fixer runs, since everything outside it was already read; without a bookmark, or when a snapshot fails, a round reviews the whole scope again. The loop stops after a round with nothing worth fixing, when the fixer returns nothing or applies none of its fixes, and after rounds rounds regardless. A run stopped by the cap then runs one verify-only round that reviews the last fixes without fixing anything: when it finds nothing fix-class the review counts as converged and is recorded, and otherwise its findings join the triage table unapplied and the bookmark stays unrecorded. The run returns the whole triage table for the user rather than a count of fixes. Before reporting, the fixer re-reads its own diff through every lens. A lens whose reviewer returned nothing on its retry too is listed in silent_lenses (a dead combined reviewer lists every lens), and the stop reason says the round was clean only among what ran. No agent in it may deploy, start or stop an app, and the fixer runs the project's gate by its exit status.

    In fix mode, once a run has converged with nothing that would keep the bookmark from being recorded, it polishes the change: one agent follows /clean-code, then one follows /docs-relevance over the cleaned code, each applying what the skill would otherwise ask about, and the gate runs. Both passes cover the whole pending change set each skill defines for itself, which can be wider than the review's scope, because the run records the whole tree as polished and /wrap-up then skips both skills for it. Every lens then reviews the polish diff alone. A failed gate, a confirmed defect of any frequency or reach, or a lens or verifier that returned nothing takes the whole polish back to the reviewed tree from a snapshot taken before it (review_scope.py snapshot and revert), so no outcome leaves code no review saw; a polish pass that returned nothing is not reverted, since what it edited is unknown, and the run is then not recorded. Each polish edit is a row in the triage table with its outcome.

Tests: node claude/tests/review-auto.mjs runs the real script with the Workflow runtime stubbed, and asserts every triage outcome, the stop rule and the cap with its verify-only round, including the cases where a reviewer, verifier or fixer returns nothing or throws, the read-only mode, when the review bookmark is recorded, and every way the polish is kept or taken back.


Remote Session

The claude/remote-session/ directory holds a Claude session that runs on the Windows machine and can be watched from both machines at once — a keystroke in agterm on the Mac and an ordinary terminal on Windows, attached to the same session simultaneously. The agent is a native Windows process with a real Windows working directory, so it can build and drive Windows GUI applications; WSL and tmux only hold the terminal it lives in.

It lives here rather than in its own repo because both halves come from one checkout: the Windows holder and the Mac attach script arrive together on a single git pull.

Setup, daily use and what it does not survive are in claude/remote-session/README.md; the measurements that shaped it are in claude/learnings/windows-persistent-terminal-session.md.


Global Installation

Global files live in claude/ (symlinked to ~/.claude/) and git/ (hooks, gitignore, gitattributes — each symlinked to ~/). Project-local config stays in .claude/. The one directory under claude/ that is deliberately not symlinked is claude/tests/: those run from a checkout of this repo, not from ~/.claude/.

If any of these already exist in ~/.claude/ or ~/.git-hooks/, move them into the repo first (or remove them) before creating the symlink.

There is deliberately no claude/hosts/ here, and .gitignore still blocks the path. A per-host identity manifest inventories a box's hostnames and the exact string each site emits to prove the right application is answering — none of it a credential, which is precisely why it is easy to publish by accident, and this repo is public. One briefly lived here and drifted from its original within hours. Per-host data now lives in the private repo that owns the host, and each project's IDENTITY_CHECK fetches it at publish time rather than keeping a copy. The ignore rule outlives the directory on purpose: it is what stops the path being recreated by someone repeating the reasoning that put it here, which looked entirely sound at the time.

macOS / Linux users skip this section — see Linux / macOS below.

Windows

Run from the project root as Administrator:

New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.claude" | Out-Null
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.claude\CLAUDE.md" -Target "$PWD\claude\CLAUDE.md"
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.claude\skills" -Target "$PWD\claude\skills"
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.claude\hooks" -Target "$PWD\claude\hooks"
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.claude\settings.json" -Target "$PWD\claude\settings.json"
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.claude\learnings" -Target "$PWD\claude\learnings"
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.claude\memory" -Target "$PWD\claude\memory"
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.claude\scripts" -Target "$PWD\claude\scripts"
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.claude\output-styles" -Target "$PWD\claude\output-styles"
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.claude\conventions" -Target "$PWD\claude\conventions"
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.claude\workflows" -Target "$PWD\claude\workflows"
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.git-hooks" -Target "$PWD\git\hooks"
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.gitignore" -Target "$PWD\git\gitignore"
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.gitattributes" -Target "$PWD\git\gitattributes"
git config --global core.hooksPath "$env:USERPROFILE\.git-hooks"
git config --global core.excludesFile "~/.gitignore"
git config --global core.attributesFile "~/.gitattributes"
$p = [Environment]::GetEnvironmentVariable("Path", "User"); if (";$p;" -notlike "*;$env:USERPROFILE\.claude\skills\ports\bin;*") { [Environment]::SetEnvironmentVariable("Path", "$env:USERPROFILE\.claude\skills\ports\bin;$p", "User") }

Linux / macOS

Run from the project root:

mkdir -p ~/.claude
ln -s "$(pwd)/claude/CLAUDE.md" ~/.claude/CLAUDE.md
ln -s "$(pwd)/claude/skills" ~/.claude/skills
ln -s "$(pwd)/claude/hooks" ~/.claude/hooks
ln -s "$(pwd)/claude/settings.json" ~/.claude/settings.json
ln -s "$(pwd)/claude/learnings" ~/.claude/learnings
ln -s "$(pwd)/claude/memory" ~/.claude/memory
ln -s "$(pwd)/claude/scripts" ~/.claude/scripts
ln -s "$(pwd)/claude/output-styles" ~/.claude/output-styles
ln -s "$(pwd)/claude/conventions" ~/.claude/conventions
ln -s "$(pwd)/claude/workflows" ~/.claude/workflows
ln -s "$(pwd)/git/hooks" ~/.git-hooks
ln -s "$(pwd)/git/gitignore" ~/.gitignore
ln -s "$(pwd)/git/gitattributes" ~/.gitattributes
git config --global core.hooksPath ~/.git-hooks
git config --global core.excludesFile "~/.gitignore"
git config --global core.attributesFile "~/.gitattributes"
grep -qxF 'export PATH="$HOME/.claude/skills/ports/bin:$PATH"' ~/.zshrc || echo 'export PATH="$HOME/.claude/skills/ports/bin:$PATH"' >> ~/.zshrc

The last line puts the dev-port command on PATH — for the user on Windows, through ~/.zshrc on macOS (use ~/.bashrc on a bash-only Linux). A terminal opened before it does not see the command; open a new one.

Verifying the install

Confirm every link the install blocks create resolves, on this machine:

python ~/.claude/hooks/check-install.py

It prints a pass/fail line per link, per git setting and per PATH entry, and the same script runs at every session start — silent unless something is broken. A link added to the Windows or Linux / macOS install block needs a matching line in its LINKS list or it goes unchecked, which the commit gate now asserts rather than leaving to memory. See Install Check for what it catches and what it cannot.

Python interpreter

Every Python hook in claude/settings.json invokes the interpreter as python, never python3. That is deliberate and measured: on both platforms the python3 name resolves to an indirection rather than the real binary — a bash shim on Windows and an xcode-select dispatcher on macOS — and each costs a spawn on every hook. Nothing else on PATH may shadow it, so a machine that lacks a real python runs no hooks at all. Figures live in claude/skills/hooks/references/performance.md.

Windows satisfies this out of the box. macOS does not — Apple ships no python, and the Command Line Tools python3 is stuck on 3.9, which is old enough that ordinary annotations like str | None fail at import. Install a current Python and expose it under the bare name:

brew install python
mkdir -p ~/.local/bin
ln -s /opt/homebrew/bin/python3 ~/.local/bin/python

Point the symlink at /opt/homebrew/bin/python3, not at the versioned libexec/bin/python, so it follows future upgrades. Make sure ~/.local/bin is on PATH, then confirm with python -V.

Because the symlink lives outside the repo, no git clone restores it. A machine missing it fails silently — hooks simply never fire.

Every invocation also passes -S, which skips site — the single largest slice of interpreter startup. The cost is that site-packages is off sys.path, so every hook must stay stdlib-only. All of them currently are. A hook needing a third-party package must drop -S on its own command line rather than for all of them.

The /memo skill and the memo commands inside /yolo and /wrap-up use the bare python too, allowlist strings included — an allowlist that names a different interpreter than its command makes every call prompt for permission.

UTF-8 mode

The env block of claude/settings.json sets PYTHONUTF8=1, which puts the Python processes Claude Code spawns into UTF-8 mode (claude/learnings/python-windows-console-encoding.md names the ones it misses, under "Turning it on changes more than output"). It is there for a failure that is invisible on macOS and silent on Windows: Claude Code writes each hook's JSON payload to stdin as UTF-8 bytes, but Python on Windows decodes stdin with the system ANSI codepage. It does not raise — CPython opens stdio with errors="surrogateescape", so the bytes come through mangled into mojibake rather than rejected, json.load succeeds because JSON's own punctuation is ASCII, and the hook runs happily on a populated but corrupted payload. Nothing reaches the never-raise except; there is no crash and no log line, which is exactly why it went unnoticed.

What that actually costs, measured on the Windows machine: under a non-ASCII repo path memos.py decodes git rev-parse --show-toplevel with the locale codec and writes the whole backlog into a garbage sibling directory outside the repo while printing a plausible in-repo path, and skill-tracked.py takes its early return because the mangled path fails os.path.isdir, so its warning never fires. One env var closes both. It is process-wide rather than hook-scoped, so it also changes the default encoding of every bare open() and of subprocess.run(..., text=True) — a script reading a codepage-encoded file now raises under Claude Code while still working in a plain terminal.

Mouse reporting

The same env block sets CLAUDE_CODE_DISABLE_MOUSE_CLICKS=1, which keeps a drag in the terminal a text selection instead of an event stream while the wheel still scrolls the transcript. Claude Code 2.1.283 asks the terminal for any-event mouse tracking where 2.1.251 asked for nothing, and a terminal honouring that request delivers the drag to Claude Code rather than highlighting anything — so ⌘C copies nothing, and ⌘-hover stops underlining links. Holding shift bypasses the capture for one drag. With the variable set, Claude Code requests only click and wheel reporting (DECSET 1000 and 1006), never the motion-tracking modes, so a terminal that keeps drags for itself when no motion is tracked still selects; measured 2026-10-01 on the Windows machine. agterm on macOS is not such a terminal: libghostty forwards a press whenever the program requested any reporting, so a drag there still needs shift. CLAUDE_CODE_DISABLE_MOUSE must stay unset: it is tested for presence, so any value, "0" included, overrides this one, and =1 turns reporting off entirely, which takes the wheel away from the transcript. The probe that reads the mode, and the terminal-side switches that also turn it off, are in claude/learnings/terminal-mouse-reporting-vs-selection.md.

Model pin

The same env block sets ANTHROPIC_MODEL=opus, which picks the model every new session starts on and wins over a model key saved in the settings file. A default saved by mistake in /model therefore has no effect at launch, while Enter and s in the picker still switch the running session. The key is removed from the file after the switch by the Model Default Guard. Changing the default model means changing this value.

The variable outranks a model key in a project's .claude/settings.json too, so a project pin decides nothing here. Convention v20's no-model-pin rule fails the commit gate of a repo whose .claude/settings.json carries a model key or env.ANTHROPIC_MODEL, the second being a pin that would outrank this one.

Screenshot capture helper (macOS)

The screenshot skill takes every screenshot through a small helper rather than through the agent's own binary. macOS grants Screen Recording to a binary, and the agent's is version-named, so granting it there would both go stale on every update and hand whole-display access to every session forever. A purpose-built bundle at a fixed path is granted once and scoped to the one job. Build it once per machine:

bash claude/skills/screenshot/scripts/build-docshot.sh

That installs DocShot.app into ~/Applications. Grant it Screen Recording the first time it asks — a denial is silent rather than loud, since window ids, owners and bounds all still populate while every window title comes back empty, so use the helper's --check probe to confirm the grant is live instead of discovering it as a black PNG. The grant is pinned to the bundle's ad-hoc signature, so the script refuses to clobber an existing install unless passed --force; rebuilding resets the grant.

Like the python symlink above, this lives outside the repo and is not restored by git clone.

Memory

Two complementary stores hold accumulated cross-session knowledge, and they reach a session by different routes:

  • Global memory (claude/memory/, deployed to ~/.claude/memory/ via symlink) — cross-project preferences, feedback, and references meant to apply everywhere. claude/memory/MEMORY.md indexes every one of them and is the only global index edited by hand; nothing loads it on its own. An entry marked {always} there is also rendered into CLAUDE.md by claude/scripts/render-memory-index.py, and CLAUDE.md is injected into every session — so the marker is what decides whether a memory fires unprompted or merely stays findable. A commit check re-renders the block and fails on any difference, which is what keeps the two from drifting apart as they once did. The same check fails on an {always} blurb over 160 characters, since every session and every workflow subagent loads it and the memory file holds the detail; a separate commit check holds claude/CLAUDE.md to 32 KB for the same reason.
  • Project memory — facts specific to a single repo. Claude Code writes these to a machine-local cache (~/.claude/projects/<path-encoded>/memory/) that is not version controlled, so the knowledge is invisible from other machines and lost if the cache is cleared.

Versioning project memory

The claude/scripts/link-project-memory.sh script redirects a project's memory cache, by symlink, into a committed .claude/memory/ directory inside that repo. The harness keeps reading and writing the same path, so auto-recall is unaffected; the files just live in the repo now and travel with git clone.

Run once per project, per machine — from inside the repo, and on Windows from an elevated shell. Windows will not follow a link created by a non-administrator (Windows Link Guard has the mechanics), so without elevation the script refuses and prints the command to run rather than leaving a link behind that some process will not walk:

bash ~/.claude/scripts/link-project-memory.sh

It migrates any files already in the cache, wires up the link, and leaves .claude/memory/ staged for you to commit. On a fresh machine, clone the repo and re-run the command to re-establish the (machine-local) link.

In this dotfiles repo the two stores sit side by side: claude/memory/ is the global payload deployed to ~/.claude/memory; the repo-root .claude/memory/ is this repo's own project-specific memory.

Encrypted memory (*.secret.md)

Memory files holding sensitive coordinates (not secret values — those stay in Doppler) are committed encrypted, so this public repo never exposes them. They are transparently decrypted in a working tree that holds the key, and read as opaque blobs to anyone without it.

  • Mechanism: transcrypt (vendored at claude/scripts/transcrypt) wires Git clean/smudge filters. .gitattributes marks every *.secret.* file filter=crypt, wherever it sits in the repo, so those files are ciphertext in every commit and plaintext only locally.
  • Key: a symmetric passphrase kept in Doppler (a TRANSCRYPT_KEY secret) — not in this repo. The committed index entry for an encrypted memo is deliberately generic, so even the description gives nothing away.

Unlock on a new machine — after cloning and fetching the key, run from the repo root (substitute your Doppler project/config):

bash claude/scripts/transcrypt --yes -c aes-256-cbc \
  -p "$(doppler secrets get TRANSCRYPT_KEY --project <project> --config <config> --plain)"

The portable pre-commit (installed globally via core.hooksPath) already chains transcrypt pre_commit, so init skips writing its own redundant helper hook into the shared, committed git/hooks/ — no leftover, no manual cleanup. (This is a local patch to the vendored transcrypt; re-apply it if you re-vendor upstream.)

Until then, *.secret.* files read as encrypted blobs. Add more by naming them *.secret.<ext>; the attribute pattern encrypts them automatically.

License

GPL-3.0

About

Complete Claude Code environment: global guidelines, skills, hooks, settings, version-controlled memory and learnings, and shared git config

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages