From coordination
Use when completing work in a worktree or ending a session - writes a structured memory transfer record so the next agent can continue without context loss; prevents duplicate work and cold-start ramp-up
npx claudepluginhub nice-wolf-studio/wolf-skills-marketplace --plugin coordinationThis skill uses the workspace's default tool permissions.
Write a structured memory transfer record when finishing work. Inspired by [Smith's](https://github.com/callmeradical/smith) iterative handoff protocol — append-only, sequenced, per-agent records stored in the project's shared coordination space.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Write a structured memory transfer record when finishing work. Inspired by Smith's iterative handoff protocol — append-only, sequenced, per-agent records stored in the project's shared coordination space.
Handoffs are NOT logs. They are memory transfers — the minimum context the next execution unit needs to reconstruct state without the model memory that created it.
/pickup in a new session (someone must have handed off first)/signal insteadAll handoff data lives in a shared location accessible to all worktrees:
{main-worktree}/.claude/handoff/
├── active/ # Who's currently working (presence)
│ └── {agent-name}.json # One file per active agent
├── journal/ # Execution events (append-only)
│ └── {agent-name}/
│ └── 0001.md # Sequenced, left-padded
├── handoffs/ # Memory transfer records
│ └── {agent-name}/
│ └── 0001.md # One per handoff, sequenced
└── HANDOFFS.md # Global index of all handoffs
Agents may be in worktrees (isolated copies). The coordination space is ALWAYS in the main worktree:
# Get main worktree path (first line of output)
MAIN_WORKTREE=$(git worktree list --porcelain | head -1 | sed 's/worktree //')
HANDOFF_DIR="${MAIN_WORKTREE}/.claude/handoff"
Your agent name is derived from your context:
feat-auth-refactor)main, fix-logging)agent-$(date +%s) (timestamp-based unique ID)# Detect agent name
if git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
WORKTREE_PATH=$(git rev-parse --show-toplevel)
MAIN_WORKTREE=$(git worktree list --porcelain | head -1 | sed 's/worktree //')
if [ "$WORKTREE_PATH" != "$MAIN_WORKTREE" ]; then
AGENT_NAME=$(basename "$WORKTREE_PATH")
else
AGENT_NAME=$(git branch --show-current)
fi
fi
Determine the main worktree path and your agent name using the commands above. Verify the handoff directory exists, create it if not:
mkdir -p "${HANDOFF_DIR}/active" "${HANDOFF_DIR}/journal/${AGENT_NAME}" "${HANDOFF_DIR}/handoffs/${AGENT_NAME}"
Gate: You know your agent name AND the absolute path to the shared handoff directory.
Collect what you need for the handoff record:
git rev-parse HEADgit branch --show-currentgit diff --name-only {previous-sha}..HEAD (or git diff --name-only $(git merge-base HEAD main)..HEAD if no prior handoff)Gate: You have a clear, factual list of done/remaining/decisions. No prose — structured data.
Check existing handoffs for your agent to get the next sequence number:
# Find the highest existing sequence number
LAST=$(ls "${HANDOFF_DIR}/handoffs/${AGENT_NAME}/" 2>/dev/null | sort -n | tail -1 | sed 's/\.md//')
NEXT=$(printf "%04d" $(( ${LAST:-0} + 1 )))
Gate: You have a unique, sequential filename like 0001.md, 0002.md, etc.
Write the handoff file to ${HANDOFF_DIR}/handoffs/${AGENT_NAME}/${NEXT}.md:
---
sequence: {N}
agent: {agent-name}
branch: {branch-name}
sha: {current-sha}
previous_sha: {sha-from-last-handoff-or-merge-base}
timestamp: {ISO-8601}
---
## Done
- {Completed item 1}
- {Completed item 2}
## Remaining
- {Unfinished item 1}
- {Unfinished item 2}
## Decisions
- {Decision 1}: {rationale}
- {Decision 2}: {rationale}
## Key Files
- {path/to/file1} — {what changed and why}
- {path/to/file2} — {what changed and why}
Keep it tight. Each item should be one line. No paragraphs. The next agent needs to parse this in under 100 tokens.
Gate: Handoff file is written and contains all four sections.
Append to HANDOFFS.md — add one line to the global index:
- [{NEXT}] {agent-name} ({timestamp}) — {one-line summary of what was done}
Create HANDOFFS.md if it doesn't exist, with a header: # Handoff Index
Write a journal entry — record this handoff event:
Write to ${HANDOFF_DIR}/journal/${AGENT_NAME}/{NEXT}.md:
---
type: handoff
agent: {agent-name}
timestamp: {ISO-8601}
---
Handed off at {sha}. Done: {count} items. Remaining: {count} items.
Remove presence file (if one exists in active/):
rm -f "${HANDOFF_DIR}/active/${AGENT_NAME}.json"
Gate: HANDOFFS.md is updated, journal entry written, presence cleaned up.
If you catch yourself:
.claude/handoff/ instead of the main worktree — other agents won't see itSTOP. Go back to Step 2 and gather structured data.
Before considering the handoff complete:
{main-worktree}/.claude/handoff/handoffs/{agent}/{NNNN}.md| Field | Required | Description |
|---|---|---|
sequence | Yes | Left-padded sequence number (0001, 0002, ...) |
agent | Yes | Worktree name or branch name |
branch | Yes | Git branch name |
sha | Yes | Current HEAD SHA |
previous_sha | Yes | SHA from last handoff or merge-base with main |
timestamp | Yes | ISO-8601 timestamp |
| Section | Required | Purpose |
|---|---|---|
| Done | Yes | What was completed — the next agent doesn't need to do this |
| Remaining | Yes | What's unfinished — the next agent starts here |
| Decisions | Yes | Choices made that constrain future work |
| Key Files | Yes | Files touched with brief rationale |
previous_sha creates a chain. The pickup skill uses this to walk the history./pickup — The consumer of handoff records. Reads and synthesizes handoffs into a briefing./signal — Mid-work coordination. Use for live signals; handoff is for completed work./coordinate — Distributed coordination via the switchboard repo. Handoffs are the permanent record; coordinate is the live state./repo-ingest — Updates the coordination protocol by learning from external repos like Smith.MANDATORY NEXT STEPS:
OPTIONAL NEXT STEPS:
/pickup in a new session to verify your handoff reads cleanlyv1.1.0 (2026-04-11)
v1.0.0 (2026-04-11)