[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CF88KF3V2ZTE69G5DZPBXQ":3,"skill-same:01M7CF88KF3V2ZTE69G5DZPBXQ":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":6,"ownerDescription":41,"updatedAt":42,"install":43,"resources":55},"01M7CF88KF3V2ZTE69G5DZPBXQ","memory-optimize",null,"Optimizes Claude Code memory files in 4 interactive steps: removes duplicates, migrates rules to CLAUDE.md\u002Frules files, compresses remaining entries, validates with cleanup. Typical reduction: 30-50% on token count.","om-scogo\u002Fskillsh-scraper","om-scogo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160466840?v=4","01M79AWB6DFVCQ7RK70CS34B96","Om Achrekar","01M79AWB6ZM9SKR8KDH1WSSM22",0,"MIT","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fkochetkov-ma-claude-brewcode\u002Fmemory-optimize\u002FSkill.md",[],[],"2026-11-15 14:19:17",false,"---\nname: memory-optimize\ndescription: \"Optimizes Claude Code memory files in 4 interactive steps: removes duplicates, migrates rules to CLAUDE.md\u002Frules files, compresses remaining entries, validates with cleanup. Typical reduction: 30-50% on token count.\"\ntags: [auto-memory, claude-code-memory, claude-code-auto-memory]\nlicense: MIT\nmetadata:\n  author: \"kochetkov-ma\"\n  version: \"3.1.0\"\n  source: \"claude-brewcode\"\nuser-invocable: true\nallowed-tools: Read Write Edit Glob Grep Bash Task AskUserQuestion\nmodel: opus\n---\n\n> Plugin: [kochetkov-ma\u002Fclaude-brewcode](https:\u002F\u002Fgithub.com\u002Fkochetkov-ma\u002Fclaude-brewcode)\n\n## Memory Optimizer\n\nOptimizes Claude Code **auto-memory** files in **4 interactive steps**: removes duplicates, migrates rules to proper config files, compresses remaining entries, validates the result.\nTypical reduction: **30–50%** token count in memory files.\n\nAuto-memory stores context across sessions in `~\u002F.claude\u002Fprojects\u002F**\u002Fmemory\u002FMEMORY.md`.\nEnable: `CLAUDE_CODE_DISABLE_AUTO_MEMORY=0` · Disable: `CLAUDE_CODE_DISABLE_AUTO_MEMORY=1`\n\n**Benefits:** faster context loading · no duplicate rules · cleaner instructions · lower API cost\n\n**Usage:**\n```bash\n\u002Fmemory-optimize          # no args — starts 4-step interactive workflow\n```\n\n> _Skill text is written for LLM consumption and optimized for token efficiency._\n\n---\n\n# Memory Optimizer\n\nOptimizes Claude Code memory files through 4 interactive steps.\n\n> **No `context: fork`** — must run in main conversation to spawn agents.\n\n## Phase 0: Load Context\n\n1. Glob all memory files: `~\u002F.claude\u002Fprojects\u002F**\u002Fmemory\u002F*.md`\n2. Read `~\u002F.claude\u002FCLAUDE.md` and project `CLAUDE.md` (if exists)\n3. Glob `.claude\u002Frules\u002F*.md` — read all project rules\n4. Read `~\u002F.claude\u002Frules\u002F*.md` — read all global rules\n\nBuild context map:\n```\nmemory_files: [paths]\nclaude_md_sections: [sections]\nrules_files: [paths with content]\n```\n\n## Step 1: Analysis — Remove Duplicates (Interactive)\n\n**Goal:** Find memory entries that duplicate content already in CLAUDE.md or rules.\n\n1. Spawn `Explore` agent to cross-reference all loaded files\n2. Identify entries where:\n   - Same rule already in CLAUDE.md\n   - Same pattern already in a rules file\n   - Contradicts CLAUDE.md (CLAUDE.md wins)\n3. Show analysis:\n   ```\n   Found X duplicate\u002Fredundant entries (Y% of memory):\n   | Entry | Memory File | Already In | Action |\n   |-------|-------------|------------|--------|\n   | \"Use grepai first\" | MEMORY.md:5 | rules\u002Fgrepai-first.md | DELETE |\n   ...\n   ```\n4. `AskUserQuestion`: \"Delete X duplicate entries (Y% of memory)? This is safe — content exists elsewhere.\"\n   - Options: \"Yes, delete all\" \u002F \"Review each\" \u002F \"Skip this step\"\n5. Apply deletion using `Edit` tool if approved\n\n## Step 2: Migration — Move to Rules\u002FCLAUDE.md (Interactive)\n\n**Goal:** Identify remaining memory entries better suited to persistent config files.\n\nDecision tree (per entry):\n- Applies to ALL projects + IS a rule\u002Fconstraint → `~\u002F.claude\u002Frules\u002F`\n- Applies to THIS project only + IS a rule → `.claude\u002Frules\u002F`\n- IS an architectural decision → project `CLAUDE.md`\n- IS a fact\u002Fpattern reusable across sessions → KEEP in memory\n\n1. Show categorization:\n   ```\n   X entries suitable for migration:\n   | Entry | Current Location | Target | Reduction |\n   |-------|-----------------|--------|-----------|\n   | \"Always use BD_PLUGIN_ROOT\" | MEMORY.md:12 | .claude\u002Frules\u002Fbrewdoc.md | 15 tokens |\n   ...\n   Total: X entries → ~Y tokens saved\n   ```\n2. `AskUserQuestion`: \"Migrate X entries to rules\u002FCLAUDE.md?\"\n   - Options: \"Yes, migrate all\" \u002F \"Review each\" \u002F \"Skip this step\"\n3. If approved:\n   - Create\u002Fappend to target rule files via `Edit`\n   - Remove migrated entries from memory via `Edit`\n   - If target file doesn't exist, create it\n\n## Step 3: Compression (Interactive)\n\n**Goal:** Compress remaining entries using LLM-efficient formatting.\n\nCompression techniques:\n- Prose → table row\n- Multiple related entries → single table\n- Verbose description → imperative one-liner\n- List of examples → pattern + one example\n\n1. Show compression preview:\n   ```\n   Compression opportunities found:\n   | Before | After | Savings |\n   |--------|-------|---------|\n   | \"When you need to... always use...\" | \"Use X for Y\" | 8 tokens |\n   ...\n   Total: ~Y% token reduction (~Z tokens)\n   ```\n   Show 2-3 specific before\u002Fafter samples.\n2. `AskUserQuestion`: \"Compress remaining memory? (~Y% reduction)\"\n   - Options: \"Yes, compress all\" \u002F \"Skip compression\"\n3. Apply compression via `Edit` (bottom-up order to preserve line numbers)\n\n## Step 4: Validation (Automatic)\n\n**Goal:** Verify final state and clean orphaned references.\n\n1. Spawn `reviewer` agent to verify:\n   - No broken file path references in memory files\n   - No contradictions between memory and CLAUDE.md\n   - Memory files are well-formed markdown\n2. Clean broken references (Edit tool)\n3. Check for orphaned memory files (files in `~\u002F.claude\u002Fprojects\u002F**\u002Fmemory\u002F` with no MEMORY.md reference)\n4. Report orphaned files and ask to delete\n\n**Final Report:**\n```markdown\n## Memory Optimization Complete\n\n### Summary\n| Metric | Before | After | Saved |\n|--------|--------|-------|-------|\n| Total entries | X | Y | Z |\n| Duplicate entries | X | 0 | — |\n| Migrated entries | — | — | X |\n| Token estimate | ~X | ~Y | ~Z (~P%) |\n\n### Changes Made\n- Step 1: Deleted X duplicate entries\n- Step 2: Migrated X entries to rules\u002FCLAUDE.md\n- Step 3: Compressed X entries (Y% reduction)\n- Step 4: Fixed X broken references, removed X orphaned files\n\n### Final Memory Structure\n{directory listing of ~\u002F.claude\u002Fprojects\u002F...\u002Fmemory\u002F}\n\n---\n\n**Part of brewdoc:** [brewcode](https:\u002F\u002Fgithub.com\u002Fkochetkov-ma\u002Fclaude-brewcode) — docs tools: memory optimization, auto-sync, Claude installation docs, Markdown to PDF.\nInstall: `claude plugin marketplace add https:\u002F\u002Fgithub.com\u002Fkochetkov-ma\u002Fclaude-brewcode && claude plugin install brewdoc@claude-brewcode`\n```\n","> Plugin: [kochetkov-ma\u002Fclaude-brewcode](https:\u002F\u002Fgithub.com\u002Fkochetkov-ma\u002Fclaude-brewcode)\n\n## Memory Optimizer\n\nOptimizes Claude Code **auto-memory** files in **4 interactive steps**: removes duplicates, migrates rules to proper config files, compresses remaining entries, validates the result.\nTypical reduction: **30–50%** token count in memory files.\n\nAuto-memory stores context across sessions in `~\u002F.claude\u002Fprojects\u002F**\u002Fmemory\u002FMEMORY.md`.\nEnable: `CLAUDE_CODE_DISABLE_AUTO_MEMORY=0` · Disable: `CLAUDE_CODE_DISABLE_AUTO_MEMORY=1`\n\n**Benefits:** faster context loading · no duplicate rules · cleaner instructions · lower API cost\n\n**Usage:**\n```bash\n\u002Fmemory-optimize          # no args — starts 4-step interactive workflow\n```\n\n> _Skill text is written for LLM consumption and optimized for token efficiency._\n\n---\n\n# Memory Optimizer\n\nOptimizes Claude Code memory files through 4 interactive steps.\n\n> **No `context: fork`** — must run in main conversation to spawn agents.\n\n## Phase 0: Load Context\n\n1. Glob all memory files: `~\u002F.claude\u002Fprojects\u002F**\u002Fmemory\u002F*.md`\n2. Read `~\u002F.claude\u002FCLAUDE.md` and project `CLAUDE.md` (if exists)\n3. Glob `.claude\u002Frules\u002F*.md` — read all project rules\n4. Read `~\u002F.claude\u002Frules\u002F*.md` — read all global rules\n\nBuild context map:\n```\nmemory_files: [paths]\nclaude_md_sections: [sections]\nrules_files: [paths with content]\n```\n\n## Step 1: Analysis — Remove Duplicates (Interactive)\n\n**Goal:** Find memory entries that duplicate content already in CLAUDE.md or rules.\n\n1. Spawn `Explore` agent to cross-reference all loaded files\n2. Identify entries where:\n   - Same rule already in CLAUDE.md\n   - Same pattern already in a rules file\n   - Contradicts CLAUDE.md (CLAUDE.md wins)\n3. Show analysis:\n   ```\n   Found X duplicate\u002Fredundant entries (Y% of memory):\n   | Entry | Memory File | Already In | Action |\n   |-------|-------------|------------|--------|\n   | \"Use grepai first\" | MEMORY.md:5 | rules\u002Fgrepai-first.md | DELETE |\n   ...\n   ```\n4. `AskUserQuestion`: \"Delete X duplicate entries (Y% of memory)? This is safe — content exists elsewhere.\"\n   - Options: \"Yes, delete all\" \u002F \"Review each\" \u002F \"Skip this step\"\n5. Apply deletion using `Edit` tool if approved\n\n## Step 2: Migration — Move to Rules\u002FCLAUDE.md (Interactive)\n\n**Goal:** Identify remaining memory entries better suited to persistent config files.\n\nDecision tree (per entry):\n- Applies to ALL projects + IS a rule\u002Fconstraint → `~\u002F.claude\u002Frules\u002F`\n- Applies to THIS project only + IS a rule → `.claude\u002Frules\u002F`\n- IS an architectural decision → project `CLAUDE.md`\n- IS a fact\u002Fpattern reusable across sessions → KEEP in memory\n\n1. Show categorization:\n   ```\n   X entries suitable for migration:\n   | Entry | Current Location | Target | Reduction |\n   |-------|-----------------|--------|-----------|\n   | \"Always use BD_PLUGIN_ROOT\" | MEMORY.md:12 | .claude\u002Frules\u002Fbrewdoc.md | 15 tokens |\n   ...\n   Total: X entries → ~Y tokens saved\n   ```\n2. `AskUserQuestion`: \"Migrate X entries to rules\u002FCLAUDE.md?\"\n   - Options: \"Yes, migrate all\" \u002F \"Review each\" \u002F \"Skip this step\"\n3. If approved:\n   - Create\u002Fappend to target rule files via `Edit`\n   - Remove migrated entries from memory via `Edit`\n   - If target file doesn't exist, create it\n\n## Step 3: Compression (Interactive)\n\n**Goal:** Compress remaining entries using LLM-efficient formatting.\n\nCompression techniques:\n- Prose → table row\n- Multiple related entries → single table\n- Verbose description → imperative one-liner\n- List of examples → pattern + one example\n\n1. Show compression preview:\n   ```\n   Compression opportunities found:\n   | Before | After | Savings |\n   |--------|-------|---------|\n   | \"When you need to... always use...\" | \"Use X for Y\" | 8 tokens |\n   ...\n   Total: ~Y% token reduction (~Z tokens)\n   ```\n   Show 2-3 specific before\u002Fafter samples.\n2. `AskUserQuestion`: \"Compress remaining memory? (~Y% reduction)\"\n   - Options: \"Yes, compress all\" \u002F \"Skip compression\"\n3. Apply compression via `Edit` (bottom-up order to preserve line numbers)\n\n## Step 4: Validation (Automatic)\n\n**Goal:** Verify final state and clean orphaned references.\n\n1. Spawn `reviewer` agent to verify:\n   - No broken file path references in memory files\n   - No contradictions between memory and CLAUDE.md\n   - Memory files are well-formed markdown\n2. Clean broken references (Edit tool)\n3. Check for orphaned memory files (files in `~\u002F.claude\u002Fprojects\u002F**\u002Fmemory\u002F` with no MEMORY.md reference)\n4. Report orphaned files and ask to delete\n\n**Final Report:**\n```markdown\n## Memory Optimization Complete\n\n### Summary\n| Metric | Before | After | Saved |\n|--------|--------|-------|-------|\n| Total entries | X | Y | Z |\n| Duplicate entries | X | 0 | — |\n| Migrated entries | — | — | X |\n| Token estimate | ~X | ~Y | ~Z (~P%) |\n\n### Changes Made\n- Step 1: Deleted X duplicate entries\n- Step 2: Migrated X entries to rules\u002FCLAUDE.md\n- Step 3: Compressed X entries (Y% reduction)\n- Step 4: Fixed X broken references, removed X orphaned files\n\n### Final Memory Structure\n{directory listing of ~\u002F.claude\u002Fprojects\u002F...\u002Fmemory\u002F}\n\n---\n\n**Part of brewdoc:** [brewcode](https:\u002F\u002Fgithub.com\u002Fkochetkov-ma\u002Fclaude-brewcode) — docs tools: memory optimization, auto-sync, Claude installation docs, Markdown to PDF.\nInstall: `claude plugin marketplace add https:\u002F\u002Fgithub.com\u002Fkochetkov-ma\u002Fclaude-brewcode && claude plugin install brewdoc@claude-brewcode`\n```\n",{"name":5,"tags":24,"model":28,"license":15,"metadata":29,"description":7,"allowed-tools":33,"user-invocable":34},[25,26,27],"auto-memory","claude-code-memory","claude-code-auto-memory","opus",{"author":30,"source":31,"version":32},"kochetkov-ma","claude-brewcode","3.1.0","Read Write Edit Glob Grep Bash Task AskUserQuestion",true,"main","8859218955d9504cd18b59e7892100718039d3b4","data\u002Fskills\u002Fkochetkov-ma-claude-brewcode\u002Fmemory-optimize",1,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper","https:\u002F\u002Fgithub.com\u002Fom-scogo","SDE-1 @ Scogo ","2026-07-18 12:22:46",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":34},[45,48,51],{"tool":46,"command":47},"npx","npx skills add om-scogo\u002Fskillsh-scraper --skill memory-optimize",{"tool":49,"command":50},"bunx","bunx skills add om-scogo\u002Fskillsh-scraper --skill memory-optimize",{"tool":52,"command":53},"pnpm","pnpm dlx skills add om-scogo\u002Fskillsh-scraper --skill memory-optimize","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fkochetkov-ma-claude-brewcode\u002Fmemory-optimize\u002FSkill.md",[56],{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"metadata.json","REFERENCE","参考文档",485,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fkochetkov-ma-claude-brewcode\u002Fmemory-optimize\u002Fmetadata.json",[63,70,75,82,87,94],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7D6MC9FAAEV4CMNYX8W7JTG","arxiv-search","Search arXiv physics, math, and computer science preprints using natural language queries. Powered by Valyu semantic search.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002Fskills\u002Farxiv-search\u002FSKILL.md",[],[],{"skillNo":71,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7D6M85CKKN87TA98VCQV4H7","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002FSkill.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7D4ZTCS4DR3CE4JY06X84T2","working-with-legacy-code","Safely change and test untested codebases using Feathers' \"Working Effectively with Legacy Code\". Use when the user mentions \"legacy code\", \"no tests\", \"untested codebase\", \"how do I test this\", \"seams\", \"characterization tests\", \"golden master\", \"sprout method\", \"afraid to change this code\", \"monster method\", \"dependency breaking\", or \"inherited a messy codebase\". Also trigger when changing code without tests safely, getting a class under test when constructors, statics, or singletons block it, adding features to tangled modules, or planning incremental test coverage for an old codebase. Covers the legacy-code change algorithm, seams, characterization tests, sprout\u002Fwrap, and dependency-breaking techniques. For refactoring code that already has tests, see refactoring-patterns. For day-to-day code quality, see clean-code.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002Fworking-with-legacy-code\u002FSKILL.md",[],[],{"skillNo":83,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7D4ZHZKJD2RSNGAF63V14P4","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002FSkill.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7D4ZB4CJBFW5JE67CPH2QRV","web-typography","Select, pair, and implement typefaces for web projects. Use when the user mentions \"font pairing\", \"which typeface\", \"line height\", \"responsive typography\", \"web font loading\", \"type hierarchy\", \"variable fonts\", \"FOUT\u002FFOIT\", \"typographic scale\", or \"the text is hard to read\". Also trigger when choosing between system fonts and web fonts, optimizing font-loading performance, or designing readable long-form content. Covers readability evaluation, CSS implementation, and performance optimization. For overall UI design systems, see refactoring-ui. For dramatic typographic experiences, see top-design.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002Fweb-typography\u002FSKILL.md",[],[],{"skillNo":95,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M7D4Z4MVYVY3NMJ18BNV6WNA","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002FSkill.md",[],[]]