[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75EEX7SVPNYZ2GR0FS49WWJ":3,"skill-same:01M75EEX7SVPNYZ2GR0FS49WWJ":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":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":43},"01M75EEX7SVPNYZ2GR0FS49WWJ","improve-codebase-architecture",null,"Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.","WatsonWBlair\u002Flab-claude-plugins","WatsonWBlair","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F11588551?v=4","01M75EE977HTGZENYCP8VWPHFF","Watson Blair","01M75EE988475NPVGNQR2C11J7",1,"MIT","https:\u002F\u002Fgithub.com\u002FWatsonWBlair\u002Flab-claude-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fengineering-discipline\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: improve-codebase-architecture\ndescription: Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.\ndisable-model-invocation: true\n---\n\n# Improve Codebase Architecture\n\nSurface architectural friction and propose **deepening opportunities** — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.\n\nThis command is _informed_ by the repo's existing decisions and built on a shared design vocabulary:\n\n- Run the `\u002Fcodebase-design` skill for the architecture vocabulary (**module**, **interface**, **depth**, **seam**, **adapter**, **leverage**, **locality**) and its principles (the deletion test, \"the interface is the test surface\", \"one adapter = hypothetical seam, two = real\"). Use these terms exactly in every suggestion — don't drift into \"component,\" \"service,\" \"API,\" or \"boundary.\"\n- The repo's own domain vocabulary (its `GLOSSARY.md` if present, `CLAUDE.md`, subsystem READMEs, and any in-flight `_specs\u002F` bundle for the area) gives names to good seams. The main-bundle decision register (`_specs\u002F\u003Cscope>\u002Fmain\u002Fspec.md`) records architecture decisions this command must not re-litigate — it is the \"what is still true\" surface, read first.\n\n## Process\n\n### 1. Explore\n\nRead the repo's domain vocabulary first — its `GLOSSARY.md` (if present), `CLAUDE.md`, subsystem READMEs, and any active `_specs\u002F\u003Crepo>\u002F\u003CDATE>-\u003Chandle>\u002F` bundle for the area you're touching. Then read the main-bundle decision register (`_specs\u002F\u003Cscope>\u002Fmain\u002Fspec.md`) so you don't re-suggest a decision already recorded there (and check the active bundle's `spec.md` if the area is mid-flight).\n\nThen use the Agent tool with `subagent_type=Explore` to walk the codebase. Don't follow rigid heuristics — explore organically and note where you experience friction:\n\n- Where does understanding one concept require bouncing between many small modules?\n- Where are modules **shallow** — interface nearly as complex as the implementation?\n- Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no **locality**)?\n- Where do tightly-coupled modules leak across their seams?\n- Which parts of the codebase are untested, or hard to test through their current interface?\n\nApply the **deletion test** to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A \"yes, concentrates\" is the signal you want.\n\n### 2. Present candidates as an HTML report\n\nWrite a self-contained HTML file to the OS temp directory so nothing lands in the repo. Resolve the temp dir from `$TMPDIR`, falling back to `\u002Ftmp` (or `%TEMP%` on Windows), and write to `\u003Ctmpdir>\u002Farchitecture-review-\u003Ctimestamp>.html` so each run gets a fresh file. Open it for the user — `xdg-open \u003Cpath>` on Linux, `open \u003Cpath>` on macOS, `start \u003Cpath>` on Windows — and tell them the absolute path.\n\nThe report uses **Tailwind via CDN** for layout and styling, and **Mermaid via CDN** for diagrams where a graph\u002Fflow\u002Fsequence reliably communicates the structure. Mix Mermaid with hand-crafted CSS\u002FSVG visuals — use Mermaid when relationships are graph-shaped (call graphs, dependencies, sequences), and hand-built divs\u002FSVG when you want something more editorial (mass diagrams, cross-sections, collapse animations). Each candidate gets a **before\u002Fafter visualisation**. Be visual.\n\nFor each candidate, render a card with:\n\n- **Files** — which files\u002Fmodules are involved\n- **Problem** — why the current architecture is causing friction\n- **Solution** — plain English description of what would change\n- **Benefits** — explained in terms of locality and leverage, and how tests would improve\n- **Before \u002F After diagram** — side-by-side, custom-drawn, illustrating the shallowness and the deepening\n- **Recommendation strength** — one of `Strong`, `Worth exploring`, `Speculative`, rendered as a badge\n\nEnd the report with a **Top recommendation** section: which candidate you'd tackle first and why.\n\n**Use the repo's own vocabulary for the domain** (drawn from `GLOSSARY.md` if present, `CLAUDE.md`, subsystem READMEs, and `_specs\u002F`), and the `\u002Fcodebase-design` vocabulary for the architecture. If the repo calls it \"Order intake,\" talk about \"the Order intake module\" — not \"the FooBarHandler,\" and not \"the Order service.\"\n\n**Decision-register conflicts**: if a candidate contradicts a recorded decision, only surface it when the friction is real enough to warrant reopening that decision. Mark it clearly in the card (e.g. a warning callout: _\"contradicts §\u003Cid> 'single intake seam' in the decision register — but worth reopening because…\"_), citing the entry by its `§\u003Cid>` header. Don't list every theoretical refactor a past decision forbids.\n\nSee [HTML-REPORT.md](HTML-REPORT.md) for the full HTML scaffold, diagram patterns, and styling guidance.\n\nDo NOT propose interfaces yet. After the file is written, ask the user: \"Which of these would you like to explore?\"\n\n### 3. Grilling loop\n\nOnce the user picks a candidate, run the `\u002Fgrilling` skill to walk the design tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.\n\nSide effects happen inline as decisions crystallize:\n\n- **Naming a deepened module after a concept the repo hasn't named yet?** Record the new term in `GLOSSARY.md` (the canonical domain-vocabulary surface) so future sessions name it consistently — lazily creating `GLOSSARY.md` with a one-line `CLAUDE.md` pointer if it doesn't exist yet, per the `\u002Fdomain-modeling` convention. Otherwise just use it consistently for the rest of this session.\n- **User rejects the candidate with a load-bearing reason?** Offer to record it as a **load-bearing decision** so future architecture reviews don't re-suggest it, per [DECISION-FORMAT.md](..\u002Fdomain-modeling\u002FDECISION-FORMAT.md): a durable, repo-level architecture decision lands in the main-bundle decision register (`_specs\u002F\u003Cscope>\u002Fmain\u002Fspec.md` — the ADR-equivalent surface); a decision scoped to an in-flight planning bundle lands in that bundle's `spec.md`. Frame the offer as: _\"Want me to record this as a load-bearing decision so future architecture reviews don't re-suggest it?\"_ Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing — skip ephemeral reasons (\"not worth it right now\") and self-evident ones.\n- **Want to explore alternative interfaces for the deepened module?** Run the `\u002Fcodebase-design` skill and use its design-it-twice parallel sub-agent pattern.\n","# Improve Codebase Architecture\n\nSurface architectural friction and propose **deepening opportunities** — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.\n\nThis command is _informed_ by the repo's existing decisions and built on a shared design vocabulary:\n\n- Run the `\u002Fcodebase-design` skill for the architecture vocabulary (**module**, **interface**, **depth**, **seam**, **adapter**, **leverage**, **locality**) and its principles (the deletion test, \"the interface is the test surface\", \"one adapter = hypothetical seam, two = real\"). Use these terms exactly in every suggestion — don't drift into \"component,\" \"service,\" \"API,\" or \"boundary.\"\n- The repo's own domain vocabulary (its `GLOSSARY.md` if present, `CLAUDE.md`, subsystem READMEs, and any in-flight `_specs\u002F` bundle for the area) gives names to good seams. The main-bundle decision register (`_specs\u002F\u003Cscope>\u002Fmain\u002Fspec.md`) records architecture decisions this command must not re-litigate — it is the \"what is still true\" surface, read first.\n\n## Process\n\n### 1. Explore\n\nRead the repo's domain vocabulary first — its `GLOSSARY.md` (if present), `CLAUDE.md`, subsystem READMEs, and any active `_specs\u002F\u003Crepo>\u002F\u003CDATE>-\u003Chandle>\u002F` bundle for the area you're touching. Then read the main-bundle decision register (`_specs\u002F\u003Cscope>\u002Fmain\u002Fspec.md`) so you don't re-suggest a decision already recorded there (and check the active bundle's `spec.md` if the area is mid-flight).\n\nThen use the Agent tool with `subagent_type=Explore` to walk the codebase. Don't follow rigid heuristics — explore organically and note where you experience friction:\n\n- Where does understanding one concept require bouncing between many small modules?\n- Where are modules **shallow** — interface nearly as complex as the implementation?\n- Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no **locality**)?\n- Where do tightly-coupled modules leak across their seams?\n- Which parts of the codebase are untested, or hard to test through their current interface?\n\nApply the **deletion test** to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A \"yes, concentrates\" is the signal you want.\n\n### 2. Present candidates as an HTML report\n\nWrite a self-contained HTML file to the OS temp directory so nothing lands in the repo. Resolve the temp dir from `$TMPDIR`, falling back to `\u002Ftmp` (or `%TEMP%` on Windows), and write to `\u003Ctmpdir>\u002Farchitecture-review-\u003Ctimestamp>.html` so each run gets a fresh file. Open it for the user — `xdg-open \u003Cpath>` on Linux, `open \u003Cpath>` on macOS, `start \u003Cpath>` on Windows — and tell them the absolute path.\n\nThe report uses **Tailwind via CDN** for layout and styling, and **Mermaid via CDN** for diagrams where a graph\u002Fflow\u002Fsequence reliably communicates the structure. Mix Mermaid with hand-crafted CSS\u002FSVG visuals — use Mermaid when relationships are graph-shaped (call graphs, dependencies, sequences), and hand-built divs\u002FSVG when you want something more editorial (mass diagrams, cross-sections, collapse animations). Each candidate gets a **before\u002Fafter visualisation**. Be visual.\n\nFor each candidate, render a card with:\n\n- **Files** — which files\u002Fmodules are involved\n- **Problem** — why the current architecture is causing friction\n- **Solution** — plain English description of what would change\n- **Benefits** — explained in terms of locality and leverage, and how tests would improve\n- **Before \u002F After diagram** — side-by-side, custom-drawn, illustrating the shallowness and the deepening\n- **Recommendation strength** — one of `Strong`, `Worth exploring`, `Speculative`, rendered as a badge\n\nEnd the report with a **Top recommendation** section: which candidate you'd tackle first and why.\n\n**Use the repo's own vocabulary for the domain** (drawn from `GLOSSARY.md` if present, `CLAUDE.md`, subsystem READMEs, and `_specs\u002F`), and the `\u002Fcodebase-design` vocabulary for the architecture. If the repo calls it \"Order intake,\" talk about \"the Order intake module\" — not \"the FooBarHandler,\" and not \"the Order service.\"\n\n**Decision-register conflicts**: if a candidate contradicts a recorded decision, only surface it when the friction is real enough to warrant reopening that decision. Mark it clearly in the card (e.g. a warning callout: _\"contradicts §\u003Cid> 'single intake seam' in the decision register — but worth reopening because…\"_), citing the entry by its `§\u003Cid>` header. Don't list every theoretical refactor a past decision forbids.\n\nSee [HTML-REPORT.md](HTML-REPORT.md) for the full HTML scaffold, diagram patterns, and styling guidance.\n\nDo NOT propose interfaces yet. After the file is written, ask the user: \"Which of these would you like to explore?\"\n\n### 3. Grilling loop\n\nOnce the user picks a candidate, run the `\u002Fgrilling` skill to walk the design tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.\n\nSide effects happen inline as decisions crystallize:\n\n- **Naming a deepened module after a concept the repo hasn't named yet?** Record the new term in `GLOSSARY.md` (the canonical domain-vocabulary surface) so future sessions name it consistently — lazily creating `GLOSSARY.md` with a one-line `CLAUDE.md` pointer if it doesn't exist yet, per the `\u002Fdomain-modeling` convention. Otherwise just use it consistently for the rest of this session.\n- **User rejects the candidate with a load-bearing reason?** Offer to record it as a **load-bearing decision** so future architecture reviews don't re-suggest it, per [DECISION-FORMAT.md](..\u002Fdomain-modeling\u002FDECISION-FORMAT.md): a durable, repo-level architecture decision lands in the main-bundle decision register (`_specs\u002F\u003Cscope>\u002Fmain\u002Fspec.md` — the ADR-equivalent surface); a decision scoped to an in-flight planning bundle lands in that bundle's `spec.md`. Frame the offer as: _\"Want me to record this as a load-bearing decision so future architecture reviews don't re-suggest it?\"_ Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing — skip ephemeral reasons (\"not worth it right now\") and self-evident ones.\n- **Want to explore alternative interfaces for the deepened module?** Run the `\u002Fcodebase-design` skill and use its design-it-twice parallel sub-agent pattern.\n",{"name":5,"description":7,"disable-model-invocation":24},true,"main","96661862dc562a393000885c124a5ecac4436e10","plugins\u002Fengineering-discipline\u002Fskills\u002Fimprove-codebase-architecture","https:\u002F\u002Fgithub.com\u002FWatsonWBlair\u002Flab-claude-plugins","https:\u002F\u002Fgithub.com\u002FWatsonWBlair","2026-09-18 05:11:49",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":24},[33,36,39],{"tool":34,"command":35},"npx","npx skills add WatsonWBlair\u002Flab-claude-plugins --skill improve-codebase-architecture",{"tool":37,"command":38},"bunx","bunx skills add WatsonWBlair\u002Flab-claude-plugins --skill improve-codebase-architecture",{"tool":40,"command":41},"pnpm","pnpm dlx skills add WatsonWBlair\u002Flab-claude-plugins --skill improve-codebase-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FWatsonWBlair\u002Flab-claude-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fengineering-discipline\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[44],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"HTML-REPORT.md","REFERENCE","参考文档",6740,"https:\u002F\u002Fgithub.com\u002FWatsonWBlair\u002Flab-claude-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fengineering-discipline\u002Fskills\u002Fimprove-codebase-architecture\u002FHTML-REPORT.md",[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M75EF3QMQHD329CBDVNJH38S","prompt-optimization","Use when the user asks to optimize, improve, harden, or tighten a prompt; when \u002Foptimize-prompt is invoked; when a user hands over a rough prompt to be made AI-ready; when a prompt is described as vague, incomplete, or missing guardrails; or when the user asks for help making a prompt \"production-ready\" or \"model-ready.\"","https:\u002F\u002Fgithub.com\u002FWatsonWBlair\u002Flab-claude-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fprompt-optimization\u002Fskills\u002Fprompt-optimization\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M75EF0VG9XYWB3H9JKJN42RA","pr-review-loop","Use when driving a multi-pass PR review to a merge bar; when the user invokes \u002Fpr-review-loop; when a review pass returned critical findings that need fixing followed by another review; when iterative PR review-fix cycles need to run mostly hands-off.","https:\u002F\u002Fgithub.com\u002FWatsonWBlair\u002Flab-claude-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fpr-review-loop\u002Fskills\u002Fpr-review-loop\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M75EETCSKT40TF1DR4HZKWWQ","handoff","Compact the current conversation into a handoff document for another agent to pick up.","https:\u002F\u002Fgithub.com\u002FWatsonWBlair\u002Flab-claude-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fengineering-discipline\u002Fskills\u002Fhandoff\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M75EERHEFP1DXC49PRYQBYDZ","grilling","Interview the user relentlessly about a plan or design. Use when the user wants to stress-test a plan before building, or uses any 'grill' trigger phrases.","https:\u002F\u002Fgithub.com\u002FWatsonWBlair\u002Flab-claude-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fengineering-discipline\u002Fskills\u002Fgrilling\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M75EEPQ8132MPKGJ51RBK4Q3","grill-with-docs","A relentless interview to sharpen a plan or design, which also maintains the repo's GLOSSARY.md and logs load-bearing decisions as you go.","https:\u002F\u002Fgithub.com\u002FWatsonWBlair\u002Flab-claude-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fengineering-discipline\u002Fskills\u002Fgrill-with-docs\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M75EEMQTFVF6D4BS7RTH4AM9","grill-me","A relentless interview to sharpen a plan or design.","https:\u002F\u002Fgithub.com\u002FWatsonWBlair\u002Flab-claude-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fengineering-discipline\u002Fskills\u002Fgrill-me\u002FSKILL.md",[],[]]