[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ABGX3DX86ZXHK44SVHMSTV":3,"skill-same:01M7ABGX3DX86ZXHK44SVHMSTV":56},{"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":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":45},"01M7ABGX3DX86ZXHK44SVHMSTV","improve-codebase-architecture",null,"Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.","j0hanz\u002Fj0hanz-marketplace","j0hanz","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F159924955?v=4","01M7ABFK415CKHXYV9GZRJ16T7","Linus Johansson","01M7ABFK52FCPP2PNBH1YR7ZPA",0,"MIT","https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fgroundwork\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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, propose **deepening opportunities**: refactors turning shallow modules into deep ones. Aim: testability and AI-navigability.\n\nCommand _informed_ by project domain model, built on shared design vocabulary:\n\n- Call Skill tool with `groundwork:codebase-design` for architecture vocabulary (**module**, **interface**, **depth**, **seam**, **adapter**, **leverage**, **locality**) and principles (deletion test, \"the interface is the test surface\", \"one adapter = hypothetical seam, two = real\"). Use these terms exactly in every suggestion. No drift into \"component,\" \"service,\" \"API,\" \"boundary.\"\n- Domain language in `GLOSSARY.md` names good seams. ADRs in `docs\u002Fadr\u002F` record decisions this command must not re-litigate.\n\n## Process\n\n### 1. Explore\n\n**Scope before scan: YAGNI.** Deepening module pays off by easing future changes, so weight recently changed parts extra. Decide _where_ to look before looking:\n\n- User named direction (module, subsystem, pain point)? Take it, skip inference below.\n- Else walk back good stretch of commit history (`git log --oneline`) to find hot spots: files\u002Fareas that keep coming up. Let those paths pull attention first. Changes scattered, no clear hot spot? Widen net.\n\nRead domain glossary (`GLOSSARY.md`) and any ADRs in touched area first.\n\nThen spawn sub-agent to walk codebase. No rigid heuristics; explore organically, note where friction felt:\n\n- Where does understanding one concept require bouncing between many small modules?\n- Where are modules **shallow**, interface nearly as complex as implementation?\n- Where were pure functions extracted just for testability, but real bugs hide in how they're called (no **locality**)?\n- Where do tightly-coupled modules leak across seams?\n- Which parts untested, or hard to test through current interface?\n\nApply **deletion test** to suspected shallow things: would deleting concentrate complexity, or just move it? \"Yes, concentrates\" = wanted signal.\n\n### 2. Present candidates as an HTML report\n\nWrite self-contained HTML file to OS temp dir so nothing lands in repo. Resolve temp dir from `$TMPDIR`, fallback `\u002Ftmp` (or `%TEMP%` on Windows), write to `\u003Ctmpdir>\u002Farchitecture-review-\u003Ctimestamp>.html` so each run gets fresh file. Open for user (`xdg-open \u003Cpath>` on Linux, `open \u003Cpath>` on macOS, `start \u003Cpath>` on Windows), tell them absolute path.\n\nReport starts as copy of [report.html](report.html): fixed stylesheet setting look, plus **Mermaid** pinned from CDN for diagrams where graph, flow or sequence shows structure. Write only body. Mix Mermaid with scaffold's hand-built visuals: Mermaid when relationships graph-shaped (call graphs, dependencies, sequences); core samples, cross-sections or collapse boxes when point is depth. Each candidate gets **before\u002Fafter visualisation**. Be visual.\n\nPer candidate, render card with:\n\n- **Files**: files\u002Fmodules involved\n- **Problem**: why current architecture causes friction\n- **Solution**: plain English description of change\n- **Benefits**: in terms of locality and leverage, plus how tests improve\n- **Before \u002F After diagram**: side-by-side, custom-drawn, showing shallowness and deepening\n- **Recommendation strength**: one of `Strong`, `Worth exploring`, `Speculative`, rendered as badge\n\nOpen report with **Top recommendation** in title block: which candidate to tackle first and why.\n\n**Use GLOSSARY.md vocabulary for the domain, and the `groundwork:codebase-design` vocabulary for the architecture.** If `GLOSSARY.md` defines \"Order,\" say \"the Order intake module,\" not \"the FooBarHandler,\" not \"the Order service.\"\n\n**ADR conflicts**: candidate contradicts existing ADR? Surface only when friction real enough to warrant revisiting ADR. Mark clearly in card (e.g. warning callout: _\"contradicts ADR-0007, but worth reopening because…\"_). Don't list every theoretical refactor ADR forbids.\n\nSee [HTML-REPORT.md](HTML-REPORT.md) for filling template, markup vocabulary, diagram patterns.\n\nDo NOT propose interfaces yet. After file written, ask user: \"Which of these would you like to explore?\"\n\n### 3. Grilling loop\n\nUser picks candidate → call Skill tool with `groundwork:grilling` to walk decision tree together: constraints, dependencies, shape of deepened module, what sits behind seam, what tests survive.\n\nSide effects happen inline as decisions crystallize. Call Skill tool with `groundwork:domain-modeling` to keep domain model current:\n\n- **Naming a deepened module after a concept not in `GLOSSARY.md`?** Add term to `GLOSSARY.md`. Create file lazily if missing.\n- **Sharpening a fuzzy term during the conversation?** Update `GLOSSARY.md` right there.\n- **User rejects the candidate with a load-bearing reason?** Offer ADR, framed as: _\"Want me to record this as an ADR so future architecture reviews don't re-suggest it?\"_ Offer only when future explorer would actually need reason to avoid re-suggesting. Skip ephemeral reasons (\"not worth it right now\") and self-evident ones.\n- **Want to explore alternative interfaces for the deepened module?** Call Skill tool with `groundwork:codebase-design`, use its design-it-twice parallel sub-agent pattern.\n","# Improve Codebase Architecture\n\nSurface architectural friction, propose **deepening opportunities**: refactors turning shallow modules into deep ones. Aim: testability and AI-navigability.\n\nCommand _informed_ by project domain model, built on shared design vocabulary:\n\n- Call Skill tool with `groundwork:codebase-design` for architecture vocabulary (**module**, **interface**, **depth**, **seam**, **adapter**, **leverage**, **locality**) and principles (deletion test, \"the interface is the test surface\", \"one adapter = hypothetical seam, two = real\"). Use these terms exactly in every suggestion. No drift into \"component,\" \"service,\" \"API,\" \"boundary.\"\n- Domain language in `GLOSSARY.md` names good seams. ADRs in `docs\u002Fadr\u002F` record decisions this command must not re-litigate.\n\n## Process\n\n### 1. Explore\n\n**Scope before scan: YAGNI.** Deepening module pays off by easing future changes, so weight recently changed parts extra. Decide _where_ to look before looking:\n\n- User named direction (module, subsystem, pain point)? Take it, skip inference below.\n- Else walk back good stretch of commit history (`git log --oneline`) to find hot spots: files\u002Fareas that keep coming up. Let those paths pull attention first. Changes scattered, no clear hot spot? Widen net.\n\nRead domain glossary (`GLOSSARY.md`) and any ADRs in touched area first.\n\nThen spawn sub-agent to walk codebase. No rigid heuristics; explore organically, note where friction felt:\n\n- Where does understanding one concept require bouncing between many small modules?\n- Where are modules **shallow**, interface nearly as complex as implementation?\n- Where were pure functions extracted just for testability, but real bugs hide in how they're called (no **locality**)?\n- Where do tightly-coupled modules leak across seams?\n- Which parts untested, or hard to test through current interface?\n\nApply **deletion test** to suspected shallow things: would deleting concentrate complexity, or just move it? \"Yes, concentrates\" = wanted signal.\n\n### 2. Present candidates as an HTML report\n\nWrite self-contained HTML file to OS temp dir so nothing lands in repo. Resolve temp dir from `$TMPDIR`, fallback `\u002Ftmp` (or `%TEMP%` on Windows), write to `\u003Ctmpdir>\u002Farchitecture-review-\u003Ctimestamp>.html` so each run gets fresh file. Open for user (`xdg-open \u003Cpath>` on Linux, `open \u003Cpath>` on macOS, `start \u003Cpath>` on Windows), tell them absolute path.\n\nReport starts as copy of [report.html](report.html): fixed stylesheet setting look, plus **Mermaid** pinned from CDN for diagrams where graph, flow or sequence shows structure. Write only body. Mix Mermaid with scaffold's hand-built visuals: Mermaid when relationships graph-shaped (call graphs, dependencies, sequences); core samples, cross-sections or collapse boxes when point is depth. Each candidate gets **before\u002Fafter visualisation**. Be visual.\n\nPer candidate, render card with:\n\n- **Files**: files\u002Fmodules involved\n- **Problem**: why current architecture causes friction\n- **Solution**: plain English description of change\n- **Benefits**: in terms of locality and leverage, plus how tests improve\n- **Before \u002F After diagram**: side-by-side, custom-drawn, showing shallowness and deepening\n- **Recommendation strength**: one of `Strong`, `Worth exploring`, `Speculative`, rendered as badge\n\nOpen report with **Top recommendation** in title block: which candidate to tackle first and why.\n\n**Use GLOSSARY.md vocabulary for the domain, and the `groundwork:codebase-design` vocabulary for the architecture.** If `GLOSSARY.md` defines \"Order,\" say \"the Order intake module,\" not \"the FooBarHandler,\" not \"the Order service.\"\n\n**ADR conflicts**: candidate contradicts existing ADR? Surface only when friction real enough to warrant revisiting ADR. Mark clearly in card (e.g. warning callout: _\"contradicts ADR-0007, but worth reopening because…\"_). Don't list every theoretical refactor ADR forbids.\n\nSee [HTML-REPORT.md](HTML-REPORT.md) for filling template, markup vocabulary, diagram patterns.\n\nDo NOT propose interfaces yet. After file written, ask user: \"Which of these would you like to explore?\"\n\n### 3. Grilling loop\n\nUser picks candidate → call Skill tool with `groundwork:grilling` to walk decision tree together: constraints, dependencies, shape of deepened module, what sits behind seam, what tests survive.\n\nSide effects happen inline as decisions crystallize. Call Skill tool with `groundwork:domain-modeling` to keep domain model current:\n\n- **Naming a deepened module after a concept not in `GLOSSARY.md`?** Add term to `GLOSSARY.md`. Create file lazily if missing.\n- **Sharpening a fuzzy term during the conversation?** Update `GLOSSARY.md` right there.\n- **User rejects the candidate with a load-bearing reason?** Offer ADR, framed as: _\"Want me to record this as an ADR so future architecture reviews don't re-suggest it?\"_ Offer only when future explorer would actually need reason to avoid re-suggesting. Skip ephemeral reasons (\"not worth it right now\") and self-evident ones.\n- **Want to explore alternative interfaces for the deepened module?** Call Skill tool with `groundwork:codebase-design`, use its design-it-twice parallel sub-agent pattern.\n",{"name":5,"description":7,"disable-model-invocation":24},true,"main","534498267dccbe415f22f31fceac9da6771c195f","plugins\u002Fgroundwork\u002Fskills\u002Fimprove-codebase-architecture","https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace","https:\u002F\u002Fj0hanz-marketplace.vercel.app","https:\u002F\u002Fgithub.com\u002Fj0hanz","linus-johansson-cv-d308be9b73e1.herokuapp.com","2026-11-15 02:42:07",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":24},[35,38,41],{"tool":36,"command":37},"npx","npx skills add j0hanz\u002Fj0hanz-marketplace --skill improve-codebase-architecture",{"tool":39,"command":40},"bunx","bunx skills add j0hanz\u002Fj0hanz-marketplace --skill improve-codebase-architecture",{"tool":42,"command":43},"pnpm","pnpm dlx skills add j0hanz\u002Fj0hanz-marketplace --skill improve-codebase-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fgroundwork\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[46,52],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"HTML-REPORT.md","REFERENCE","参考文档",11129,"https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fgroundwork\u002Fskills\u002Fimprove-codebase-architecture\u002FHTML-REPORT.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"report.html",15652,"https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fgroundwork\u002Fskills\u002Fimprove-codebase-architecture\u002Freport.html",[57,64,71,78,85,92],{"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},"01M7ABP78JFYBMCXJ9GMETCYZM","unslop","Use when writing or editing prose a person will read, or when text sounds AI-generated.","https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fwriteup\u002Fskills\u002Funslop\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},"01M7ABP52BNV7NRPNBR6PCNZWC","show-me","Use when asked to show, diagram, or walk through how code fits together or what a change does, or before explaining a multi-file flow in prose.","https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fwriteup\u002Fskills\u002Fshow-me\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},"01M7ABP3EPN4KFB4HPJNMY31NR","pr","Use when writing or updating a pull request description, or before running `gh pr create`.","https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fwriteup\u002Fskills\u002Fpr\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},"01M7ABP08MXTHPZYTG4HKEP7WQ","commit","Use when writing a commit message, or before running `git commit`.","https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fwriteup\u002Fskills\u002Fcommit\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},"01M7ABNV9J7DN1AFRBGDBHVBY2","write-specs","Spec a feature's observable behavior. Use when asked for requirements, when a request says what the system should do but not how, or to capture what a built system already guarantees. Not for how to build it (write-plan).","https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fwrite-specs\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"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},"01M7ABNPK2GVG8EB3SSEAMK4FZ","write-skills","Write, fix, or audit a skill's frontmatter, trigger description, and body. Use when a skill is asked for, never fires, or fires at the wrong moment. Not for a hook (write-hooks) or the plugin manifest and catalog.","https:\u002F\u002Fgithub.com\u002Fj0hanz\u002Fj0hanz-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fwrite-skills\u002FSKILL.md",[],[]]