agentleFS
tranhieutttranhieutt/software_development_department/.claude/skills/handoff/SKILL.md

handoff

Skill72 starsChanged 7 months agoMITView on GitHub

Generate the lightweight handoff summary (what was built, what's missing, acceptance criteria) and, when needed, save a formal handoff artifact to .tasks/handoffs/. The receiver verifies the summary before starting work. Extract from $ARGUMENTS: If from-agent, to-agent, or artifact are missing, print usage and stop: Check that <from-agent>.md and <to-agent>.md exist in .claude/agents/. If either is missing, warn but continue: - If task_id was provided, check if .tasks/checkpoints/<task_id>.md exists. If yes, set context_snapshot to that path. - If task_id was NOT…

195 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use which-skill, wait-what 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.
  • risadamsSkill

    which-skill

    Router over this pack's skills and flows. Ask it "which skill fits X" when you don't remember what's available.

    Also in 5 projects that use this

  • AWSSkill

    wait-what

    Stop. That last message did not land: re-pitch it.

    Also in 51 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 41 projects that use this

  • loulanyueSkill

    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 15 projects that use this

  • RoentekSkill

    writing-beats

    Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.

    Also in 20 projects that use this

  • RoentekSkill

    writing-fragments

    Writing, explore — mine raw fragments, no structure yet.

    Also in 20 projects that use this

  • +5 more from aws
  • +1 more from Roentek

The file

Show its rules and text

We split this skill into the rules it gives an agent

21 rules. 0 are common, 9 are distinctive, and 12 are very specific to this project.

  • 0

    Common

    Most of the 167 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 12

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If from-agent, to-agent, or artifact are missing, print usage and stop:

    line 38
  2. Very specific:

    Check that <from-agent>.md and <to-agent>.md exist in .claude/agents/.

    line 56
  3. Distinctive:

    If either is missing, warn but continue:

    line 57
  4. Very specific:

    If task_id was provided, check if .tasks/checkpoints/<task_id>.md exists.

    line 65
  5. Very specific:

    If yes, set context_snapshot to that path.

    line 66
  6. Very specific:

    If task_id was NOT provided, scan .tasks/checkpoints/ for the most recently modified .md file (excluding .gitkeep) and use it as a …

    line 67
  7. Very specific:

    If no checkpoint exists, set context_snapshot to null.

    line 69
  8. Very specific:

    If --criteria flags were provided, use them directly.

    line 73
  9. Distinctive:

    If no criteria were provided, prompt:

    line 75
  10. Distinctive:

    Must describe a concrete, testable outcome

    line 85
  11. Very specific:

    Run git branch --show-current to get the current branch for the session field.

    line 89
  12. Distinctive:

    When the formal artifact is needed, use this JSON:

    line 109
  13. Very specific:

    If formal persistence is required, write to .tasks/handoffs/<from-agent>-to-<to-agent>-<task_id>.json.

    line 128
  14. Very specific:

    If task_id is null, use timestamp: .tasks/handoffs/<from-agent>-to-<to-agent>-<ts-compact>.json.

    line 130
  15. Distinctive:

    If formal persistence is not required, do not create a file.

    line 133
  16. Very specific:

    If risk_tier is Medium or High, append to production/traces/decision_ledger.jsonl:

    line 138
  17. Distinctive:

    When an agent receives a handoff, it must:

    line 180
  18. Distinctive:

    Read the 3-field summary (and the formal file if one exists)

    line 182
  19. Very specific:

    Verify each acceptance_criterion against the artifact

    line 183
  20. Distinctive:

    If all criteria pass → begin work

    line 184
  21. Distinctive:

    If any criterion fails → do NOT start work.

    line 185

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

Generate the lightweight handoff summary (what was built, what's missing, acceptance criteria) and, when needed, save a formal handoff artifact to .tasks/handoffs/. The receiver verifies the summary before starting work.

Steps

1. Parse arguments

Extract from $ARGUMENTS:

PositionalRequiredDescription
<from-agent>yesSending agent name (e.g. backend-developer)
<to-agent>yesReceiving agent name (e.g. qa-engineer)
<artifact>yesPrimary file or path being handed off
[task_id]noTask ID to link checkpoint — auto-detected from active checkpoint if omitted
FlagDefaultDescription
--riskMediumRisk tier: Low, Medium, High
--statuscompleteArtifact status: complete, partial, draft
--criteriapromptAcceptance criteria strings (can be multi-value)
--formaloffForce writing a durable handoff file even when risk is not High

If from-agent, to-agent, or artifact are missing, print usage and stop:

Usage: /handoff <from-agent> <to-agent> <artifact> [task_id] \
                [--risk Low|Medium|High] \
                [--status complete|partial|draft] \
                [--criteria "criterion 1" "criterion 2"] \
                [--formal]

Example:
  /handoff backend-developer qa-engineer src/api/auth.ts 042 \
           --risk Medium --criteria "POST /auth returns 201" "Invalid creds → 401"

Schema reference: .claude/docs/handoff-schema.md

2. Validate agents

Check that <from-agent>.md and <to-agent>.md exist in .claude/agents/. If either is missing, warn but continue:

⚠️  Agent "<name>" not found in .claude/agents/ — check spelling.

3. Resolve task_id and context_snapshot

  • If task_id was provided, check if .tasks/checkpoints/<task_id>.md exists. If yes, set context_snapshot to that path.
  • If task_id was NOT provided, scan .tasks/checkpoints/ for the most recently modified .md file (excluding .gitkeep) and use it as a suggestion.
  • If no checkpoint exists, set context_snapshot to null.

4. Collect acceptance criteria

If --criteria flags were provided, use them directly.

If no criteria were provided, prompt:

📋 Enter acceptance criteria for this handoff (one per line, blank line to finish):
>

Require at least 1 criterion. Reject vague criteria and ask for a rewrite:

  • Contains "works correctly", "looks good", "should be fine", "seems OK" → reject
  • Must describe a concrete, testable outcome

5. Get session info

Run git branch --show-current to get the current branch for the session field. Get current ISO timestamp for ts.

6. Generate handoff summary

Build the 3-field summary per .claude/docs/handoff-schema.md:

## Handoff Summary
- What was built: <artifact> is available with its current behavior/status
- What's missing: remaining gaps, partial work, or "Nothing blocking in current scope"
- Acceptance criteria:
  - <crit1>
  - <crit2>

Also prepare the formal JSON payload only when:

  • risk_tier is High and the handoff crosses domains, or
  • the caller passes --formal

When the formal artifact is needed, use this JSON:

{
  "from": "<from-agent>",
  "to": "<to-agent>",
  "task_id": "<task_id or null>",
  "artifact": "<artifact>",
  "artifact_status": "<status>",
  "acceptance_criteria": ["<crit1>", "<crit2>"],
  "context_snapshot": "<path or null>",
  "risk_tier": "<risk>",
  "ts": "<ISO>",
  "session": "<branch>"
}

7. Save formal contract when required

If formal persistence is required, write to .tasks/handoffs/<from-agent>-to-<to-agent>-<task_id>.json. If task_id is null, use timestamp: .tasks/handoffs/<from-agent>-to-<to-agent>-<ts-compact>.json.

If formal persistence is not required, do not create a file. The markdown handoff summary is the default artifact.

8. Ledger entry (Medium / High risk only)

If risk_tier is Medium or High, append to production/traces/decision_ledger.jsonl:

{"ts":"<ISO>","session":"<branch>","agent_id":"<from-agent>","task_id":"<task_id>","request":"Handoff to <to-agent>","reasoning":"Artifact <artifact> is <status> — transferring ownership","choice":"Handoff summary prepared","outcome":"pass","risk_tier":"<risk>","duration_s":0}

9. Display and confirm

Print the summary first, then note whether a durable file was written:

🤝 Handoff Summary Generated
━━━━━━━━━━━━━━━━━━━━━━━━━━

  From  : @<from-agent>
  To    : @<to-agent>
  Task  : <task_id>
  File  : <artifact> [<status>]
  Risk  : <risk_tier>

  What was built:
    <one-line built summary>

  What's missing:
    <one-line gap summary>

  Acceptance Criteria:
    - <criterion 1>
    - <criterion 2>

  Context Snapshot: <path or "none">
  [if formal]: Saved to .tasks/handoffs/<filename>.json
  [if Medium/High]: Ledger entry written.

📨 Ready to hand off. @<to-agent> should verify the summary above
   before starting work on <artifact>.

Receiver Protocol

When an agent receives a handoff, it must:

  1. Read the 3-field summary (and the formal file if one exists)
  2. Verify each acceptance_criterion against the artifact
  3. If all criteria pass → begin work
  4. If any criterion fails → do NOT start work; reply to sender with:
❌ Handoff rejected — criterion failed:
   "<failing criterion>"
   Artifact: <artifact>
   Action needed: <specific fix required>

Quick Examples

# Basic handoff — backend to QA
/handoff backend-developer qa-engineer src/api/auth.ts 042

# With explicit criteria and risk
/handoff frontend-developer lead-programmer src/components/LoginForm.tsx 055 \
  --risk Low --status partial \
  --criteria "Form renders without errors" "Submit disabled when fields empty"

# Draft handoff for review before final delivery
/handoff data-engineer backend-developer src/db/migrations/004_add_users.sql 031 \
  --status draft --risk High --formal \
  --criteria "Migration runs without error on empty DB" "Down migration restores schema"

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.