Structured memory and snapshot history for AI agents
A multi-skill system for OpenCode and Claude Code that gives agents persistent, versioned memory across sessions — without rebuilding context or wasting tokens.
npx skills add rustimacc/context-ledger-skills --skill '*' -a opencode -a claude-code -g -yMost agents break because:
- context is implicit and messy
- memory is lost between sessions
- tokens are wasted rebuilding state
- no reliable way to recover past decisions
Context Ledger fixes this.
A complete memory system composed of:
- persistent structured context
- human-readable summaries
- versioned snapshots (history)
- selective context recovery
| Skill | Purpose |
|---|---|
save-context |
Store structured state + snapshot |
load-context |
Restore current working context |
list-context-history |
List available snapshots |
load-context-from-history |
Load specific past states |
/agent-memory/
context.json → source of truth
context.md → readable summary
history/ → timestamped snapshots
Core idea:
- JSON = machine memory
- Markdown = agent context
- History = controlled recall
save the current context
load the context
list context history
load context from history:
npx skills add rustimacc/context-ledger-skills --skill '*' -a opencode -a claude-code -g -ynpx skills add rustimacc/context-ledger-skills -a opencode -a claude-codenpx skills add rustimacc/context-ledger-skills --skill save-context- structured > implicit context
- minimal and actionable summaries
- history is additive, not destructive
- current context always wins
- optimized for token efficiency
- save only at meaningful checkpoints
- keep summaries short
- avoid loading too many snapshots
- use history as support, not primary context
- storing full conversations
- mixing too many historical states
- overloading context with noise
- not updating context after decisions
- OpenCode
- Claude Code
Los días más felices fueron, son y serán peronistas. Las Malvinas siempre ARGENTINAS 🇦🇷