skills/handoff/SKILL.md
Save session state for the next agent. Triggers on "handoff", "h", "hc", session update, or agent switch requests. Writes session.md with completed tasks, pending work, blockers, and learnings. Not for Haiku orchestrators — use /handoff-haiku instead.
npx skillsauth add ddaanet/agent-core handoffInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Update session.md for agent handoff, preserving critical context for the next agent.
Standard (Sonnet)
CRITICAL: If you are a Haiku orchestrator, use /handoff-haiku instead.
Write session.md following this structure:
# Session Handoff: [Date]
**Status:** [Brief 1-line summary]
## Completed This Session
**[Category/Feature]:**
- Item with specifics (file: path/to/report.md)
- Item with context (metrics, root cause, decisions)
## In-tree Tasks
- [ ] **Task name** — description | model
- [ ] **Another task** — description | model | restart
## Worktree Tasks
- [ ] **Task name** — description | model
## Blockers / Gotchas
**[Issue]:**
- Root cause, impact, resolution/workaround
## Next Steps
[1-2 sentences on immediate next action]
## Reference Files
- `path/to/file` — description
Allowed sections only. NEVER create "Learnings", "Key Decisions", or other sections. Learnings go to learnings.md.
Carry-forward rule: In-tree Tasks and Worktree Tasks are accumulated data. Read current sections, carry forward verbatim. Only mutate: mark completed [x], mark blocked [!] with reason (see task-failure-lifecycle.md), mark failed [†] with error summary, mark canceled [–] with reason, append new tasks, update metadata changed this session. Do NOT rewrite, compress, or de-duplicate existing sub-items. Blocked/failed/canceled tasks persist across handoffs — do NOT trim them.
Task classification (D-9): When creating new tasks, classify into the correct section:
Command derivation: Run Bash: edify _worktree ls to load current plan statuses. For tasks with a plan directory, derive the backtick command from the plan's lifecycle status:
requirements → /design plans/{name}/requirements.mdoutlined → /runbook plans/{name}/outline.mddesigned → /runbook plans/{name}/design.mdplanned → plugin/bin/prepare-runbook.py plans/{name}ready → /orchestrate {name}review-pending → /deliverable-review plans/{name}rework, reviewed, delivered) → preserve existing commandNon-plan tasks keep their static command. This prevents stale commands from persisting across handoffs.
NEVER reference commits as pending in session.md — no "ready to commit" language.
Worktree-terminal state: If no [ ] pending tasks AND in a worktree (git rev-parse --git-dir ≠ .git), Next Steps = "Branch work complete." No merge-to-main instructions — the merge is tracked on main's session.md and performed from main.
Haiku tasks require execution criteria (acceptance criteria, test commands, or plan references):
- [ ] **Enhance prepare-runbook.py** — Add phase file assembly | haiku
- Accept directory input, detect runbook-phase-*.md files
- Verify: `prepare-runbook.py plans/statusline-parity/` succeeds
Without criteria, haiku cannot verify alignment and quality surfaces only at commit time.
Target: 75-150 lines.
Preserve: file paths, line numbers, metrics, root causes, failed approaches, decision rationale, rejected tradeoffs.
No commit hashes in session.md. They change on amend and rebase. Use file paths and plan names as stable references.
Omit: execution logs (git history), obvious outcomes, dead-end debugging, info already in referenced files.
Discussion substance: When a session included design debate or trade-off analysis, preserve conclusions and rejected alternatives — not the conversation flow.
Append to agents/learnings.md (not session.md). Format: H2 title → Anti-pattern → Correct pattern → Rationale. No blank line after title.
Title format (enforced by precommit):
When or How to Titles become /when and /how triggers mechanically. Design decisions are learnings; learnings.md is a staging area for /codify consolidation.
Append-only. Never overwrite or trim.
Trigger: Session modified enforcement (validators, scripts) or behavioral rules (fragments, skills).
Review loaded learnings.md (already in memory — no Read needed). Remove any learning claiming something now false. Changes and cleanup must be atomic.
When a plan completed this session, append to agents/plan-archive.md: H2 heading + paragraph (2-4 sentences: deliverable, modules, decisions).
Delete completed tasks only if BOTH: (1) completed before this conversation, AND (2) committed. Extract learnings before deleting.
Do NOT delete tasks completed in the current conversation, even if just committed.
Run just precommit after all writes (session.md, learnings.md, plan-archive.md). On failure: output the precommit result and STOP — wait for guidance. On success: continue to STATUS display.
Output Status. — Stop hook renders via _status CLI.
Read continuation from additionalContext or [CONTINUATION: ...] suffix. If skill needs a subroutine: prepend entries (existing entries stay in original order — append-only invariant). Peel first entry from (possibly modified) continuation, tail-call: Skill(skill: "<target>", args: "<target-args> [CONTINUATION: <remainder>]"). If empty: stop.
Do NOT include continuation metadata in Task tool prompts.
tools
Manage git worktrees for parallel task execution. Triggers on "create a worktree", "set up parallel work", "merge a worktree", "branch off a task", or uses the `wt`, `wt merge`, or `wt-rm` shortcuts. Worktree lifecycle: creation, focused sessions, merge ceremony, cleanup, parallel task setup.
testing
Recall behavioral knowledge from project decisions. Triggers on "when to do X", situational patterns, or decision content for recognized situations. Invoke with "/when <trigger>".
tools
Sync edify fragments and portable justfile to match the current plugin version. Detects user-edited files and warns instead of overwriting. Use --force to overwrite conflicts.
testing
Write compact bash scripts using exec tracing pattern. Triggers when writing bash scripts with 3+ sequential commands. The exec 2>&1 + set -xeuo pipefail pattern eliminates echo statements via automatic command tracing, reducing script size by 40-60%.