Skip to main content

memory-capture

Unified memory capture with routing - session compact or quick tips. Triggers on "memory capture", "compact session", "save session", "quick tip", "memory tips", "่ฎฐๅฝ•", "ๅŽ‹็ผฉไผš่ฏ".

Source facts

Repository
catlog22/Claude-Code-Workflow
Last source activity
February 13, 2026 at 09:42
Detected SKILL.md language
English
Stars
2,128
Forks
166

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

File Explorer
3 files

Showing SKILL.md

SKILL.md
Source instructions ยท Read-only preview
name
memory-capture
description
Unified memory capture with routing - session compact or quick tips. Triggers on "memory capture", "compact session", "save session", "quick tip", "memory tips", "่ฎฐๅฝ•", "ๅŽ‹็ผฉไผš่ฏ".
allowed-tools
mcp__ccw-tools__core_memory(*), Read(*), AskUserQuestion
# Memory Capture Skill 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](phases/01-compact.md) - **Tips mode** โ†’ Ref: [phases/02-tips.md](phases/02-tips.md) **Phase Reference Documents** (read on-demand when phase executes): | Mode | Document | Purpose | |------|----------|---------| | Compact | [phases/01-compact.md](phases/01-compact.md) | Full session memory compression and structured export | | Tips | [phases/02-tips.md](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: ```javascript mcp__ccw-tools__core_memory({ operation: "import", text: structuredText // Generated by the selected phase }) ``` ## Core Rules 1. **Single Phase Execution**: Only ONE phase executes per invocation - never both 2. **Content Faithful**: Phase files contain full execution detail - follow them verbatim 3. **Absolute Paths**: All file paths in output must be absolute 4. **No Summarization**: Compact mode preserves complete plan verbatim - never abbreviate 5. **Speed Priority**: Tips mode should be fast - minimal analysis overhead ## Input Processing ### Compact Mode Input - Optional: `"session description"` as supplementary context - Example: `/memory-capture compact` or `/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 |
View on GitHub