lhl/agentic-memory/clawvault
Claude Code and agent skill by lhl/agentic-memory
- community
Checking that the SKILL.md file is still in the repository.
Agent memory system with memory graph, context profiles, checkpoint/recover, structured storage, semantic search, and observational memory. Use when: storing/searching memories, preventing context death, graph-aware context retrieval, repairing broken sessions. Don't use when: general file I/O.
Install
npx vskill@latest install lhl/agentic-memory/clawvaultSKILL.md
ClawVault π
An elephant never forgets. Structured memory for OpenClaw agents.
Built for [OpenClaw](https://openclaw.ai). Canonical install: npm CLI + hook install + hook enable.
Security & Transparency
What this skill does:
- Reads/writes markdown files in your vault directory (
CLAWVAULT_PATHor auto-discovered) repair-sessionreads and modifies OpenClaw session transcripts (~/.openclaw/agents/) β creates backups before writing- Provides an OpenClaw hook pack (
hooks/clawvault/handler.js) with lifecycle events (gateway:startup,gateway:heartbeat,command:new,session:start,compaction:memoryFlush,cron.weekly). Hook is opt-in and must be installed/enabled. observe --compressmakes LLM API calls (Gemini Flash by default) to compress session transcripts into observations
Environment variables used:
CLAWVAULT_PATHβ vault location (optional, auto-discovered if not set)OPENCLAW_HOME/OPENCLAW_STATE_DIRβ used byrepair-sessionto find session transcriptsGEMINI_API_KEYβ used byobservefor LLM compression (optional, only if using observe features)
No cloud sync β all data stays local. No network calls except LLM API for observe compression.
This is a full CLI tool, not instruction-only. It writes files, registers hooks, and runs code.
Auditability: the published ClawHub skill bundle includes SKILL.md, HOOK.md, and hooks/clawvault/handler.js so users can inspect hook behavior before enabling it.
Install (Canonical)
clawhub install clawvault can install skill guidance, but does not replace explicit hook pack installation.
Recommended Safe Install Flow
Setup
Quick Start for New Agents
Reality Checks Before Use
ClawVault currently depends on qmd for core vault/query flows.
Current Feature Set
Memory Graph
ClawVault builds a typed knowledge graph from wiki-links, tags, and frontmatter:
Graph is stored at .clawvault/graph-index.json β schema versioned, incremental rebuild.
Graph-Aware Context Retrieval
Context Profiles
| Profile | Purpose | |
|---|---|---|
default | Balanced retrieval | |
planning | Broader strategic context | |
incident | Recent events, blockers, urgent items | |
handoff | Session transition context | |
auto | Hook-selected profile based on session intent |
OpenClaw Compatibility Diagnostics
Core Commands
Wake + Sleep (primary)
Store memories by type
Quick capture to inbox
Search (requires qmd installed)
Context Death Resilience
Wake (start of session)
Sleep (end of session)
Checkpoint (save state frequently)
Recover (manual check)
Handoff (manual session end)
Recap (bootstrap new session)
Auto-linking
Wiki-link entity mentions in markdown files:
Folder Structure
Best Practices
- Wake at session start β
clawvault wakerestores context - Checkpoint every 10-15 min during heavy work
- Sleep before session end β
clawvault sleepcaptures next steps - Use types β knowing WHAT you're storing helps WHERE to put it
- Wiki-link liberally β
[[person-name]]builds your knowledge graph
Checklist for AGENTS.md
Append this checklist to existing memory instructions. Do not replace your full AGENTS.md behavior unless you intend to.
Session Transcript Repair (v1.5.0+)
When the Anthropic API rejects with "unexpected tool_use_id found in tool_result blocks", use:
What it fixes:
- Orphaned
tool_resultblocks referencing non-existenttool_useIDs - Aborted tool calls with partial JSON
- Broken parent chain references
Backups are created automatically (use --no-backup to skip).
Troubleshooting
- qmd not installed β install qmd, then confirm with
qmd --version - No ClawVault found β run
clawvault initor setCLAWVAULT_PATH - CLAWVAULT_PATH missing β run
clawvault shell-initand add to shell rc - Too many orphan links β run
clawvault link --orphans - Inbox backlog warning β process or archive inbox items
- "unexpected tool_use_id" error β run
clawvault repair-session - OpenClaw integration drift β run
clawvault compat - Hook enable fails / hook not found β run
openclaw hooks install clawvault, thenopenclaw hooks enable clawvault, restart gateway, and verify viaopenclaw hooks list --verbose - Graph out of date β run
clawvault graph --refresh - Wrong context for task β try
clawvault context --profile incidentor--profile planning
Stability Snapshot
- Typecheck passes (
npm run typecheck) - Test suite passes (
449/449) - Cross-platform path handling hardened for Windows in:
- qmd URI/document path normalization
- WebDAV path safety and filesystem resolution
- shell-init output expectations
- OpenClaw runtime wiring validated by
clawvault compat --strict(requires localopenclawbinary for full runtime validation)
Integration with qmd
ClawVault uses qmd for search:
Environment Variables
CLAWVAULT_PATHβ Default vault path (skips auto-discovery)OPENCLAW_HOMEβ OpenClaw home directory (used by repair-session)OPENCLAW_STATE_DIRβ OpenClaw state directory (used by repair-session)GEMINI_API_KEYβ Used byobservefor LLM-powered compression (optional)
Links
- npm: https://www.npmjs.com/package/clawvault
- GitHub: https://github.com/Versatly/clawvault
- Issues: https://github.com/Versatly/clawvault/issues
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingvendor/clawvault/SKILL.md
Popularity
- Repository stars
- 31
- Repository forks
- 1
- 7-day trend score
- 17
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lhl/agentic-memory/clawvault)