[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74PH640M9BXRC0K907Y4EGW":3,"skill-same:01M74PH640M9BXRC0K907Y4EGW":50},{"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":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":6,"updatedAt":36,"install":37,"resources":49},"01M74PH640M9BXRC0K907Y4EGW","memory-doctor",null,"Drain the agent's project memory block by block, relocating each entry into a home the user controls or archiving it.","eai-org\u002Fagent-toolkit","eai-org","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F301886321?v=4","01M74PFC3HF57T58MQ14P212BQ","Engineering in the age of AI","01M74PFC46MSKTT9SW5Q437FSD",85,"MIT","https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fmemory-doctor\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: memory-doctor\ndescription: Drain the agent's project memory block by block, relocating each entry into a home the user controls or archiving it.\ndisable-model-invocation: true\ntype: flow\nlicense: MIT\nmetadata:\n  version: \"1.9\"\n---\n\n# Memory doctor\n\nAgent-memory is an unseen side-channel into every session's context window: facts accumulate there,\noften by accident, that the user never reviews and cannot govern. This skill drains it. Technically\n**nothing** should live in project memory — durable guidance belongs in homes the user controls\n(project docs, project skills\u002Frules, user-level skills\u002Frules), and the rest is garbage. Block by\nblock, move each entry to its proper home or archive it, until memory trends toward empty and the\nuser — not the memory store — decides what reaches the context window.\n\n## Golden rule\n\n**The skill guesses and recommends; the user decides.** Every verdict, scope, form, and target is a\n*proposal* the user confirms or flips. When unsure, ask. Nothing is moved, deleted, or written\nwithout explicit per-item approval. For every block the user gets the whole fixed menu —\nrelocate\u002Fmerge, archive (recoverable), keep, or a custom action they type — never just the\nrecommended verdict, never a pruned subset.\n\n## Locate the memory\n\nFind the memory store for the current project. Its location is agent-specific — other agents store\nit elsewhere, or not at all. **Claude Code** example: the store sits under\n`${CLAUDE_CONFIG_DIR:-~\u002F.claude}\u002Fprojects\u002F`, the `\u003Croot>` below. First check the settings for a\nrelocated memory dir (`autoMemoryDirectory` in any scope), then the `CLAUDE_CODE_PROJECT_DIR_NAME`\nenv var, which names the `\u003Cslug>` directory outright but is honored only with `CLAUDE_CONFIG_DIR`\nset. Otherwise slugify the main worktree root — the parent of\n`git rev-parse --path-format=absolute --git-common-dir` (not `--show-toplevel`, which in a linked\nworktree returns the worktree's own path), else the cwd — by replacing every non-alphanumeric\ncharacter with `-` (e.g. `\u002FUsers\u002Fme\u002Fmy.app` → `-Users-me-my-app`), then look for\n`\u003Croot>\u002F\u003Cslug>\u002Fmemory\u002FMEMORY.md`; no exact match → list `\u003Croot>` and pick the entry matching the\nrepo root. If that fails too, or the user runs a different agent, **ask the user for the memory\npath**. Only discovery is agent-specific; everything below is agent-agnostic.\n\n**Block** = the smallest self-contained memory unit — typically one memory file plus its `MEMORY.md`\nindex line, generally one fact each, though a store may group differently. If the memory is a single\nflat file with no index, treat each section as a block.\n\n## Flow\n\n1. **Scan (read-only).** Read every block. To judge staleness you may read or grep project files,\n   git, and governing docs — but make **no** mutation in this phase.\n2. **Triage table.** Present all blocks as ONE narrow overview table that renders as a table, not a\n   wrapped list: `# | block | content (≤1 line) | verdict | why + target`. Every cell is a summary:\n   the `content` cell one line, the `why + target` cell folding justification, duplicate\u002Fgarbage\n   evidence, and relocate scope\u002Fform\u002Fpath. Full detail for a block waits for its question (step 3).\n   The table numbers each block (1…N); refer to a block by that number, in order, and never re-list\n   block numbers out of sequence in surrounding prose. The table ends the turn; step 3 begins the\n   next — a same-turn question buries the table behind the prompt.\n3. **Decide, one question per block, in strict index order (1 → last).** Walk blocks by their table\n   index — **never group, batch, or reorder blocks**, even when adjacent ones share a verdict; ask\n   about exactly one block per prompt. For each, lead with the detail the table only summarized — a\n   verbatim content excerpt plus the full justification — so the user can judge, then present its\n   recommended verdict as the default, then the **same fixed menu every time** regardless of that\n   verdict — relocate\u002Fmerge, archive (recoverable), keep, or other (the user types a custom action).\n   Never drop an option because it seems not to apply; the user must never have to type a standard\n   option by hand. Record each confirmed choice and move straight to the next block — **act on\n   nothing yet**; never skip a block or record a choice without its own explicit confirmation.\n   Word each question via `explain-in-simple-language` when available.\n4. **Execute, once every block is decided.** Apply the recorded actions in index order, honoring the\n   Safety rules below (relocate-before-delete, honest index). Doing all the work in one pass —\n   never interleaved with the questions — keeps the decision phase a fast, uninterrupted Q&A. Step\n   3 confirmed verdict, scope, form and path; each relocate or merge still gets self-improve's diff\n   approval here, so expect one short approval per write. Archive moves need no further approval.\n\n## Verdicts\n\n- **Duplicate** — already covered by an existing project\u002Fuser skill, doc, or rule. **Cite the\n  specific file** (ideally line). Prefer a **merge** — fold any wording the block states better into\n  the existing home — over a blind delete.\n- **Garbage** — delete-worthy: **stale** (cites code\u002Ffiles that no longer exist — *verify* by\n  reading\u002Fgrepping, never assume), **re-derivable** (restates what the code, git, or a governing doc\n  already makes obvious), or a **one-off** that never generalized. Never garbage on suspicion; the\n  skill must have verified, and the user still confirms.\n- **Relocate** — genuine durable guidance with no current home. Route by scope × form (below).\n- **Keep** — real and durable, but no good home yet and not worth manufacturing one. Log it in the\n  summary and **leave the block untouched** — do not annotate it as \"reviewed\"; that is just more\n  context-window noise.\n\n## Routing for relocate (scope × form)\n\nBoth axes are proposals the user confirms or flips.\n\n- **Scope** — *\"would this be true or wanted in a different project too?\"* Yes → **user-level**.\n  No → **project-level** (a doc in the repo, or the repo's project-scoped skill\u002Frule config). For\n  user-level, **do not** assume reusable config lives in any particular managed repo; if it does,\n  the user redirects on confirmation.\n- **Form** — short standing behavioral constraint → **rule**; multi-step procedure with a trigger →\n  **skill**; reference knowledge\u002Fdesign\u002Fcontext read when relevant but not an instruction → **doc**.\n\n**Target path.** Each relocate or merge proposal names the concrete file: an existing doc, skill or\nrule to merge into, or a new file in the home the repo's governing docs name (the docs index,\nonboarding or doc-placement doc); without one, a skill or rule falls back to the agent's project\nconfig dirs (e.g. `.claude\u002Fskills`, `.claude\u002Frules`), a doc to a path the user names. User-level\nskills and rules go to the agent's own config dirs (e.g. `~\u002F.claude\u002Fskills`, `~\u002F.claude\u002Frules`), a\nnew user-level doc to a path the user names: the block's question asks whether they keep a\nversion-controlled home (once per run; never search for one) and, if so, recommends it over an\nuntracked location.\n\nDo each relocate or merge through [self-improve](..\u002Fself-improve\u002FSKILL.md) in its driven mode: hand\nit the block's content plus the confirmed scope, form and path; it drafts and applies the edit\n(routing the write through the matching compaction skill), and locates the home itself only for a\ntarget the user left open. This skill owns discovery, enumeration, classification and the archive\npath; self-improve owns the write.\n\n## Safety\n\nMemory files live outside the project repo and are **not** in git, so a delete is irreversible.\n\n- **Relocate-before-delete.** A block's content leaves memory only once it has landed in a confirmed\n  home (relocate\u002Fmerge applied) **or** the user explicitly OKs it as worthless. Never archive or\n  delete the source before the destination edit is confirmed-applied.\n- **Archive, don't `rm`.** Worthless blocks are *moved* to `memory\u002F.archive\u002F`, not deleted — an\n  archive folder costs nothing in context and stays recoverable.\n- **Keep the index honest.** Update the `MEMORY.md` index line in the **same step** as any block\n  removal or relocation: never orphan a file, never dangle a pointer to a moved or archived one.\n\n## Close\n\nPrint an **ephemeral chat summary** — no report file (that would just be new uncontrolled state).\nInclude counts plus each block's disposition (relocated → where, merged, archived, kept, skipped),\nand list kept blocks with each one's \"no home because…\" reason. The real deliverables are the\ncleaned memory and the archive folder.\n","# Memory doctor\n\nAgent-memory is an unseen side-channel into every session's context window: facts accumulate there,\noften by accident, that the user never reviews and cannot govern. This skill drains it. Technically\n**nothing** should live in project memory — durable guidance belongs in homes the user controls\n(project docs, project skills\u002Frules, user-level skills\u002Frules), and the rest is garbage. Block by\nblock, move each entry to its proper home or archive it, until memory trends toward empty and the\nuser — not the memory store — decides what reaches the context window.\n\n## Golden rule\n\n**The skill guesses and recommends; the user decides.** Every verdict, scope, form, and target is a\n*proposal* the user confirms or flips. When unsure, ask. Nothing is moved, deleted, or written\nwithout explicit per-item approval. For every block the user gets the whole fixed menu —\nrelocate\u002Fmerge, archive (recoverable), keep, or a custom action they type — never just the\nrecommended verdict, never a pruned subset.\n\n## Locate the memory\n\nFind the memory store for the current project. Its location is agent-specific — other agents store\nit elsewhere, or not at all. **Claude Code** example: the store sits under\n`${CLAUDE_CONFIG_DIR:-~\u002F.claude}\u002Fprojects\u002F`, the `\u003Croot>` below. First check the settings for a\nrelocated memory dir (`autoMemoryDirectory` in any scope), then the `CLAUDE_CODE_PROJECT_DIR_NAME`\nenv var, which names the `\u003Cslug>` directory outright but is honored only with `CLAUDE_CONFIG_DIR`\nset. Otherwise slugify the main worktree root — the parent of\n`git rev-parse --path-format=absolute --git-common-dir` (not `--show-toplevel`, which in a linked\nworktree returns the worktree's own path), else the cwd — by replacing every non-alphanumeric\ncharacter with `-` (e.g. `\u002FUsers\u002Fme\u002Fmy.app` → `-Users-me-my-app`), then look for\n`\u003Croot>\u002F\u003Cslug>\u002Fmemory\u002FMEMORY.md`; no exact match → list `\u003Croot>` and pick the entry matching the\nrepo root. If that fails too, or the user runs a different agent, **ask the user for the memory\npath**. Only discovery is agent-specific; everything below is agent-agnostic.\n\n**Block** = the smallest self-contained memory unit — typically one memory file plus its `MEMORY.md`\nindex line, generally one fact each, though a store may group differently. If the memory is a single\nflat file with no index, treat each section as a block.\n\n## Flow\n\n1. **Scan (read-only).** Read every block. To judge staleness you may read or grep project files,\n   git, and governing docs — but make **no** mutation in this phase.\n2. **Triage table.** Present all blocks as ONE narrow overview table that renders as a table, not a\n   wrapped list: `# | block | content (≤1 line) | verdict | why + target`. Every cell is a summary:\n   the `content` cell one line, the `why + target` cell folding justification, duplicate\u002Fgarbage\n   evidence, and relocate scope\u002Fform\u002Fpath. Full detail for a block waits for its question (step 3).\n   The table numbers each block (1…N); refer to a block by that number, in order, and never re-list\n   block numbers out of sequence in surrounding prose. The table ends the turn; step 3 begins the\n   next — a same-turn question buries the table behind the prompt.\n3. **Decide, one question per block, in strict index order (1 → last).** Walk blocks by their table\n   index — **never group, batch, or reorder blocks**, even when adjacent ones share a verdict; ask\n   about exactly one block per prompt. For each, lead with the detail the table only summarized — a\n   verbatim content excerpt plus the full justification — so the user can judge, then present its\n   recommended verdict as the default, then the **same fixed menu every time** regardless of that\n   verdict — relocate\u002Fmerge, archive (recoverable), keep, or other (the user types a custom action).\n   Never drop an option because it seems not to apply; the user must never have to type a standard\n   option by hand. Record each confirmed choice and move straight to the next block — **act on\n   nothing yet**; never skip a block or record a choice without its own explicit confirmation.\n   Word each question via `explain-in-simple-language` when available.\n4. **Execute, once every block is decided.** Apply the recorded actions in index order, honoring the\n   Safety rules below (relocate-before-delete, honest index). Doing all the work in one pass —\n   never interleaved with the questions — keeps the decision phase a fast, uninterrupted Q&A. Step\n   3 confirmed verdict, scope, form and path; each relocate or merge still gets self-improve's diff\n   approval here, so expect one short approval per write. Archive moves need no further approval.\n\n## Verdicts\n\n- **Duplicate** — already covered by an existing project\u002Fuser skill, doc, or rule. **Cite the\n  specific file** (ideally line). Prefer a **merge** — fold any wording the block states better into\n  the existing home — over a blind delete.\n- **Garbage** — delete-worthy: **stale** (cites code\u002Ffiles that no longer exist — *verify* by\n  reading\u002Fgrepping, never assume), **re-derivable** (restates what the code, git, or a governing doc\n  already makes obvious), or a **one-off** that never generalized. Never garbage on suspicion; the\n  skill must have verified, and the user still confirms.\n- **Relocate** — genuine durable guidance with no current home. Route by scope × form (below).\n- **Keep** — real and durable, but no good home yet and not worth manufacturing one. Log it in the\n  summary and **leave the block untouched** — do not annotate it as \"reviewed\"; that is just more\n  context-window noise.\n\n## Routing for relocate (scope × form)\n\nBoth axes are proposals the user confirms or flips.\n\n- **Scope** — *\"would this be true or wanted in a different project too?\"* Yes → **user-level**.\n  No → **project-level** (a doc in the repo, or the repo's project-scoped skill\u002Frule config). For\n  user-level, **do not** assume reusable config lives in any particular managed repo; if it does,\n  the user redirects on confirmation.\n- **Form** — short standing behavioral constraint → **rule**; multi-step procedure with a trigger →\n  **skill**; reference knowledge\u002Fdesign\u002Fcontext read when relevant but not an instruction → **doc**.\n\n**Target path.** Each relocate or merge proposal names the concrete file: an existing doc, skill or\nrule to merge into, or a new file in the home the repo's governing docs name (the docs index,\nonboarding or doc-placement doc); without one, a skill or rule falls back to the agent's project\nconfig dirs (e.g. `.claude\u002Fskills`, `.claude\u002Frules`), a doc to a path the user names. User-level\nskills and rules go to the agent's own config dirs (e.g. `~\u002F.claude\u002Fskills`, `~\u002F.claude\u002Frules`), a\nnew user-level doc to a path the user names: the block's question asks whether they keep a\nversion-controlled home (once per run; never search for one) and, if so, recommends it over an\nuntracked location.\n\nDo each relocate or merge through [self-improve](..\u002Fself-improve\u002FSKILL.md) in its driven mode: hand\nit the block's content plus the confirmed scope, form and path; it drafts and applies the edit\n(routing the write through the matching compaction skill), and locates the home itself only for a\ntarget the user left open. This skill owns discovery, enumeration, classification and the archive\npath; self-improve owns the write.\n\n## Safety\n\nMemory files live outside the project repo and are **not** in git, so a delete is irreversible.\n\n- **Relocate-before-delete.** A block's content leaves memory only once it has landed in a confirmed\n  home (relocate\u002Fmerge applied) **or** the user explicitly OKs it as worthless. Never archive or\n  delete the source before the destination edit is confirmed-applied.\n- **Archive, don't `rm`.** Worthless blocks are *moved* to `memory\u002F.archive\u002F`, not deleted — an\n  archive folder costs nothing in context and stays recoverable.\n- **Keep the index honest.** Update the `MEMORY.md` index line in the **same step** as any block\n  removal or relocation: never orphan a file, never dangle a pointer to a moved or archived one.\n\n## Close\n\nPrint an **ephemeral chat summary** — no report file (that would just be new uncontrolled state).\nInclude counts plus each block's disposition (relocated → where, merged, archived, kept, skipped),\nand list kept blocks with each one's \"no home because…\" reason. The real deliverables are the\ncleaned memory and the archive folder.\n",{"name":5,"type":24,"license":15,"metadata":25,"description":7,"disable-model-invocation":27},"flow",{"version":26},"1.9",true,"main","12db59437c9d48b9bd62b18888e9974b17adafaf","skills\u002Fmemory-doctor",19,"https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit","https:\u002F\u002Feai-org.github.io\u002Fagent-toolkit-docs","https:\u002F\u002Fgithub.com\u002Feai-org","https:\u002F\u002Fmedium.com\u002Fengineering-in-the-age-of-ai","2026-11-14 22:36:21",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":27},[39,42,45],{"tool":40,"command":41},"npx","npx skills add eai-org\u002Fagent-toolkit --skill memory-doctor",{"tool":43,"command":44},"bunx","bunx skills add eai-org\u002Fagent-toolkit --skill memory-doctor",{"tool":46,"command":47},"pnpm","pnpm dlx skills add eai-org\u002Fagent-toolkit --skill memory-doctor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fmemory-doctor\u002FSKILL.md",[],[51,57,64,71,78,85],{"skillNo":52,"name":53,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M74PKAVPTTY5PSSAWHCRVY9T","no-frontmatter","https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Ftest\u002Fcompact-skill-creator\u002Ffixtures\u002Fno-frontmatter\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M74PK8J99W7V3669Y4JG2JKV","other-name","Fixture skill whose name differs from its folder.","https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Ftest\u002Fcompact-skill-creator\u002Ffixtures\u002Fname-mismatch\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M74PK6T9DHVRCNHTEV2ZA4Y3","md-off","A fixture skill whose folder turns the line length off below a root that sets 99.","https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Ftest\u002Fcompact-skill-creator\u002Ffixtures\u002Fmd-off\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M74PK4H4N3D290V4C08M4DGY","long-line","Fixture skill with one prose line of 100 characters, over the fixtures' limit of 99.","https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Ftest\u002Fcompact-skill-creator\u002Ffixtures\u002Flong-line\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M74PK2DJ2MCR5KFPMYVQWNJG","flag-without-flow","Fixture skill with the flag and no type.","https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Ftest\u002Fcompact-skill-creator\u002Ffixtures\u002Fflag-without-flow\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M74PK03XGEBQ986FDAE46WCM","double-backtick","A fixture skill with double-backtick code spans holding a link template and an overrun.","https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Ftest\u002Fcompact-skill-creator\u002Ffixtures\u002Fdouble-backtick\u002FSKILL.md",[],[]]