memory-capture
Unified memory capture with routing - session compact or quick tips. Triggers on "memory capture", "compact session", "save session", "quick tip", "memory tips", "记录", "压缩会话".
pinned to #07491b0updated 2 weeks ago
Ask your AI client: “install skills/memory-capture”.
Requires the metahub MCP server installed in your client. Set up MCP.
mh install skills/memory-capturemetahub onboarded this repo on the author's behalf.
If you own github.com/catlog22/Claude-Code-Workflow on GitHub, claim the listing to take over publishing. Your claim preserves the existing eval history and badges; only the curator label is replaced with verified-publisher on your next publish.
Stars
2,143
Last commit
2 weeks ago
Latest release
published
- #claude
- #claude-code
- #cli-tools
- #codex
- #context-management
- #gemini-cli
- #json-driven
- #qwen-code
- #task-orchestration
- #workflow-automation
About this skill
Pulled from SKILL.md at publish time.
Unified memory capture skill that routes to two execution modes: - **Compact**: Compress full session memory into structured text for recovery - **Tips**: Quick note-taking for ideas, snippets, and insights
Allowed tools
- mcp__ccw-tools__core_memory(*)
- Read(*)
- AskUserQuestion
Evaluation report
WarningsAutomated checks the publisher passed at publish time — structure, docs, safety, and whether the artifact behaves as claimed.07491b0· 2 weeks ago
Kind-specific
31Skill: SKILL.md present
found at .claude/skills/memory-capture/SKILL.md · frontmatter source: SKILL.md
Skill: body content present
611 words · 4,119 chars · 11 sections · 4 code blocks
Skill: triggers declaredwarn
No `trigger` phrases in SKILL.md frontmatter
Add `trigger:` lines so Claude knows when to activate this skill — e.g. `when building MCP servers` or `for diagram creation`.
Skill: allowed-tools scope
3 declared: mcp__ccw-tools__core_memory(*), Read(*), AskUserQuestion
Release history
1- releasecurrent07491b0warn2 weeks ago
Contents
Unified memory capture skill that routes to two execution modes:
- Compact: Compress full session memory into structured text for recovery
- Tips: Quick note-taking for ideas, snippets, and insights
Architecture Overview
┌─────────────────────────────────────────────────────┐
│ Memory Capture (Router) │
│ → Parse input → Detect mode → Route to phase │
└───────────────┬─────────────────────────────────────┘
│
┌───────┴───────┐
↓ ↓
┌───────────┐ ┌───────────┐
│ Compact │ │ Tips │
│ (Phase1) │ │ (Phase2) │
│ Full │ │ Quick │
│ Session │ │ Note │
└─────┬─────┘ └─────┬─────┘
│ │
└───────┬───────┘
↓
┌───────────────┐
│ core_memory │
│ (import) │
└───────────────┘
Execution Flow
Step 1: Parse Input & Route
Detect execution mode from user input:
Auto-Route Rules (priority order):
| Signal | Route | Examples |
|---|---|---|
| Keyword: compact, session, 压缩, recovery, 保存会话 | → Compact | "compact current session" |
| Keyword: tip, note, 记录, 快速 | → Tips | "记录一个想法" |
Has --tag or --context flags | → Tips | "note content" --tag bug |
| Short text (<100 chars) + no session keywords | → Tips | "Remember to use Redis" |
| Ambiguous or no arguments | → AskUserQuestion | /memory-capture |
When ambiguous, use AskUserQuestion:
Question: "选择记忆捕获模式"
Options:
1. Compact - 压缩当前完整会话记忆(用于会话恢复)
2. Tips - 快速记录一条笔记/想法/提示
Step 2: Execute Selected Phase
Based on routing result, read and execute the corresponding phase:
- Compact mode → Ref: phases/01-compact.md
- Tips mode → Ref: phases/02-tips.md
Phase Reference Documents (read on-demand when phase executes):
| Mode | Document | Purpose |
|---|---|---|
| Compact | phases/01-compact.md | Full session memory compression and structured export |
| Tips | phases/02-tips.md | Quick note-taking with tags and context |
Step 3: Save via core_memory
Both phases converge on the same storage mechanism:
mcp__ccw-tools__core_memory({
operation: "import",
text: structuredText // Generated by the selected phase
})
Core Rules
- Single Phase Execution: Only ONE phase executes per invocation - never both
- Content Faithful: Phase files contain full execution detail - follow them verbatim
- Absolute Paths: All file paths in output must be absolute
- No Summarization: Compact mode preserves complete plan verbatim - never abbreviate
- Speed Priority: Tips mode should be fast - minimal analysis overhead
Input Processing
Compact Mode Input
- Optional:
"session description"as supplementary context - Example:
/memory-capture compactor/memory-capture "completed auth module"
Tips Mode Input
- Required:
<note content>- the tip/note text - Optional:
--tag <tag1,tag2>for categorization - Optional:
--context <context>for related code/feature reference - Example:
/memory-capture tip "Use Redis for rate limiting" --tag config
Data Flow
User Input
│
├─ [compact detected] → Read phases/01-compact.md
│ → Analyze session → Generate structured text
│ → core_memory import → Report Recovery ID
│
└─ [tips detected] → Read phases/02-tips.md
→ Parse args → Gather context → Generate tip text
→ core_memory import → Confirm with ID + tags
Error Handling
| Error | Action |
|---|---|
| core_memory import fails | Retry once, then report error with structured text for manual save |
| No session context (compact) | Warn user, generate with available info |
| Empty note content (tips) | Ask user to provide content via AskUserQuestion |
| Ambiguous routing | Default to AskUserQuestion - never guess |
Reviews
No reviews yet. Be the first.
Related
Frontend Slides
Create beautiful slides on the web using Claude's frontend skills
Guizang Ppt Skill
AI-agent Skill for generating polished HTML slide decks: editorial magazine and Swiss layouts, image prompts, social covers, and a WebGL/low-power presentation runtime.
orchestration-patterns
>
mh install skills/memory-capture