delegate-coding-task
Skill1 starsChanged 37 days agoMITView on GitHub
Use when handing a coding task to another agent. Fence the scope, verify the result.
- Reads credentials
In this repository34 other files it gives its agents.
- agent-branch-integrationSkill
- agent-config-syncSkill
- blocked-page-recoverySkill
- brand-retrofitSkill
- clickable-concept-prototypeSkill
- codebase-inspectionSkill
- commit-workSkill
- contrastive-refactor-demoSkill
- custom-domain-emailSkill
- delegated-agent-supervisionSkill
- delivery-verificationSkill
- domain-dns-cutoverSkill
- first-run-onboardingSkill
- frontend-render-performanceSkill
- github-pages-deploySkill
- hermes-cron-jobsSkill
- hermes-messaging-channelsSkill
- hermes-on-oracle-free-tierSkill
- hermes-provider-credentialsSkill
- isolated-worktree-testingSkill
- measurement-validitySkill
- multi-layout-previewSkill
- new-project-scaffoldingSkill
- parallel-agent-fanoutSkill
- premortemSkill
- recall-and-claim-verificationSkill
- single-source-training-materialsSkill
- stakeholder-decision-elicitationSkill
- static-site-vps-deploySkill
- supabase-auth-debuggingSkill
- windows-background-process-hygieneSkill
- windows-desktop-automationSkill
- windows-performance-tuningSkill
- worktree-analysisSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Don't use for: research, writing, analysis, or config of the orchestrator itself.
- Distinctive: line 45
Put it in a file, not on the command line: a multi-paragraph prompt does not survive shell quoting, and a file is the artifact you cite …
- Distinctive: line 59
Do not restate what the repo's own AGENTS.md / CLAUDE.md already says.
- Distinctive: line 64
Prefer print/headless mode with the prompt on stdin.
- Distinctive: line 72
Strip inherited credentials from the child's environment: when the project exports them for a different purpose.
- Distinctive: line 85
Run all of these. Each one catches a different class of lie:
- Distinctive: line 105
One repo, two agents: only with disjoint file lists: Put the other agent's paths in each prompt's MUST NOT list.
- Distinctive: line 115
"Tested" without a command is not tested: Ask for the command and its output in the report, then re-run it yourself.
- Distinctive: line 127
The prompt file is the audit trail: Keep it. When the result is wrong, the first question is always whether the contract was wrong.
≈ “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
Delegate a coding task
Hand a bounded coding task to a second agent (Claude Code, Codex, OpenCode, any CLI that takes a prompt and edits a repo), then verify what came back before you believe any part of it.
The hard part is not launching the agent. It is that an agent's closing message is a self-report, not evidence. "Implemented and tested" routinely means one file written and nothing run. This skill is the fence you put around the work and the checks you run after.
When to Use
- A task involves writing, editing, refactoring, debugging or testing code in a repository, and you are not the one typing.
- You are running several independent workstreams and want them in parallel.
- Don't use for: research, writing, analysis, or config of the orchestrator itself. Those have no repo to fence and no diff to verify.
Step 1 — Decide if the task is delegable at all
A delegable task has all four:
| Property | Test |
| Bounded | you can name the files it may touch |
| Verifiable | there is a command whose output proves it worked |
| Reversible | worst case is a bad diff on a branch, not a deploy |
| Self-contained | it does not need a decision only the user can make |
Missing any one of these, do it yourself or go back to the user. A task delegated without a verification command is not delegated, it is abandoned.
Step 2 — Write the prompt as a contract
Put it in a file, not on the command line: a multi-paragraph prompt does not survive shell quoting, and a file is the artifact you cite later. The contract has six parts, in this order:
- Goal in one sentence, stated as an outcome, not an activity.
- Files it MAY touch, explicit paths.
- Files it MUST NOT touch — name the ones another agent or the user is working in right now. Without this line, concurrent work gets clobbered.
- Definition of done, as a command plus the expected output.
- Stop condition: "if the fix requires changing a file outside the allowed list, stop and report instead of widening the scope."
- Forbidden operations: no
git add -A, no commit, no push, no dependency install, unless explicitly asked.
Do not restate what the repo's own AGENTS.md / CLAUDE.md already says. The
agent loads it; repeating it wastes context and creates two sources of truth.
Step 3 — Launch non-interactively
Prefer print/headless mode with the prompt on stdin. An interactive window is for when the user actually wants the keyboard.
# prompt via stdin survives any length and any quoting
cat task.md | claude -p --permission-mode acceptEditsStrip inherited credentials from the child's environment when the project
exports them for a different purpose. A subprocess that inherits
ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN or ANTHROPIC_BASE_URL from a repo
.env will silently talk to the wrong endpoint, bill the wrong account, or
fail with an auth error that looks like a bug in your prompt.
env = {k: v for k, v in os.environ.items()
if k not in ("ANTHROPIC_API_KEY", "ANTHROPIC_AUTH_TOKEN", "ANTHROPIC_BASE_URL")}Step 4 — Verify against the tree, never against the report
Run all of these. Each one catches a different class of lie:
git -C <repo> status --porcelain # did it touch what it said, and only that?
git -C <repo> diff --stat # is the size plausible for the claim?
git -C <repo> log --oneline -5 # did it commit when told not to?
<the repo's own test command> # does the claimed test actually pass?Then read the diff of at least the file carrying the core claim. A green test suite that never exercised the new path is the most common false positive: check that the test names in the output actually mention the behaviour.
Divergence between the report and the tree is a finding, not a formality. The tree wins, and the divergence goes in what you tell the user.
Parallelism
Independent tasks run concurrently. The constraints:
- One repo, two agents: only with disjoint file lists. Put the other agent's paths in each prompt's MUST NOT list.
- One verification process per repo. Fanning out several heavy test/build runs in the same checkout causes resource contention that reports itself as a timeout, and you will debug the wrong thing.
- Never let two agents share a branch. One branch each, or one worktree each.
Pitfalls
- "Tested" without a command is not tested. Ask for the command and its output in the report, then re-run it yourself.
- A silent success is usually a blocked start. A launcher that needs an approval prompt, a trust dialog, or an executable bit will hang, not fail. Confirm from real output that the process actually started before reporting that you delegated anything.
- An agent developing against a dirty tree writes code that compiles only there. Its work depends on someone else's uncommitted changes, which is invisible in the diff. Build it from a clean checkout before shipping.
- Widening scope mid-task is the default failure mode. Without an explicit stop condition, an agent asked to fix one function will refactor the module and you will review the wrong diff.
- The prompt file is the audit trail. Keep it. When the result is wrong, the first question is always whether the contract was wrong.
Verification
The run succeeded when: the diff touches only allowed paths; the definition-of- done command was run by you and passed; nothing was committed or pushed that you did not ask for; and every claim you repeat to the user is one you saw in real output.
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.

