Harness handoff

From xwtro0tk1t-cloud/harness · View interactive version

Harness handoff is an AI agent skill from the GitHub repository xwtro0tk1t-cloud/harness. Trigger when user says "harness handoff", "handoff context", "new agent takeover", "full project context", "load all context", "crash recovery", "transfer context", "project overview full". Provides deep context recovery (~8k tokens) for new agent handoff or crash recovery. Do NOT trigger for: "cont

How to use this skill

Skill file

Harness Handoff — Deep Context Transfer


description: Trigger when user says "harness handoff", "handoff context", "new agent takeover", "full project context", "load all context", "crash recovery", "transfer context", "project overview full". Provides deep context recovery (~8k tokens) for new agent handoff or crash recovery. Do NOT trigger for: "continue writing X function" (just code), "help me understand this file" (single file read), "what is this project" (too vague, use harness guide).


Behavior

Provide deep context recovery for new agent handoff or crash recovery scenarios. Core principle: Index-First, Fragment-on-Demand.

For lightweight same-session /compact recovery, use harness resume (~3k tokens).


Difference from Claude Code Default Behavior

Claude Code auto-loads only CLAUDE.md. This skill adds:


Read-tool Steps (1-5, deterministic file reads)

Step 1: CLAUDE.md

Step 2: task_plan.md Phase Anchor

Step 3: progress.md

Step 4: docs/ INDEX Tree

Step 5: MEMORY.md Best-Match

target = cwd.replace('/', '-').lstrip('-')
candidates = glob('~/.claude/projects/*/memory/MEMORY.md')
matches = [c for c in candidates if c.parents[1].name.lstrip('-') == target]

Bash-tool Steps (6-7, may fail gracefully)

Step 6: .harness/ Directory Check

test -d .harness && ls .harness/ || echo "No .harness directory"

Step 7: git log

git log --oneline -20 2>/dev/null || echo "No git history or not a git repo"

Output: 3-Segment Structured Summary

═══ Project Overview ═══
Main goal (from CLAUDE.md Project Overview or task_plan title)
Git status (recent 20 commits / "no git")
.harness status (contents / "none")

═══ Current Work ═══
Current Phase / latest commit / last stopped at / unfinished items

═══ Available Resources ═══
Document structure (docs/ INDEX tree)
Memory categories (MEMORY.md sections)
Harness state (.harness/ if present)

Next: Tell me what you want to do, I'll read specific doc fragments on demand

Token Budget

Target 8-12k tokens:

If exceeded: truncate progress to 100 lines first, then INDEX to 5 files.


Empty Rendering

> No project context found. Say harness to initialize a new project.

Graceful Degradation

Any file missing → output "Step skipped (file not found)" and continue. Never error out.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.