handoff-to-claude-code
Skill4 starsChanged 39 days agoMITView on GitHub
Hand a task or a question to Claude Code (the `claude` CLI) and relay what it produces. Use ONLY when the user explicitly asks for it. Do not use it on your own judgment that a task looks hard, and do not use it if you are Claude Code yourself.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- stritar/skillstheir own version, first seen Sep 11, 2026
- aiatelie/ai-atelietheir own version, first seen May 9, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- aiatelie/ai-atelie★ 9same name
- stritar/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.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 64
Do not summarize, reformat, or comment on the answer, and do not mix it into your own text.
- Very specific: line 79
Run every turn of a thread from the same directory, or with the same --dir.
- Very specific: line 85
If your harness can run shell commands in the background, use that.
- Very specific: line 113
If the output contains [handoff] ERROR: …, the failure needs a person to fix it, for example an expired login or a used-up usage limit.
≈ “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
Handoff to Claude Code
This skill sends work to a local Claude Code session and returns its output.
SKILL_DIR below is the directory that contains this SKILL.md. On a new machine, run this once to
confirm that Claude Code is installed and logged in:
python3 "$SKILL_DIR/scripts/handoff.py" doctorChoose a mode
chat | agent | |
| Use it when the user wants | an answer | work done on disk |
| Claude Code can | read, search, and run commands | do all of that and edit files |
| You then | relay the answer verbatim | summarize what happened |
python3 "$SKILL_DIR/scripts/handoff.py" chat "Why does this crash on startup?"
python3 "$SKILL_DIR/scripts/handoff.py" agent "Port the auth module to the new API and run the tests"For a long or multi-line prompt, pass - and send the prompt on stdin:
python3 "$SKILL_DIR/scripts/handoff.py" agent - <<'EOF'
Refactor the parser so that ...
EOFRead the output
Each run prints Claude Code's output, followed by a metadata footer:
--- handoff metadata ---
session: 6b1c…
model: claude-opus-5
cost_usd: 0.12
duration_s: 41
dir: /pathThe footer is for you. Do not show it to the user. Use session: for follow-up turns and
model: for the attribution line.
Relay chat output verbatim
Everything above the --- handoff metadata --- line is Claude Code's answer. Put it in your
final message exactly as printed, with the same words, markdown, and order. Precede it with one
attribution line:
— via Claude Code (claude-opus-5) —Do not summarize, reformat, or comment on the answer, and do not mix it into your own text.
Summarize agent output
The result of an agent run is the work on disk. Read the output and tell the user, in your own
words, what changed, what was verified, and what is still open.
Continue a thread
To ask a follow-up question in the same thread, pass the session id from the footer:
python3 "$SKILL_DIR/scripts/handoff.py" chat --session 6b1c… "And what about the timeout path?"Run every turn of a thread from the same directory, or with the same --dir.
Long runs
An agent run can take many minutes, which may exceed your shell tool's timeout.
- If your harness can run shell commands in the background, use that. Make the handoff command
the entire command line, and use
--dir <path>instead ofcd <path> &&. - Otherwise, add
--background. The command prints a job id and returns immediately. Use the job id with these commands:
python3 "$SKILL_DIR/scripts/handoff.py" agent --background "Migrate all call sites"
python3 "$SKILL_DIR/scripts/handoff.py" status <job-id>
python3 "$SKILL_DIR/scripts/handoff.py" tail <job-id> -n 40
python3 "$SKILL_DIR/scripts/handoff.py" wait <job-id> --timeout 600
python3 "$SKILL_DIR/scripts/handoff.py" kill <job-id>A running job keeps using the user's subscription. Run kill when the user changes their mind
or a job is stuck.
Other options
--model <name>: use a specific model. Without it, Claude Code uses the user's default model, which is usually what they want.--yolo: skip all permission checks. Use it only when the user asks for it, or when a normal run was blocked by permissions and the user agrees.--dir <path>: run in a directory other than the current one.--no-auth-check: bill the user's API key instead of their subscription. Use it only when the user asks for API-key or gateway billing.
When a run fails
If the output contains [handoff] ERROR: …, the failure needs a person to fix it, for example an
expired login or a used-up usage limit. Report the error to the user and do not retry.
For other commands, options, and troubleshooting, see reference.md in this directory.
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.

