Skip to main content

memory-manage

Unified memory management - CLAUDE.md updates and documentation generation with interactive routing. Triggers on "memory manage", "update claude", "update memory", "generate docs", "ๆ›ดๆ–ฐ่ฎฐๅฟ†", "็”Ÿๆˆๆ–‡ๆกฃ".

Source facts

Repository
catlog22/Claude-Code-Workflow
Last source activity
March 4, 2026 at 14:40
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
6 files

Showing SKILL.md

SKILL.md
Source instructions ยท Read-only preview
name
memory-manage
description
Unified memory management - CLAUDE.md updates and documentation generation with interactive routing. Triggers on "memory manage", "update claude", "update memory", "generate docs", "ๆ›ดๆ–ฐ่ฎฐๅฟ†", "็”Ÿๆˆๆ–‡ๆกฃ".
allowed-tools
Agent(*), Bash(*), AskUserQuestion(*), Read(*)
# Memory Management Skill Unified entry point for project memory (CLAUDE.md) updates and documentation (API.md/README.md) generation. Routes to specialized sub-commands via arguments or interactive needs assessment. ## Architecture Overview ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Memory Manage (Router) โ”‚ โ”‚ โ†’ Parse input โ†’ Detect mode โ†’ Route to phase โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ†“ โ†“ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ CLAUDE.md โ”‚ โ”‚ Docs โ”‚ โ”‚ ็ฎก็† โ”‚ โ”‚ ็”Ÿๆˆ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ” โ†“ โ†“ โ†“ โ†“ โ†“ Full Related Single Full Related ๅ…จ้‡ ๅขž้‡ ๅ•ๆจกๅ— ๅ…จ้‡ ๅขž้‡ ``` ## Execution Flow ### Step 1: Parse Input & Route Detect execution mode from user input: **Auto-Route Rules** (priority order): | Signal | Route | Examples | |--------|-------|---------| | Explicit sub-command token | โ†’ Direct dispatch | `update-full --tool qwen` | | Keyword: full, ๅ…จ้‡, all, entire + update/claude | โ†’ update-full | "ๅ…จ้‡ๆ›ดๆ–ฐclaude" | | Keyword: related, changed, ๅขž้‡, diff + update/claude | โ†’ update-related | "ๆ›ดๆ–ฐๅ˜ๆ›ดๆจกๅ—" | | Keyword: single, module, ๅ•ๆจกๅ— + path-like token | โ†’ update-single | "ๆ›ดๆ–ฐ src/auth ๆจกๅ—" | | Keyword: docs, documentation, ๆ–‡ๆกฃ + full/all/ๅ…จ้‡ | โ†’ docs-full | "ๅ…จ้‡็”Ÿๆˆๆ–‡ๆกฃ" | | Keyword: docs, documentation, ๆ–‡ๆกฃ + related/changed/ๅขž้‡ | โ†’ docs-related | "ๅขž้‡็”Ÿๆˆๆ–‡ๆกฃ" | | Ambiguous or no arguments | โ†’ **AskUserQuestion** | `/memory-manage` | Valid sub-command tokens: `update-full`, `update-related`, `update-single`, `docs-full`, `docs-related` **Direct dispatch examples**: ``` input = "update-full --tool qwen" โ†’ subcommand = "update-full", remainingArgs = "--tool qwen" โ†’ Read phases/01-update-full.md, execute input = "update-single src/auth --tool gemini" โ†’ subcommand = "update-single", remainingArgs = "src/auth --tool gemini" โ†’ Read phases/03-update-single.md, execute ``` **When ambiguous or no arguments**, proceed to Step 2. ### Step 2: Interactive Needs Assessment **Q1 โ€” ็กฎๅฎšๅ†…ๅฎน็ฑปๅˆซ**: ``` AskUserQuestion({ questions: [{ question: "ไฝ ่ฆ็ฎก็†ๅ“ช็ฑปๅ†…ๅฎน๏ผŸ", header: "็ฑปๅˆซ", multiSelect: false, options: [ { label: "CLAUDE.md (้กน็›ฎ่ฎฐๅฟ†)", description: "ๆ›ดๆ–ฐๆจกๅ—ๆŒ‡ไปคๆ–‡ไปถ๏ผŒๅธฎๅŠฉClaude็†่งฃไปฃ็ ๅบ“็ป“ๆž„ๅ’Œ็บฆๅฎš" }, { label: "้กน็›ฎๆ–‡ๆกฃ (API+README)", description: "็”ŸๆˆAPI.mdๅ’ŒREADME.mdๅˆฐ.workflow/docs/็›ฎๅฝ•" } ] }] }) ``` **Q2a โ€” CLAUDE.md ็ฎก็†่Œƒๅ›ด** (็”จๆˆท้€‰ไบ† CLAUDE.md): ``` AskUserQuestion({ questions: [{ question: "CLAUDE.md ๆ›ดๆ–ฐ่Œƒๅ›ด๏ผŸ", header: "่Œƒๅ›ด", multiSelect: false, options: [ { label: "ๅขž้‡ๆ›ดๆ–ฐ (Recommended)", description: "ไป…ๆ›ดๆ–ฐgitๅ˜ๆ›ดๆจกๅ—ๅŠๅ…ถ็ˆถ็บง๏ผŒๆ—ฅๅธธๅผ€ๅ‘้ฆ–้€‰" }, { label: "ๅ…จ้‡ๆ›ดๆ–ฐ", description: "ๆ›ดๆ–ฐๆ‰€ๆœ‰ๆจกๅ—๏ผŒ3ๅฑ‚ๆžถๆž„bottom-up๏ผŒ้€‚ๅˆ้‡ๅคง้‡ๆž„ๅŽ" }, { label: "ๅ•ๆจกๅ—ๆ›ดๆ–ฐ", description: "ๆŒ‡ๅฎšไธ€ไธชๆจกๅ—๏ผŒExploreๆทฑๅบฆๅˆ†ๆžๅŽ็”Ÿๆˆ่ฏดๆ˜Žไนฆๅผๆ–‡ๆกฃ" } ] }] }) ``` Route mapping: - "ๅขž้‡ๆ›ดๆ–ฐ" โ†’ `update-related` โ†’ Ref: phases/02-update-related.md - "ๅ…จ้‡ๆ›ดๆ–ฐ" โ†’ `update-full` โ†’ Ref: phases/01-update-full.md - "ๅ•ๆจกๅ—ๆ›ดๆ–ฐ" โ†’ `update-single` โ†’ continue to Q3 **Q2b โ€” ๆ–‡ๆกฃ็”Ÿๆˆ่Œƒๅ›ด** (็”จๆˆท้€‰ไบ†้กน็›ฎๆ–‡ๆกฃ): ``` AskUserQuestion({ questions: [{ question: "ๆ–‡ๆกฃ็”Ÿๆˆ่Œƒๅ›ด๏ผŸ", header: "่Œƒๅ›ด", multiSelect: false, options: [ { label: "ๅขž้‡็”Ÿๆˆ (Recommended)", description: "ไป…ไธบgitๅ˜ๆ›ดๆจกๅ—็”Ÿๆˆ/ๆ›ดๆ–ฐๆ–‡ๆกฃ๏ผŒๆ—ฅๅธธๅผ€ๅ‘้ฆ–้€‰" }, { label: "ๅ…จ้‡็”Ÿๆˆ", description: "ๆ‰€ๆœ‰ๆจกๅ—+้กน็›ฎ็บงๆ–‡ๆกฃ(ARCHITECTURE.md็ญ‰)๏ผŒ้€‚ๅˆๅˆๅง‹ๅŒ–" } ] }] }) ``` Route mapping: - "ๅขž้‡็”Ÿๆˆ" โ†’ `docs-related` โ†’ Ref: phases/05-docs-related.md - "ๅ…จ้‡็”Ÿๆˆ" โ†’ `docs-full` โ†’ Ref: phases/04-docs-full.md **Q3 โ€” ่กฅๅ……่ทฏๅพ„** (ไป… update-single ้œ€่ฆ๏ผŒไธ”ๆ— ่ทฏๅพ„ๅ‚ๆ•ฐๆ—ถ): ``` AskUserQuestion({ questions: [{ question: "่ฏทๆŒ‡ๅฎš่ฆๆ›ดๆ–ฐ็š„ๆจกๅ—่ทฏๅพ„๏ผš", header: "่ทฏๅพ„", multiSelect: false, options: [ { label: "src", description: "src ็›ฎๅฝ•" }, { label: ".", description: "้กน็›ฎๆ น็›ฎๅฝ•" } ] }] }) ``` ็”จๆˆทๅฏ้€‰ "Other" ่พ“ๅ…ฅ่‡ชๅฎšไน‰่ทฏๅพ„ใ€‚ ### Step 3: Execute Selected Phase Based on routing result, read and execute the corresponding phase: **Phase Reference Documents** (read on-demand when phase executes): | Mode | Document | Purpose | |------|----------|---------| | update-full | [phases/01-update-full.md](phases/01-update-full.md) | Full CLAUDE.md update, 3-layer architecture, batched agents | | update-related | [phases/02-update-related.md](phases/02-update-related.md) | Git-changed CLAUDE.md update, depth-first | | update-single | [phases/03-update-single.md](phases/03-update-single.md) | Single module CLAUDE.md, Explore + handbook style | | docs-full | [phases/04-docs-full.md](phases/04-docs-full.md) | Full API.md + README.md generation | | docs-related | [phases/05-docs-related.md](phases/05-docs-related.md) | Git-changed docs generation, incremental | ## Shared Configuration ### Tool Fallback Hierarchy All sub-commands share the same fallback: ``` --tool gemini โ†’ [gemini, qwen, codex] // default --tool qwen โ†’ [qwen, gemini, codex] --tool codex โ†’ [codex, gemini, qwen] ``` ### Common Parameters | Parameter | Description | Default | Used By | |-----------|-------------|---------|---------| | `--tool <gemini\|qwen\|codex>` | Primary CLI tool | gemini | All | | `--path <dir>` | Target directory | . | update-full, docs-full | | `<path>` (positional) | Module path | _(required)_ | update-single | ### Batching Thresholds | Sub-Command | Direct Execution | Agent Batch | Batch Size | |-------------|-----------------|-------------|------------| | update-full | <20 modules | โ‰ฅ20 modules | 4/agent | | update-related | <15 modules | โ‰ฅ15 modules | 4/agent | | update-single | always single | N/A | 1 | | docs-full | <20 modules | โ‰ฅ20 modules | 4/agent | | docs-related | <15 modules | โ‰ฅ15 modules | 4/agent | ## Core Rules 1. **Route before execute**: Determine sub-command before any execution 2. **Phase doc is truth**: All execution logic lives in phase docs, router only dispatches 3. **Read on-demand**: Only read the selected phase doc, never load all 4. **Pass arguments through**: Forward remaining args unchanged to sub-command 5. **User confirmation**: Each sub-command handles its own plan presentation and y/n confirmation ## Error Handling | Error | Resolution | |-------|------------| | Unknown sub-command | Fall through to interactive flow | | Phase doc not found | Abort with file path error | | Missing path for update-single | Prompt via Q3 | | Sub-command execution fails | Follow phase doc's own error handling |
View on GitHub