Agent skill

session-resume

Session resume protocol and session repairs handling. Loaded when spellbook_session_init returns resume_available: true, or when session_init returns a repairs array. Triggers: 'resume', 'continue', 'where were we', session resume, session repairs.

Stars 5
Forks 2

Install this agent skill to your Project

npx add-skill https://github.com/axiomantic/spellbook/tree/main/skills/session-resume

SKILL.md

Invariant Principles

  1. Boot Prompt Executes Immediately - The resume boot prompt runs before any other user interaction; it is not optional or deferrable.
  2. Continuation Intent Governs Action - The user's first message determines whether to resume, start fresh, or default to resume; never assume.
  3. Corrupted State Is Announced, Not Silently Skipped - If todos or workflow state is malformed, inform the user explicitly rather than proceeding with partial data.

Session Resume Protocol

When spellbook_session_init returns resume_available: true, follow this protocol exactly.

Resume Fields

Field Type Description
resume_available bool Recent session (<24h) exists
resume_session_id string Session soul ID
resume_age_hours float Hours since bound
resume_bound_at string ISO bind timestamp
resume_active_skill string Active skill (e.g., "develop")
resume_skill_phase string Skill phase (e.g., "DESIGN")
resume_pending_todos int Incomplete todo count
resume_todos_corrupted bool Todo JSON malformed
resume_workflow_pattern string Workflow (e.g., "TDD")
resume_boot_prompt string Section 0 boot prompt

Resume Execution

  1. Execute resume_boot_prompt IMMEDIATELY (Section 0 actions)
  2. Section 0 includes: skill invocation with --resume <phase> if active, Read() for planning docs, TodoWrite() for todo state, behavioral constraints from prior session
  3. After Section 0, announce restoration in greeting

If resume_todos_corrupted: true: announce to user that todo state was malformed and requires manual restoration.

Continuation Detection

Pattern Intent Action
"continue", "resume", "where were we" continue Execute boot prompt
"start fresh", "new session", "clean slate" fresh_start Skip resume, return resume_available: false
"ok", "next", neutral message neutral Execute boot prompt (if session exists)

Session Repairs

When spellbook_session_init returns a repairs array, display each repair according to its severity:

Severity Action
error Display prominently. These may affect functionality.
warning Display as informational. Suggest the fix command.

Example Greeting with Repairs

Welcome to spellbook-enhanced Claude.

Repairs needed:

  • TTS is enabled but kokoro is not installed. Fix: uv pip install 'spellbook[tts]'

Expand your agent's capabilities with these related and highly-rated skills.

axiomantic/spellbook

spellbook-auditing

Meta-audit skill for spellbook development. Spawns parallel subagents to factcheck docs, optimize instructions, find token savings, and identify MCP candidates. Produces actionable report.

5 2
Explore
axiomantic/spellbook

documentation-updates

Use after modifying library skills, library commands, or agents to ensure CHANGELOG, README, and docs are updated

5 2
Explore
axiomantic/spellbook

project-encyclopedia

[DEPRECATED] Use project-level AGENTS.md files instead. Previously used for first-session codebase onboarding and persistent glossary creation.

5 2
Explore
axiomantic/spellbook

reviewing-impl-plans

Use when reviewing implementation plans before execution. Triggers: 'is this plan solid', 'review the plan', 'check before I start building', 'anything missing from this plan', 'will this plan work', 'audit the implementation plan'. NOT for: reviewing design documents (use reviewing-design-docs) or creating plans (use writing-plans).

5 2
Explore
axiomantic/spellbook

brainstorming

Use when exploring design approaches, generating ideas, or making architectural decisions. Triggers: 'explore options', 'what are the tradeoffs', 'how should I approach', 'let's think through', 'sketch out an approach', 'I need ideas for', 'how would you structure', 'what are my options'. Also invoked by develop when design decisions are needed.

5 2
Explore
axiomantic/spellbook

debugging

Use when debugging bugs, test failures, or unexpected behavior. Triggers: 'why isn't this working', 'this doesn't work', 'X is broken', 'something's wrong', 'getting an error', 'exception in', 'stopped working', 'regression', 'crash', 'hang', 'flaky test', 'intermittent failure', or when user pastes a stack trace/error output. NOT for: test quality issues (use fixing-tests), adding new behavior (use develop).

5 2
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results