[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CP0W63EN6ST2D8SYRDYF8E":3,"skill-same:01M7CP0W63EN6ST2D8SYRDYF8E":68},{"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":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":14,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":44},"01M7CP0W63EN6ST2D8SYRDYF8E","improve-codebase-architecture",null,"Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.","syanga\u002Fastack","syanga","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42523849?v=4","01M7CNYD2SW40HXC8R8CTVJPGE","Alan Yang","01M7CNYD3D0B0EYPA4AGXC1VC8",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fimprove-codebase-architecture\u002FLICENSE-mattpocock","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\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 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 project's domain model and built on a shared design vocabulary:\n\n- Read [Deep Modules](..\u002Fprinciples\u002Fdeep-modules.md) 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, and don't drift into \"component,\" \"service,\" or \"API.\"\n- The project's domain glossary, located per [GLOSSARY-FORMAT.md](..\u002Fdomain-modeling\u002FGLOSSARY-FORMAT.md), gives names to good seams; its ADRs record decisions this command should not re-litigate.\n\n## Process\n\n### 1. Explore\n\n**Scope before you scan: YAGNI.** Deepening a module pays off by making future changes to it easier, so put extra weight on the parts of the codebase that have recently changed. Decide *where* to look before you look:\n\n- If the user named a direction (a module, a subsystem, a pain point), take it, and skip the inference below.\n- Otherwise, walk back a good stretch of the commit history (`git log --oneline`) to find the codebase's hot spots, the files and areas that keep coming up, and let those paths pull your attention first. If the changes are scattered with no clear hot spot, widen the net.\n\nRead the project's domain glossary and any ADRs in the area you're touching first, when available.\n\nThen spawn a sub-agent with a fresh context window to walk the codebase, with the scope, domain vocabulary, and principle guidance below. 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**, with an 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 from [Deep Modules](..\u002Fprinciples\u002Fdeep-modules.md) to anything you suspect is shallow.\n\nRead [Minimize Reader Load](..\u002Fprinciples\u002Fminimize-reader-load.md), [Laziness Protocol](..\u002Fprinciples\u002Flaziness-protocol.md), and [Subtract Before You Add](..\u002Fprinciples\u002Fsubtract-before-you-add.md) to judge which candidates are worth pursuing.\n\n### 2. Present candidates as an HTML report\n\nWrite a self-contained HTML report with before\u002Fafter visualizations, following [HTML-REPORT.md](HTML-REPORT.md). In T3 Code, deliver it through [t3-preview](..\u002Ft3-preview\u002FSKILL.md). Elsewhere, open it for the user and report the absolute path.\n\n**ADR conflicts**: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly in the candidate section (e.g. a warning callout: _\"contradicts ADR-0007, but worth reopening because…\"_). Don't list every theoretical refactor an ADR forbids.\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, follow [grilling](..\u002Fgrilling\u002FSKILL.md) to walk the decision tree with them: constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.\n\nRead [Model the Domain](..\u002Fprinciples\u002Fmodel-the-domain.md) and [Foundational Thinking](..\u002Fprinciples\u002Ffoundational-thinking.md) when deciding what the module owns. For representation and validation choices, read [Boundary Discipline](..\u002Fprinciples\u002Fboundary-discipline.md) and [Type System Discipline](..\u002Fprinciples\u002Ftype-system-discipline.md). For shared writes or retry behavior, read [Separate Before Serializing Shared State](..\u002Fprinciples\u002Fseparate-before-serializing-shared-state.md) or [Make Operations Idempotent](..\u002Fprinciples\u002Fmake-operations-idempotent.md), respectively.\n\nFollow [domain-modeling](..\u002Fdomain-modeling\u002FSKILL.md) as terms and decisions resolve, passing along any identified glossary and ADR locations. Apply its ADR criteria to rejected candidates as well.\n\nIf the user wants to explore alternative interfaces for the deepened module, follow [Design It Twice](DESIGN-IT-TWICE.md).\n\nWhen the user authorizes implementation of a behavior-preserving change, hand the chosen design to [refactoring](..\u002Frefactoring\u002FSKILL.md). A change to observable behavior belongs in [implement](..\u002Fimplement\u002FSKILL.md). Reuse the decisions and evidence from this exploration.\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 project's domain model and built on a shared design vocabulary:\n\n- Read [Deep Modules](..\u002Fprinciples\u002Fdeep-modules.md) 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, and don't drift into \"component,\" \"service,\" or \"API.\"\n- The project's domain glossary, located per [GLOSSARY-FORMAT.md](..\u002Fdomain-modeling\u002FGLOSSARY-FORMAT.md), gives names to good seams; its ADRs record decisions this command should not re-litigate.\n\n## Process\n\n### 1. Explore\n\n**Scope before you scan: YAGNI.** Deepening a module pays off by making future changes to it easier, so put extra weight on the parts of the codebase that have recently changed. Decide *where* to look before you look:\n\n- If the user named a direction (a module, a subsystem, a pain point), take it, and skip the inference below.\n- Otherwise, walk back a good stretch of the commit history (`git log --oneline`) to find the codebase's hot spots, the files and areas that keep coming up, and let those paths pull your attention first. If the changes are scattered with no clear hot spot, widen the net.\n\nRead the project's domain glossary and any ADRs in the area you're touching first, when available.\n\nThen spawn a sub-agent with a fresh context window to walk the codebase, with the scope, domain vocabulary, and principle guidance below. 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**, with an 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 from [Deep Modules](..\u002Fprinciples\u002Fdeep-modules.md) to anything you suspect is shallow.\n\nRead [Minimize Reader Load](..\u002Fprinciples\u002Fminimize-reader-load.md), [Laziness Protocol](..\u002Fprinciples\u002Flaziness-protocol.md), and [Subtract Before You Add](..\u002Fprinciples\u002Fsubtract-before-you-add.md) to judge which candidates are worth pursuing.\n\n### 2. Present candidates as an HTML report\n\nWrite a self-contained HTML report with before\u002Fafter visualizations, following [HTML-REPORT.md](HTML-REPORT.md). In T3 Code, deliver it through [t3-preview](..\u002Ft3-preview\u002FSKILL.md). Elsewhere, open it for the user and report the absolute path.\n\n**ADR conflicts**: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly in the candidate section (e.g. a warning callout: _\"contradicts ADR-0007, but worth reopening because…\"_). Don't list every theoretical refactor an ADR forbids.\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, follow [grilling](..\u002Fgrilling\u002FSKILL.md) to walk the decision tree with them: constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.\n\nRead [Model the Domain](..\u002Fprinciples\u002Fmodel-the-domain.md) and [Foundational Thinking](..\u002Fprinciples\u002Ffoundational-thinking.md) when deciding what the module owns. For representation and validation choices, read [Boundary Discipline](..\u002Fprinciples\u002Fboundary-discipline.md) and [Type System Discipline](..\u002Fprinciples\u002Ftype-system-discipline.md). For shared writes or retry behavior, read [Separate Before Serializing Shared State](..\u002Fprinciples\u002Fseparate-before-serializing-shared-state.md) or [Make Operations Idempotent](..\u002Fprinciples\u002Fmake-operations-idempotent.md), respectively.\n\nFollow [domain-modeling](..\u002Fdomain-modeling\u002FSKILL.md) as terms and decisions resolve, passing along any identified glossary and ADR locations. Apply its ADR criteria to rejected candidates as well.\n\nIf the user wants to explore alternative interfaces for the deepened module, follow [Design It Twice](DESIGN-IT-TWICE.md).\n\nWhen the user authorizes implementation of a behavior-preserving change, hand the chosen design to [refactoring](..\u002Frefactoring\u002FSKILL.md). A change to observable behavior belongs in [implement](..\u002Fimplement\u002FSKILL.md). Reuse the decisions and evidence from this exploration.\n",{"name":5,"description":7,"disable-model-invocation":25},true,"main","ec1ea5dc71f382a2a09360a736d31b7294e5ecc2","skills\u002Fimprove-codebase-architecture","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack","https:\u002F\u002Fgithub.com\u002Fsyanga","2026-11-14 17:01:29",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":25},[34,37,40],{"tool":35,"command":36},"npx","npx skills add syanga\u002Fastack --skill improve-codebase-architecture",{"tool":38,"command":39},"bunx","bunx skills add syanga\u002Fastack --skill improve-codebase-architecture",{"tool":41,"command":42},"pnpm","pnpm dlx skills add syanga\u002Fastack --skill improve-codebase-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[45,51,55,59,63],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"agents\u002Fopenai.yaml","REFERENCE","参考文档",166,"https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fimprove-codebase-architecture\u002Fagents\u002Fopenai.yaml",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"DEEPENING.md",2301,"https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fimprove-codebase-architecture\u002FDEEPENING.md",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"DESIGN-IT-TWICE.md",2932,"https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fimprove-codebase-architecture\u002FDESIGN-IT-TWICE.md",{"path":60,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":61,"sourceHtmlUrl":62},"HTML-REPORT.md",6901,"https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fimprove-codebase-architecture\u002FHTML-REPORT.md",{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":16},"LICENSE-mattpocock","LICENSE","许可证",1068,[69,76,84,92,100,108],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":20},"01M7CP39S6D7662SFCC9K286T7","replace-with-skill-name","Replace with when this skill should be reached.","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Ftemplates\u002Fskill\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":80,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":20},"01M7CP37YN62Z7VR6P2J7918ZA","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-for-agents\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":20},"01M7CP353RP2S1M1ZMHFZ0F610","worktree-cleanup","Worktree cleanup. Use for cleanup, resource audits, close this lane, or close out.","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fworktree-cleanup\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fworktree-cleanup\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":96,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":20},"01M7CP32DSVPRTBAFHF1P6NZ1X","wizard","Generate an interactive Bash wizard that walks a human through steps only they can perform. Use when provisioning, credential setup, or a one-off migration needs such steps.","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fwizard\u002FLICENSE-mattpocock","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fwizard\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":20},"01M7CP2YE3WABQE9MNY8RQD6MX","why","Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Returns a cited read on decisions and tradeoffs.","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fwhy\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fwhy\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":112,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":20},"01M7CP2VP8JA1HYDE8TJX2Y494","wayfinder","Plan a huge chunk of work (more than one agent session can hold) as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fwayfinder\u002FLICENSE-mattpocock","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fwayfinder\u002FSKILL.md",[],[]]