agentleFS
qyndexqyndex/claude-init/.claude/skills/handoff/SKILL.md

handoff

Skill2 starsChanged 5 months agoMITView on GitHub

Structured handoff between subagents, between background sessions, or between the night-run and the morning session. Uses the NEXUS YAML schema (v1.0). Required for swarm streams; recommended for all other subagents. Includes attempt counter, evidence requirement, explicit next-step.

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use decision-mapping, setup-ts-deep-modules and 10 more.

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.
  • FabienDehopreSkill

    decision-mapping

    Turn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time.

    Also in 8 projects that use this

  • liufeng1976Skill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 42 projects that use this

  • AWSSkill

    to-questionnaire

    Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

    Also in 93 projects that use this

  • GoogleSkill

    ask-matt

    Ask which skill or flow fits your situation. A router over the skills in this repo.

    Also in 87 projects that use this

  • RoentekSkill

    loop-me

    Grill me about specs for the workflows I want to build, within this workspace.

    Also in 51 projects that use this

  • LesaniSkill

    writing-beats

    Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.

    Also in 54 projects that use this

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 172 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
  1. Very specific:

    Use nexus or yaml — the parser accepts both fence tags.

    line 65
  2. Very specific:

    When status: qa_pass, evidence_paths MUST be populated (validator enforces).

    line 78
  3. Very specific:

    Attempt counter is real: When self-heal retries, increment attempt.

    line 105

“Common” is measured: kept by at least 6 in 10 of the 172 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Handoff — NEXUS schema v1.0

A handoff is the machine-parseable contract between two agents/sessions. Round 6 D promotes the schema from optional markdown to required YAML with runtime validation on swarm streams.

The canonical schema

Lives at .swarms/templates/handoff.yaml. The full template is 80+ lines; for routine handoffs you can omit optional sections (mark them as empty arrays/objects).

How to emit a handoff

End your final message with a fenced block:

```nexus
schema_version: "1.0"
task_id: T-042
parent_session_id: sess_abc123
subagent_id: sess_xyz789
subagent_name: researcher
status: completed
confidence: high
handoff_to: parent
summary: "Selected ioredis over node-redis; integration cost ~40 LOC."
artifacts_created:
  - path: docs/research/2026-05-28-cache-libs.md
    kind: research_brief
files_modified: []
files_read_but_not_modified:
  - src/cache/redis.ts
  - src/cache/memcached.ts
decisions_made:
  - decision: "Use ioredis"
    rationale: "active maintenance, native cluster"
    citations:
      - https://github.com/redis/ioredis
adrs_referenced: []
patterns_referenced: []
incidents_referenced: []
rejected_hypotheses: []
auto_fixed: []
tests_added: []
evidence_paths: []
verification_commands: []
blockers_encountered: []
open_questions: []
followup_tasks: []
tokens_used: 12400
cost_usd: 0.18
turns_used: 12
turns_max: 30
tool_calls: {bash: 3, read: 8, web_fetch: 4}
hook_blocks: []
classifier_denials: []
mcp_servers_used: []
```

Use ```nexus or ```yaml — the parser accepts both fence tags.

Status taxonomy

StatusWhenDownstream effect
completedRoutine handoff between phasesParent picks up next phase
qa_passVerification passed; ready for review/shipreviewer / security / release agents triggered
qa_failVerification failed; needs fixself-heal skill kicks in; attempt++
escalated3 attempts failed; needs humanStop loop; surface in OVERNIGHT_REPORT
blockedExternal dep or decision requiredAwaiting unblock; no further work
abortedOperator stopped, OOM, classifier deniedNo retry; surface why

When status: qa_pass, evidence_paths MUST be populated (validator enforces).

Enforcement (Round 6 D)

AgentEnforcement
feature-stream, coordinatorHARD — subagent-stop.sh parses the block; if missing or validate-handoff.sh exits non-zero, hook exits 2 (blocks)
architect, planner, implementerSOFT — emit YAML; free prose accepted with a warning
reviewer, verifier, securitySOFT — emit YAML; evidence_paths required if QA-PASS-equivalent
debugger, researcher, doc-writer, testerSOFT — emit YAML

To soft-enforce → hard-enforce later: edit .claude/hooks/subagent-stop.sh and remove the agent from the "soft-fail" whitelist.

Validate locally

# Validate a file
bash .claude/scripts/validate-handoff.sh path/to/handoff.yaml

# Validate stdin (e.g., a pasted block)
echo "$BLOCK" | bash .claude/scripts/validate-handoff.sh --stdin

Hard rules

  • One handoff per logical milestone. Phase boundaries (spec→plan, plan→implement, etc.). Don't write 10 per feature.
  • Cite, don't summarize. Decisions reference commit SHAs or URLs with dates.
  • Attempt counter is real. When self-heal retries, increment attempt. attempt == max_attempts → status: escalated.
  • Open questions are tracked. They go into the parent spec's [OQ] list, not just here.
  • followup_tasks becomes TASKS.md entries. findings-to-tasks.sh parses this list. Don't fake it.
  • AUTOPILOT degrade: still emit the YAML; surface unresolved open_questions in OVERNIGHT_REPORT.md.

Markdown-readable render

For human eyes, a renderer can convert the YAML to markdown — see .swarms/templates/handoff.yaml. The schema is the canonical form; markdown is a view.

Where handoffs live

  • Subagent → parent: fenced block in final message + persisted at .swarms/streams/<id>/handoff-<ts>.yaml (feature-stream)
  • Feature stream → coordinator: .swarms/streams/<id>/handoff-<ts>.yaml
  • Night run → morning: OVERNIGHT_REPORT.md with embedded NEXUS block
  • PR description: copy the YAML block into the PR body inside <details>

References

  • Schema source: .swarms/templates/handoff.yaml
  • Validator: .claude/scripts/validate-handoff.sh
  • Parser hook: .claude/hooks/subagent-stop.sh
  • Original NEXUS pattern: msitarzewski/agency-agents

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.