Context handoff
Five executable Claude Code skills for building autonomous agent harnesses that don't silently fail — failure-mode auditing, constraint-first CLAUDE.md, sub-agent briefing, context handoff, pre-flight checks.
npx -y skills add aimasteracc/harness-kit --skill context-handoffAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Produce a structured handoff document that lets work survive a context reset, compaction, or a fresh session without losing the thread. Use when the user says "context handoff", "save context before compaction", "hand this off", or when an agent is approaching its context limit mid-task.
SKILL.md
2.9 KB, 651 tokens by cl100k_base, as published. Nobody here has run it
context-handoff — Survive a context reset without losing the thread
Purpose
Long autonomous work outlives a single context window. When the window fills (or a session ends), everything not written down is lost — and the next session re-derives it badly or not at all. This skill captures the minimum sufficient state to resume cleanly: not a transcript dump, but the working set a fresh agent needs to pick up exactly where this one left off.
When to trigger
- The agent is nearing its context limit mid-task (don't wait for the panic — hand off early).
- A session is ending with work in progress.
- Handing a task from one agent/person to another.
How to run
- Capture only the working set — what's needed to continue, not a history of what happened.
- Write to a durable location:
./.handoff/<task-slug>.md(or a memory key the user names). - Make the next step unambiguous. The single most important field is "NEXT ACTION" — the very next concrete thing the resuming agent should do.
- Point to evidence, don't inline it — file paths, line numbers, command outputs by reference.
The handoff template
# Handoff: <task>
## Goal (unchanged)
<the original objective, one or two lines>
## NEXT ACTION ← start here
<the single concrete next step, specific enough to execute without re-reading everything>
## State / progress
- Done: <what's verified complete — with evidence: passing cmd, committed sha, rendered screen>
- In progress: <what's half-done, and exactly where it stands>
- Not started: <remaining scope>
## Key decisions & constraints
- <decisions already made and why — so they aren't relitigated>
- <hard constraints that must hold>
## Landmines / open questions
- <what bit me, what's fragile, what's still unresolved>
## Map (where things are)
- <file:line pointers, relevant commands, the 2–3 files that matter>
Principles
- Resumability over completeness. A short doc that lets the next agent act beats a long one that buries the next action.
- Evidence by reference. Link to the passing command / commit / file:line; don't paste logs.
- Decisions are state too. Record why, so the resuming agent doesn't reopen settled questions.
- Hand off early. A clean save at 70% context beats a panicked one at 95%.
Notes
- If a
.handoff/for this task already exists, update it in place — keep one current handoff per task, not a pile of stale ones. - Pairs with the
context-handofftrigger insidefailure-mode-auditmode #3 (context anxiety): the handoff is the mechanism that turns "nearing the limit" into a clean checkpoint, not a rush.
Gives 0 of the 12 instructions most agent orchestration skills give in 651 tokens
Counted across 742 of the 995 authors here whose files we hold, read 2026-08-06
- run the full test suite after integrating changesin 53 of 742, across 20 files
- reference existing artifacts by path or URLin 52 of 742, across 22 files
- dispatch one agent per independent problem domainin 50 of 742, across 17 files
- verify fixes do not conflictin 45 of 742, across 13 files
- include a suggested skills section in the documentin 45 of 742, across 15 files
- redact sensitive informationin 41 of 742, across 11 files
- save to the temporary directory of the operating systemin 39 of 742, across 9 files
- tailor the document to user-provided focus argumentsin 39 of 742, across 9 files
- spot check agent changes for systematic errorsin 34 of 742, across 7 files
- write a handoff document summarising the current conversationin 31 of 742, across 6 files
- assign each agent a specific scopein 23 of 742, across 8 files
- provide specific scope and clear goalin 23 of 742, across 5 files
Said here and by no other author read
- capture only the working set needed to continue
- write the handoff to a durable location
- make the next step unambiguous
- point to evidence by reference
- keep one current handoff per task
- hand off early before reaching the context limit
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.