Context Persistence

Persist research outputs to structured .claude-work files with session claiming.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/thomasttvo/claude-skills --skill context-persistence
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Context Persistence
Source: https://github.com/thomasttvo/claude-skills/tree/main/skills/context-persistence
Command: npx skills add https://github.com/thomasttvo/claude-skills --skill context-persistence

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Research, multi-phase analysis, and architectural planning often produce intermediate findings that are lost when conversation context is compacted or sessions end; this Skill ensures those substantive outputs are persisted to disk so work can continue across phases, agents, and repositories without data loss.

Core Features & Use Cases

  • Durable persistence: Writes research files, indexes, and a catalog under $CLAUDE_PROJECT_DIR/.claude-work/<session-id>/<task-slug>/ so outputs survive context compaction and session restarts.
  • Team-safe coordination: Enforces single-writer rules for _index.md and _active.md, uses lead-only ownership, and provides per-agent subdirectories with an append-only _manifest.md to avoid contention.
  • Staleness detection & recovery: Uses timestamps, heartbeat-based session claiming, and index flags to detect outdated downstream files and guide safe regeneration.
  • Use case: Run a multi-source vendor evaluation that spans research, consolidation, and recommendation phases and have Claude persist, claim, and resume work reliably across sessions or team members.

Quick Start

Persist this task's research outputs to .claude-work/<session-id>/<your-slug>/, create _index.md and _active.md, and add a row to _catalog.md so findings survive compaction and can be resumed.

Frequently Asked Questions about Context Persistence

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I persist research outputs across sessions when conversation context is compacted?

To persist research outputs across sessions, this Skill writes findings, indexes, and a catalog to durable files under a .claude-work directory so intermediate analysis survives context compaction and session restarts without data loss.

What is the best way to manage multi-phase research files so multiple agents can resume work?

Managing multi-phase research files is handled by maintaining a structured directory with a catalog, task subdirectories, and active indexes, allowing multiple agents or sessions to claim, resume, and share research work reliably.

How do I prevent file write collisions when multiple team members or agents write research files simultaneously?

To prevent file write collisions during team research, the system enforces single-writer rules for index files, uses lead-only ownership, and provides per-agent subdirectories with an append-only manifest to avoid contention.

How does staleness detection work for persisted research files from previous sessions?

Staleness detection for persisted research files uses timestamps, heartbeat-based session claiming, and index flags to identify outdated downstream files and guide safe regeneration of stale research outputs.

Can I use this for deep codebase exploration findings that need to be shared across repositories?

You can use this for deep codebase exploration because it persists intermediate analysis to disk, allowing architectural planning and evaluation findings to be shared and resumed across sessions, agents, or repositories.