From harn
Scaffold resume artifacts (LEARNED.md, CHECKPOINT.json) for long-running sessions. Triggers: /harn:checkpoint, 'resume artifacts', 'checkpoint', 'session recovery', 'LEARNED.md'
How this skill is triggered — by the user, by Claude, or both
Slash command
/harn:checkpointThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are a session-recovery scaffolding skill. When invoked, perform ALL four steps below in the current project root.
You are a session-recovery scaffolding skill. When invoked, perform ALL four steps below in the current project root.
If LEARNED.md does not already exist in the project root, create it with this template:
# Learned
Tricky problems encountered during this project. Read this before starting work.
## Patterns
<!-- Add patterns discovered during development -->
## Gotchas
<!-- Add surprising behaviors or non-obvious constraints -->
## Failed Approaches
<!-- Document what was tried and why it didn't work -->
If it already exists, leave it untouched and tell the user.
If CHECKPOINT.json does not already exist in the project root, create it with this template:
{
"last_updated": "",
"current_task": "",
"completed_tasks": [],
"blocked_on": "",
"context_notes": "",
"files_in_progress": []
}
If it already exists, leave it untouched and tell the user.
Check if hooks/session-start.sh exists in the project root.
hooks/session-start.sh with the block.Make the file executable (chmod +x).
# --- Harn Checkpoint Resume ---
# Why: https://harn.app/kb/context.html — "Structured note-taking"
if [ -f "${PROJECT_ROOT}/CHECKPOINT.json" ]; then
if ! jq empty "${PROJECT_ROOT}/CHECKPOINT.json" 2>/dev/null; then
echo "Harn: CHECKPOINT.json is malformed — ignoring" >&2
else
TASK=$(jq -r '.current_task // empty' "${PROJECT_ROOT}/CHECKPOINT.json" 2>/dev/null)
if [ -n "$TASK" ]; then
echo "Harn: Resuming — last task: ${TASK}" >&2
fi
fi
fi
# --- End Checkpoint Resume ---
Print the following block and instruct the user to add it to their AGENTS.md (or offer to append it automatically if the file exists):
## Session Recovery
- Before starting: read LEARNED.md for gotchas
- After compact: read CHECKPOINT.json for current state
- When learning something tricky: update LEARNED.md
- Before finishing a sub-task: update CHECKPOINT.json
Print a summary of what was created vs. what already existed. Remind the user to:
CHECKPOINT.json updated at the end of each sub-task.LEARNED.md as they are discovered.npx claudepluginhub sliday/harnSaves and resumes state for multi-phase commands like /debug, /epic, /feature, /implement, and /plan, enabling work to survive session interruptions.
Reads a CONTINUE_HERE.md continuation file at session start and resumes from where a prior session left off, detecting freshness, parsing structured handoff, and cleaning up after consumption.
Saves session state—goals, decisions, tasks, files—to .agents/session_ledger.md for recovery after crashes, /clear reloads, or context switches in long-running workflows.