afk-setup
Skill3 starsChanged 44 days agoMITView on GitHub
Configures afk.sh on a project — writes the .afk.env that defines what \"done\" means here (verification gate, dependency install). Run once per repo, after /mattpocock-skills:setup-matt-pocock-skills and before the first ./afk.sh. Triggers: /afk-setup, \"configure afk here\".
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- JohnnyMcGee/claude-skillstheir own version, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- JohnnyMcGee/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- afk-debriefSkill
- afk-mergeSkill
- afk-preflightSkill
- afk-specSkill
- afk-waveSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Read, in this order — the lower sources are authoritative over the ones above:
- Very specific: line 89
Only put in what differs from the default.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/afk-setup
afk.sh is bare. Its defaults are cut for a pnpm monorepo; everything else (Python,
PHP, Rust, flat npm, monorepo in two halves) has to declare its own gate.
This skill reads the repo and writes .afk.env at its root.
Only one question matters: which command says "this ticket is done" here?
Everything else has a correct default. Only write into .afk.env what differs.
1 — Prerequisites
test -f docs/agents/issue-tracker.md && grep -qi github docs/agents/issue-tracker.mdMissing or non-GitHub → stop. Tell the user to run
/mattpocock-skills:setup-matt-pocock-skills first: afk.sh refuses to start without
it, and triage will not have its labels.
Also flag (without blocking) the absence of a glossary (GLOSSARY.md / GLOSSARY-MAP.md, or
CONTEXT.md / CONTEXT-MAP.md before mattpocock-skills 1.3) and of docs/adr/:
the sessions will run with no project memory.
2 — Find the gate
Read, in this order — the lower sources are authoritative over the ones above:
package.json(scripts),pyproject.toml,Cargo.toml,composer.json,Makefile.github/workflows/*.yml— what CI requires is the best available definition of "done": it is the gate the PR will have to pass anywayCLAUDE.md— often a hand-written "Commands" section, with the traps. The most reliable of the three.
Aim for fast and with no external service. A 15-minute gate killed by TIMEOUT, or
one demanding a live Postgres, protects nothing: it fails healthy tickets.
3 — The traps that cost a run
| Trap | Symptom | Answer |
test in watch mode (vitest, jest --watch, nodemon) | the ticket dies on a 45-minute TIMEOUT, every time | take test:run, or add --run / --watchAll=false |
| No lockfile at the root (monorepo in two halves, Python repo) | SETUP_CMD="auto" installs nothing, the fresh worktree has no dependencies | declare SETUP_CMD explicitly |
| Gate needing a service already running (a Postgres, a Redis started by hand) | red in a throwaway worktree, for nothing | have the gate start it itself (docker compose run --rm …: afk runs one gate at a time, VERIFY_LOCK, and prunes its networks), or leave it out of the global gate and give the tickets concerned their own Verify: line |
| No tests in the repo | "green" means nothing | offer at least a typecheck / a compile, and say so plainly |
Indispensable gitignored files (.env outside the known paths) | verification fails in the worktree for an off-topic reason | add the paths to SEED_GLOBS |
4 — Prove the gate before writing it
Non-negotiable. An untested gate is an invented gate. This is the one rule for proving a
command that afk will run; /afk-preflight and /afk-wave prove theirs by it:
timeout 180 bash -c '<the proposed command>'; echo "rc=$?"rc=0→ good.rc=124→ it never returns (vitestwithoutrun,jest --watch,nodemon). That is the watch trap: the ticket would die onTIMEOUTfor a reason that is not its own. Fix it, retry.- anything else → either the command is wrong, or the repo is already red. Tell the two
apart before concluding; a repo red on
mainis not a config problem.
5 — Propose, then write
Show the proposed .afk.env and wait for approval before writing it.
# .afk.env — verification gate for afk.sh
# The command line keeps the last word, hence the "${VAR:-...}".
VERIFY_CMD="${VERIFY_CMD:-<command proven in step 4>}"One comment per line, saying why — especially when you have ruled something out
("the worker self-checks need a live database", "test is in watch mode").
The file is versioned: it will be reread in six months by someone who does not have
this context.
Then tell the user to commit it: the commit is theirs.
Variables
Only put in what differs from the default. The defaults are in the table of the
README's "Usage" section, next to afk.sh: read them there, not from memory.
| when to override it | |
VERIFY_CMD | almost always — it is the whole point of the file |
SETUP_CMD | no root lockfile, or non-JS dependencies |
SEED_GLOBS | indispensable gitignored files elsewhere |
MEMORY_RE | ADR/glossary conventions filed differently |
INTEGRATION_VERIFY_CMD | the gate caches its results (turbo, nx, pytest cache): put the uncached form here, run once per run on the merged branches |
AFK_BUILD_CMD | the tickets are built somewhere else than a local claude -p (contract in the README, "Building elsewhere") |
TIMEOUT | repo where tickets are systematically heavier |
JOBS | never here — it is a run decision, not a project one |
CLAUDE_CONFIG_DIR | several Claude accounts on the machine — this repo's sessions must log in and bill on the right one, whatever the shell exports |
BASE_BRANCH defaults to the remote's default branch. A repo prepared by /afk-spec
already sets it to the landing branch; keep that value.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

