From harn
Scaffold resume artifacts (LEARNED.md, CHECKPOINT.json) for long-running sessions. Triggers: /harn:checkpoint, 'resume artifacts', 'checkpoint', 'session recovery', 'LEARNED.md'
npx claudepluginhub sliday/harnThis skill uses the workspace's default tool permissions.
You are a session-recovery scaffolding skill. When invoked, perform ALL four steps below in the current project root.
Provides Ktor server patterns for routing DSL, plugins (auth, CORS, serialization), Koin DI, WebSockets, services, and testApplication testing.
Conducts multi-source web research with firecrawl and exa MCPs: searches, scrapes pages, synthesizes cited reports. For deep dives, competitive analysis, tech evaluations, or due diligence.
Provides demand forecasting, safety stock optimization, replenishment planning, and promotional lift estimation for multi-location retailers managing 300-800 SKUs.
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.