continuity-ledger — Claude Code skill: keep state across clears
The skill writes a YAML handoff with goals, decisions and next steps so a new session picks up right after /clear.
npx skills add parcadei/Continuous-Claude-v3 --skill continuity-ledger -a claude-code
npx skills add parcadei/Continuous-Claude-v3 --skill continuity_ledger -a claude-codeWhat continuity-ledger does
The skill produces a YAML document and saves it under thoughts/shared/handoffs/{session-name}/YYYY-MM-DD_HH-MM_description.yaml. The session folder name comes from the most recent existing handoff; if there are none, it falls back to general. The goal: and now: fields are mandatory because the statusline parser reads exactly those names — alternatives like objective or focus will not show up.
The document records completed tasks with file references, blockers, open questions, decisions with their rationale, findings, and which approaches worked or failed. A separate next: block lists action items for the following session. The skill is an alias for /create_handoff and emits the same format.
Before replying, the skill asks about the session outcome through AskUserQuestion and marks it with uv run python scripts/core/artifact_mark.py --latest --outcome <USER_CHOICE> from the opc directory. That step needs uv and the script present in the project repo. The reasoning behind the whole flow: every compaction is lossy, so clearing and reloading a handoff gives you fresh context with the full signal instead of accumulated degradation.
What it helps with
- save session state before running
/clear - hand open questions and blockers to the next session
- record decisions together with their rationale
- note which approaches worked and which failed
- mark the session outcome for the project history
Example prompts for the agent
- create a continuity ledger for this session
- update the handoff before I run /clear
- write the decisions and next steps into thoughts/shared/handoffs
How to install continuity-ledger
1Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill continuity-ledger -a claude-codenpx skills add parcadei/Continuous-Claude-v3 --skill continuity_ledger -a claude-code2Manually: put the files in place
~/.claude/skills/continuity_ledger/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/continuity_ledger/
1Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill continuity_ledger -a codex2Manually: put the files in place
.agents/skills/continuity_ledger/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill continuity_ledger -a cursor2Manually: put the files in place
.cursor/skills/continuity_ledger/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install parcadei/Continuous-Claude-v3 continuity_ledger2Manually: put the files in place
.github/skills/continuity_ledger/SKILL.md1Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill continuity_ledger -a gemini-cli2Platform CLI
gemini skills install https://github.com/parcadei/Continuous-Claude-v3 --path .claude/skills/continuity_ledgerManually: put the files in place
.devin/skills/continuity_ledger/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill continuity_ledger -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about continuity-ledger
How do I install continuity-ledger in Claude?
Use the skills CLI: npx skills add parcadei/Continuous-Claude-v3 --skill continuity-ledger -a claude-code. The skill file then lives at ~/.claude/skills/continuity_ledger/SKILL.md.
What does continuity-ledger do?
It creates or updates a YAML handoff covering goals, completed tasks, decisions and next steps. The file lets you continue the work in a new session after the context is cleared.
How is continuity-ledger different from /create_handoff?
The output is identical — the skill acts as an alias and writes the same YAML format.
Source text
SKILL.md · MIT
---
name: continuity-ledger
description: Create or update continuity ledger for state preservation across clears
---
# Continuity Ledger
> **Note:** This skill is now an alias for `/create_handoff`. Both output the same YAML format.
Create a YAML handoff document for state preservation across `/clear`. This is the same as `/create_handoff`.
## Process
### 1. Filepath & Metadata
**First, determine the session name from existing handoffs:**
```bash
ls -td thoughts/shared/handoffs/*/ 2>/dev/null | head -1 | xargs basename
```
This returns the most recently modified handoff folder name (e.g., `open-source-release`). Use this as the handoff folder name.
If no handoffs exist, use `general` as the folder name.
**Create your file under:** `thoughts/shared/handoffs/{session-name}/YYYY-MM-DD_HH-MM_description.yaml`, where:
- `{session-name}` is from existing handoffs (e.g., `open-source-release`) or `general` if none exist
- `YYYY-MM-DD` is today's date
- `HH-MM` is the current time in 24-hour format (no seconds needed)
- `description` is a brief kebab-case description
**Examples:**
- `thoughts/shared/handoffs/open-source-release/2026-01-08_16-30_memory-system-fix.yaml`
- `thoughts/shared/handoffs/general/2026-01-08_16-30_bug-investigation.yaml`
### 2. Write YAML handoff (~400 tokens)
**CRITICAL: Use EXACTLY this YAML format. Do NOT deviate or use alternative field names.**
The `goal:` and `now:` fields are shown in the statusline - they MUST be named exactly this.
```yaml
---
session: {session-name from ledger}
date: YYYY-MM-DD
status: complete|partial|blocked
outcome: SUCCEEDED|PARTIAL_PLUS|PARTIAL_MINUS|FAILED
---
goal: {What this session accomplished - shown in statusline}
now: {What next session should do first - shown in statusline}
test: {Command to verify this work, e.g., pytest tests/test_foo.py}
done_this_session:
- task: {First completed task}
files: [{file1.py}, {file2.py}]
- task: {Second completed task}
files: [{file3.py}]
blockers: [{any blocking issues}]
questions: [{unresolved questions for next session}]
decisions:
- {decision_name}: {rationale}
findings:
- {key_finding}: {details}
worked: [{approaches that worked}]
failed: [{approaches that failed and why}]
next:
- {First next step}
- {Second next step}
files:
created: [{new files}]
modified: [{changed files}]
```
**Field guide:**
- `goal:` + `now:` - REQUIRED, shown in statusline
- `done_this_session:` - What was accomplished with file references
- `decisions:` - Important choices and rationale
- `findings:` - Key learnings
- `worked:` / `failed:` - What to repeat vs avoid
- `next:` - Action items for next session
**DO NOT use alternative field names like `session_goal`, `objective`, `focus`, `current`, etc.**
**The statusline parser looks for EXACTLY `goal:` and `now:` - nothing else works.**
### 3. Mark Session Outcome (REQUIRED)
**IMPORTANT:** Before responding to the user, you MUST ask about the session outcome.
Use the AskUserQuestion tool with these exact options:
```
Question: "How did this session go?"
Options:
- SUCCEEDED: Task completed successfully
- PARTIAL_PLUS: Mostly done, minor issues remain
- PARTIAL_MINUS: Some progress, major issues remain
- FAILED: Task abandoned or blocked
```
After the user responds, mark the outcome:
```bash
# Mark the most recent handoff (works with PostgreSQL or SQLite)
PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "${CLAUDE_PROJECT_DIR:-.}")
cd "$PROJECT_ROOT/opc" && uv run python scripts/core/artifact_mark.py --latest --outcome <USER_CHOICE>
```
### 4. Confirm completion
After marking the outcome, respond to the user:
```
Handoff created! Outcome marked as [OUTCOME].
Resume in a new session with:
/resume_handoff path/to/handoff.yaml
```
## When to Use
- Before running `/clear`
- Context usage approaching 70%+
- Multi-day implementations
- Complex refactors you pick up/put down
- Any session expected to hit 85%+ context
## When NOT to Use
- Quick tasks (< 30 min)
- Simple bug fixes
- Single-file changes
## Why Clear Instead of Compact?
Each compaction is lossy compression—after several compactions, you're working with degraded context. Clearing + loading the handoff gives you fresh context with full signal.
© parcadei · MIT · parcadei/Continuous-Claude-v3