agy
Skill3 starsChanged 5 days agoMITView on GitHub
Delegate a well-scoped coding or read-only investigation task to the local `agy` CLI (a separate agent) to save Claude tokens. Implement tasks go through `agy-task run` (worktree, setup, scope check, compact summary; it runs no tests); read-only exploration through `agy-run`. Use only for self-contained tasks with a mechanical way to verify the result; never for architecture decisions or ambiguous requirements. agy runs with --dangerously-skip-permissions, so implement tasks run only in a dedicated git worktree and every prompt carries the HARD RULES block (agy-task adds it).
10 other projects use a version of this.
Adopted by
Most recently taken up by
- keli-wen/cospantheir own version, first seen Nov 22, 2026
- RohiRIK/skillstheir own version, first seen Nov 15, 2026
- d4rkwinz/agy-plugintheir own version, first seen Nov 8, 2026
- mustafarslan/skillstheir own version, first seen Nov 1, 2026
- darshitpp/x-agenttheir own version, first seen Oct 13, 2026
- laurentvv/agents-kittheir own version, first seen Oct 11, 2026
Used with
Projects with it also use opencode and codex.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
pepebot-spaceSkillopencode
Interact with OpenCode using the `opencode` CLI. Use `opencode run`, `opencode agent`, `opencode mcp`, and `opencode models` to execute automation workflows, manage agents, configure tools, and run headless coding tasks.
Also in 3 projects that use this
engtySkillcodex
Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing
Also in 4 projects that use this
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- keli-wen/cospan★ 85same name
- phuongduyphan/cc-tmux-agents★ 8same name
- darshitpp/x-agent★ 2same name
- mustafarslan/skills★ 2same name
- shauryaaojha/claude-code-delegate★ 2same name
- ssv445/claude-skills★ 2same name
- d4rkwinz/agy-plugin★ 1same name
- dT-Tb-labs/babel-orchestration★ 1same name
- RohiRIK/skills★ 1same name
- laurentvv/agents-kit★ 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 repositoryOne other file it gives its agents.
- agy-codexSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Report reset times to the user in UTC+7: Never read the contents of the oauth token file (only stat -c %Y).
- Very specific: line 26
Use: when the task is small and self-contained enough for one prompt with no back-and-forth, and either mechanically verifiable …
- Very specific: line 62
If agy-task is unavailable or too rigid: references/manual-worktree.md.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Delegate work to agy
agy is a separate coding-agent CLI (~/.local/bin/agy). Launch it only through agy-task (implement) or agy-run (read-only). Paths like references/… are relative to this skill's base directory; read a reference file only when its situation comes up — they are kept out of this file on purpose to save context.
Invariants
- Model:
gemini-4-hydrogen-highonly (user rule 2026-11-27). Pass--model gemini-4-hydrogen-highexplicitly on every agy call (agy-task,agy-run, resume, fallback commands), never omit it (agy-rundefaults togemini-4-hydrogen-highsince 2026-11-27, but an explicit flag keeps every command self-describing). No other model, ever, unless the user explicitly asks: not the other Hydrogen tiers (gemini-4-hydrogen-{low,medium,xhigh}), notgemini-3.8-flash-*, notgemini-4-argon-*, Claude or GPT-OSS, not even for cross-checks or small tasks. There is no model fallback either: a sustained 503 means stop and tell the user, seereferences/503-fallback.md. - Never a bare
agy -p. agy >= 1.2.14 reads its login from the OS keyring and ignores the token file thatagyrswaps;agy-runneutralizes that and rotates accounts on 429. The user starts their own interactive agy with plainagyr, notagy. - Never trust agy's exit code or report.
agy-taskonly checks scope and runs no tests (verify step removed 2026-10-08); you read the diff and run the tests yourself. agy has reported green while tsc was broken, a resumed run can echo an old 429, and a content-filter block (agy >= 1.4.5/1.5.0) finishes withRESULT=OK, exit 0, andchanged files: (none)("This request was blocked by Gemini's filters…"). Always check that the worktree diff is non-empty. - Implement tasks only via
agy-task(it creates the worktree; never ask agy togit worktree add). Explore / bug-finding tasks target the main repo read-only viaagy-run --add-dir "$REPO"(always pass--add-dir: without it agy silently writes into~/.gemini/antigravity-cli/scratch/and still reports success). - One small task per session, exact files/lines in the task file (quota burns with context size;
references/logs-and-costs.md). At most 20 runs in parallel (user rule 2026-10-12, raised from 12;references/parallel.md). Checkpgrep -fc '^bash .*agy-(task run --name|run --prompt)'before launching more. Launch eachagy-taskoragy-runas its own separate background tool call — never bundle multiple tasks into one shell loop, wrapper script (launch.sh), orfor pid in ...; waitcommand (bundling hides per-task status from the user and blocks completion notifications until the slowest task finishes). - Task files and logs live in
<repo>/.agy-sessions/(gitignored), never/tmpor agy's scratch dir. Keep the logs, delete prompt files when done. Never read the.jsonlunless debugging: the summary is the report. - Report reset times to the user in UTC+7. Never read the contents of the oauth token file (only
stat -c %Y). - agy never runs tests (user rule 2026-10-08: test runs lag the machine). No prompt may ask agy to run tests, builds, type-checks or linters, not even "one test file": the HARD RULES blocks and the
agy-taskprompt tail forbid it, so the task file must not contradict that (write acceptance criteria as observable code behavior, never "makepnpm testpass").agy-taskhas no verify step either: Claude is the only one who runs tests, after agy has answered and the diff is read, one targeted command at a time (never several suites in parallel). - Locked accounts:
agyr lock <name>marks an account that must never be used for agy tasks (its quota is shared with another product).agy-run/agy-taskcheck this at start: if the active account is locked they rotate withagyr nextfirst (exit 5 if every unlocked account is on cooldown) and every 429 rotation skips locked accounts too. Neveragyr usea locked account before launching a task, never unlock one without the user asking, and do not useagyr rotate/agyr cooldownto get away from a locked account (that would put a cooldown on it);agyr use $(agyr next)is the way.agyr test(only when the user asks) deliberately tests locked accounts too, so it does spend their shared quota.
--dangerously-skip-permissions (passed by agy-run) is the user's choice (2026-09-25); safety comes from the worktree isolation, the HARD RULES block and the scope check. If Claude Code's classifier ever blocks that flag, tell the user instead of working around it.
When to use / not
- Use when the task is small and self-contained enough for one prompt with no back-and-forth, and either mechanically verifiable (build/lint/test, diff mirrors an existing pattern) or a read-only investigation whose findings you can sanity-check; or when you want a real separate-process perspective.
- Don't for architecture/design decisions, security-sensitive code or nuanced judgment calls; anything you can't fully specify in one prompt (agy has zero context from this conversation); big multi-bug batches (split them); or when writing the task file takes the same research as doing it (then just do it). If you already found the exact line(s), edit directly.
Workflow: implement task (agy-task)
- Plan, don't over-specify (user rule 2026-09-25): goal, root cause / suspected area, relevant files, the pattern to mirror, acceptance criteria. Don't pre-trace every line or paste full code — Claude traces the code afterwards during review.
- Write ONLY the task part to
<repo>/.agy-sessions/<task>.task.txt: Repo/stack, Task, Plan, Acceptance criteria, an ENVIRONMENT NOTE ("the env is prepared; on an env failure STOP: no pnpm install, no symlinks, no copying from outside"). Do not write the working directory, scope, HARD RULES or verify list: the script adds them. Never tell agy to run or "make pass" any test/build/lint (invariant 8). - Run in the background (
run_in_background: true/WaitMsBeforeAsync: 500, one separate tool call per task — never a batch script orwaitloop) and wait for each completion notification — don't poll:agy-task run --name <task> --task <repo>/.agy-sessions/<task>.task.txt \ --scope '<pathspec>' [--scope …] [--base <ref>] --model gemini-4-hydrogen-high--modeltakes the FULL model id from invariant 1 (gemini-4-hydrogen-high). The short wordshigh/hydrogenare not model names: agy rejects them at once witherror: invalid model selection (--model "high" …),turns=0, exit 1, the worktree stays clean, and the message is not a quota or login problem. Check the spelling of--modelfirst when a run fails this way.--base: commit-ish the worktree branches from (default:HEADof the current worktree). When running from a linked worktree (e.g. an MR/feature worktree) whose branch differs from the main checkout, ALWAYS pass--base <branch|sha>explicitly (e.g.--base HEADor--base $(git rev-parse --short HEAD)).agy-taskresolves git paths back to the repository's main checkout, so explicitly pinning--baseensures all parallel tasks branch from the exact target commit and prevents any risk of drifting to the main checkout's branch. Always give--scope(paths agy may change; a moved HEAD, i.e. an agy commit, is a violation too). Setup and file copies come from<repo>/.agy-sessions/agy-task.conf(any leftoverVERIFY/DEFAULT_VERIFYthere is ignored;--verify*flags no longer exist and fail with exit 2).agy-taskruns NO tests: you run them afterwards (step 5); when Go tests hit a shared dev DB, use a targetedcd backend && go test ./internal/foo/.... stdout = a compact summary, also saved as.agy-sessions/<task>.summary.txt; progress goes to stderr. The user can watch with the live command inreferences/logs-and-costs.md. Pre-flight note:agyr locked "$(agyr active)" && agyr use "$(agyr next)"is optional because agy-run does it itself; it only matters when you need to know which account will be used. Read the exit code and the summary:
exit Meaning Do 0 agy finished and scope is ok ( RESULT=OK); NOTHING was testedcheck changed filesis non-empty (if(none)with a "blocked by Gemini's filters" report, reword neutrally without exploit/race phrasing and rerun with--reuse-worktree --no-setup). Note: if an earlier turn hit 429 and rotated accounts, the summary may showagy: status=ERROR … - agy reported ERROR - check the diff before trusting itwhileRESULT=OKbecauseagyechoes the old quota error inresultJSON; review (step 5) and run the tests yourself8 RESULT=SCOPE_VIOLATIONread the violation lines; send agy a corrected follow-up (see "Correction round" below), don't hand-fix 7 setup failed (worktree kept) fix the environment, rerun with --reuse-worktree(setup reruns)2 bad arguments, config, or worktree/branch conflict fix the command 4 login error / no active account STOP, tell the user; references/quota-auth.md5 whole pool on cooldown STOP, tell the user the earliest reset (UTC+7); references/quota-auth.md1, 6 other agy failure / too many account switches first check changed files:andagy report:in the summary — if the edits and report are already complete (e.g. a stream timeout or interrupt echo at the very end), check scope/diff and run tests instead of redoing the task. Otherwise check the log forinvalid model selection(wrong--modelvalue, see step 3); a 503 →references/503-fallback.md(no switching to another model); other quota/auth errors →references/quota-auth.mdA 429 on one account is NOT a stop, and the user does not switch accounts for it.
agy-run(andagy-task, which calls it) kills agy at once, puts that account on cooldown from itsResets in, switches to the next ready account and resumes the same conversation by itself. So do not tell the user "out of quota, switch accounts" for a 429 and do not wait for them. Stop only on exit 4 (login) or exit 5 (every account on cooldown: tell the user the earliest reset in UTC+7). Never retry in a loop or fall back to doing the task yourself on 4/5.Correction round (review or your tests found a problem in what agy wrote): continue the SAME agy conversation, since agy wrote that code and its tests and remembers why. Write a short new task file (what is wrong, file/line, what it should do; the code already in the worktree is agy's earlier work, fix it, don't redo it) and run
agy-task run --name <task> --resume --task <new-task-file> --scope '<pathspec>' --model gemini-4-hydrogen-high.--resumetakes the conversation id from the lastinitevent of.agy-sessions/<task>.jsonland implies--reuse-worktree --no-setup; it exits 2 if there is no log or id. Use--reuse-worktree --no-setupWITHOUT--resume(fresh conversation) only when the old conversation went the wrong way or has grown huge (quota burns with context size). Same rules as any run: agy runs no tests, you review the diff and test again afterwards.Round limit: at most 2
--resumerounds per task. Before declaring a run stuck, checkgrep -c '^{' .agy-sessions/<task>.jsonlandtail -1(stderr /.erronly logs account switches and looks idle whilestep_updateevents are still growing). If the task still is not right after 2 rounds, or event count has stopped growing / produced no new file for ~10 min, stop it:kill -KILLthe agy-task, agy-run andagy --conversationpids (SIGTERM does not stop the child; exit 137 is then expected). Commit the reviewed good part onagy/<task>(the worktree branch, not the target branch) so nothing is lost, then start a fresh conversation on the same worktree with a narrow task file:agy-task run --name <task> --reuse-worktree --no-setup --task <narrow-task-file> --scope '<pathspec>' --model gemini-4-hydrogen-high. Put the exact facts agy kept searching for into that task file.- Review (tiered): mechanical change → summary + skim the diff + one targeted check; risky (auth, payment, migrations, concurrency) → read the full
git -C <repo>/.worktrees/agy-<task> diffand run the key checks yourself. Nothing has been tested before this point (neither agy noragy-taskruns tests), so this is the only test run: targeted, run in the worktree, one command at a time. agy reads code accurately but misjudges cross-file consequences and over-rates severity. Mutation-checking agy's tests: never undo the mutation withgit checkout -- <file>while agy's changes are uncommitted (it wipes them; happened 2026-09-29): copy the file to the scratchpad or commit first. Rungofmt -lon Go files agy touched. - Integrate and clean up: stage only in-scope files explicitly (never
git add -A), commit on the worktree branchagy/<task>(only when the user asks), cherry-pick/ff to the target branch, thenagy-task rm <task> -f(without-fit refuses after a cherry-pick: the commits are not reachable from HEAD). It keeps the logs/summary and appends nothing else;.agy-sessions/usage.tsvaccumulates tokens and seconds per task.
If agy-task is unavailable or too rigid: references/manual-worktree.md.
Workflow: explore / bug-finding task (read-only, agy-run)
Write the task part to .agy-sessions/<task>.task.txt (say which verify commands Claude already ran and point at exact files), append the read-only HARD RULES, run, then confirm the repo is untouched (pre-flight note: agyr locked "$(agyr active)" && agyr use "$(agyr next)" is optional because agy-run does it itself; it only matters when you need to know which account will be used):
{ cat "$REPO/.agy-sessions/<task>.task.txt"; echo; \
sed "s#<ABS_PATH>#$REPO#g" ~/.claude/skills/agy/references/hard-rules-explore.txt; } > "$REPO/.agy-sessions/<task>.txt"
agy-run --prompt "$REPO/.agy-sessions/<task>.txt" --add-dir "$REPO" --log "$REPO/.agy-sessions/<task>.jsonl" --model gemini-4-hydrogen-high # background
grep '^{' "$REPO/.agy-sessions/<task>.jsonl" | jq -c 'select(.event=="result") | .result | {status,finished_reason,error,num_turns,usage}'
git -C "$REPO" status --short # must still be cleanagy-run exit codes are the same as above (0 ok, 1, 2, 4, 5, 6). Check findings against the code before reporting them; delete the prompt files afterwards.
References (read on demand)
references/quota-auth.md— exit 4/5/6, 429, login, account pool (agyr), keyring trap, stale-429, auto-continue after a re-loginreferences/503-fallback.md— sustained 503 / stalled runs: no model fallback, retry rules, when to stop and tell the userreferences/parallel.md— running several tasks at once, integration, queueing many tasksreferences/logs-and-costs.md— stream-json events, jq commands, the--add-dirtrap, why quota burns, smoke testreferences/manual-worktree.md— the manual implement workflowagy-taskautomatesreferences/hard-rules-explore.txt— HARD RULES block for read-only tasks (<ABS_PATH>placeholder); the implement block is~/tools/agy-acct/templates/hard-rules.txt
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.

