用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill context-memory命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
基于 SOC 职业分类
正在显示 SKILL.md
| name | context-memory |
| description | > Use when this capability is needed. |
Saves and searches past Claude Code sessions so context, decisions, and code persist across conversations.
Activate this skill when the user says:
Do NOT activate for:
~/.claude/context-memory/context.db~/.claude/skills/context-memory/scripts/Save the current session with an optional annotation.
Search past sessions.
--project: Limit to current project--detailed: Include full message content and code snippets--limit N: Maximum results (default: 10)User says: /remember "Fixed the JWT refresh bug"
Actions:
debugging, jwt, authentication--json
Result: "Session saved. Summary: Fixed JWT refresh token expiration bug by adding clock skew tolerance. Topics: debugging, jwt, authentication. Messages: 8 saved. Snippets: 1 saved. Note: Fixed the JWT refresh bug."User says: "what did we discuss about database migrations?" Actions:
db_search.py "database migrations" --format markdown--detailed for full context.User says: /recall authentication --detailed
Actions:
db_search.py "authentication" --detailed --format markdownWhen the user wants to save/remember the current session:
Generate a structured summary:
Extract 3-8 relevant topics (lowercase, e.g., "authentication", "react", "debugging")
Identify significant code snippets worth preserving
Select 5-15 key messages that capture the problem, decisions, and solutions
Pipe the JSON via stdin using --json -:
python "~/.claude/skills/context-memory/scripts/db_save.py" --json - << 'ENDJSON'
{
"session_id": "<UNIQUE_ID>",
"project_path": "<PROJECT_PATH>",
"messages": [
{"role": "user", "content": "..."},
{"role": "assistant", "content": "..."}
],
"summary": {
"brief": "One-line summary",
"detailed": "Full 2-3 paragraph summary...",
"key_decisions": ["Decision 1", "Decision 2"],
"problems_solved": ["Problem 1"],
"technologies": ["python", "sqlite"],
"outcome": "success"
},
"topics": ["topic1", "topic2"],
"code_snippets": [
{
"code": "def example(): pass",
"language": "python",
"description": "What this does",
"file_path": "src/example.py"
}
],
"user_note": "User's note or null"
}
ENDJSON
Important: Always use --json - (stdin) for /remember saves. This avoids temp file issues on Windows. The CLI args path (--brief, --topics) only saves a subset of fields and leaves --detailed recall empty.
When the user wants to recall/search past sessions:
python "~/.claude/skills/context-memory/scripts/db_search.py" "<QUERY>" --format markdown [--project "$(pwd)"] [--detailed] [--limit N]
Present results in a clear, scannable format.
If results are insufficient, offer to:
--project filter--detailed for deeper content# Context Memory Results
**Query**: "authentication"
**Results**: 3 sessions
---
## 1. 2026-01-15 | my-app (Match #1)
**Summary**: Implemented JWT auth with refresh token rotation
**Topics**: authentication, JWT, security, Node.js
**Decisions**:
- Use RS256 for token signing
- 15-minute access token expiry
<details><summary>Full Context</summary>
[Detailed content here]
</details>
python ~/.claude/skills/context-memory/scripts/db_init.py~/.claude/context-memory/. The directory must be writable.--project filter, or try related keywords.--json for full data. Always ask user if they want to add a note/annotationThe plugin saves a full conversation checkpoint before Claude Code compacts context, preventing loss of detail.
pre_compact_save.py) — Triggered automatically before compaction. Reads the transcript and saves all messages to the context_checkpoints table without truncation or sampling.context_load_checkpoint MCP tool — Restores the full conversation after compaction. Accepts session_id, project_path, and optional last_n_messages parameters.db_prune.py prunes old checkpoints (per-session and age-based) alongside regular session pruning.The context_checkpoints table (schema v4) stores:
session_id, project_path, project_hash — checkpoint identitycheckpoint_number, trigger_type — sequencing and trigger source (auto or manual)messages — full JSON message arraymessage_count, created_at — metadataAfter compaction, call the context_load_checkpoint MCP tool with the current project path to restore full conversation detail. Only use this when the compaction summary is missing information you need.
The optional MCP server (mcp_server.py) exposes these tools:
context_search — Search past sessions (FTS5 + BM25 ranking)context_save — Save a session with messages, summary, topics, snippetscontext_stats — Database statistics (table counts, DB size)context_init — Initialize or verify the database schemacontext_load_checkpoint — Load a pre-compact context checkpointcontext_dashboard — Launch the web dashboard in the backgroundRequires Python >= 3.10 and pip install mcp.
scripts/ directoryConverted and distributed by TomeVault — claim your Tome and manage your conversions.