[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ASTN2JYQDDKCNJ29T3JM00":3,"skill-same:01M7ASTN2JYQDDKCNJ29T3JM00":55},{"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":30,"updatedAt":31,"install":32,"resources":44},"01M7ASTN2JYQDDKCNJ29T3JM00","improve-codebase-architecture",null,"Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.","Diffusity\u002FrepoSphere_java_backend","Diffusity","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F119410541?v=4","01M7ASS8Z2BQV85KY5WA3C6G5E","Parth Maharaja","01M7ASS8ZRRXZNDAY7F88NBB4N",0,"MIT","https:\u002F\u002Fgithub.com\u002FDiffusity\u002FrepoSphere_java_backend\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\r\nname: improve-codebase-architecture\r\ndescription: Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.\r\ndisable-model-invocation: true\r\n---\r\n\r\n# Improve Codebase Architecture\r\n\r\nSurface architectural friction and propose **deepening opportunities** — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.\r\n\r\nThis command is _informed_ by the project's domain model and built on a shared design vocabulary:\r\n\r\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.\"\r\n- The domain language in `CONTEXT.md` gives names to good seams; ADRs in `docs\u002Fadr\u002F` record decisions this command should not re-litigate.\r\n\r\n## Process\r\n\r\n### 1. Explore\r\n\r\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:\r\n\r\n- If the user named a direction — a module, a subsystem, a pain point — take it, and skip the inference below.\r\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.\r\n\r\nRead the project's domain glossary (`CONTEXT.md`) and any ADRs in the area you're touching first.\r\n\r\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:\r\n\r\n- Where does understanding one concept require bouncing between many small modules?\r\n- Where are modules **shallow** — interface nearly as complex as the implementation?\r\n- Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no **locality**)?\r\n- Where do tightly-coupled modules leak across their seams?\r\n- Which parts of the codebase are untested, or hard to test through their current interface?\r\n\r\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.\r\n\r\n### 2. Present candidates as an HTML report\r\n\r\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.\r\n\r\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.\r\n\r\nFor each candidate, render a card with:\r\n\r\n- **Files** — which files\u002Fmodules are involved\r\n- **Problem** — why the current architecture is causing friction\r\n- **Solution** — plain English description of what would change\r\n- **Benefits** — explained in terms of locality and leverage, and how tests would improve\r\n- **Before \u002F After diagram** — side-by-side, custom-drawn, illustrating the shallowness and the deepening\r\n- **Recommendation strength** — one of `Strong`, `Worth exploring`, `Speculative`, rendered as a badge\r\n\r\nEnd the report with a **Top recommendation** section: which candidate you'd tackle first and why.\r\n\r\n**Use CONTEXT.md vocabulary for the domain, and the `\u002Fcodebase-design` vocabulary for the architecture.** If `CONTEXT.md` defines \"Order,\" talk about \"the Order intake module\" — not \"the FooBarHandler,\" and not \"the Order service.\"\r\n\r\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 card (e.g. a warning callout: _\"contradicts ADR-0007 — but worth reopening because…\"_). Don't list every theoretical refactor an ADR forbids.\r\n\r\nSee [HTML-REPORT.md](HTML-REPORT.md) for the full HTML scaffold, diagram patterns, and styling guidance.\r\n\r\nDo NOT propose interfaces yet. After the file is written, ask the user: \"Which of these would you like to explore?\"\r\n\r\n### 3. Grilling loop\r\n\r\nOnce the user picks a candidate, run the `\u002Fgrilling` skill to walk the decision tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.\r\n\r\nSide effects happen inline as decisions crystallize — run the `\u002Fdomain-modeling` skill to keep the domain model current as you go:\r\n\r\n- **Naming a deepened module after a concept not in `CONTEXT.md`?** Add the term to `CONTEXT.md`. Create the file lazily if it doesn't exist.\r\n- **Sharpening a fuzzy term during the conversation?** Update `CONTEXT.md` right there.\r\n- **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: _\"Want me to record this as an ADR 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.\r\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.\r\n","# Improve Codebase Architecture\r\n\r\nSurface architectural friction and propose **deepening opportunities** — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.\r\n\r\nThis command is _informed_ by the project's domain model and built on a shared design vocabulary:\r\n\r\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.\"\r\n- The domain language in `CONTEXT.md` gives names to good seams; ADRs in `docs\u002Fadr\u002F` record decisions this command should not re-litigate.\r\n\r\n## Process\r\n\r\n### 1. Explore\r\n\r\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:\r\n\r\n- If the user named a direction — a module, a subsystem, a pain point — take it, and skip the inference below.\r\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.\r\n\r\nRead the project's domain glossary (`CONTEXT.md`) and any ADRs in the area you're touching first.\r\n\r\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:\r\n\r\n- Where does understanding one concept require bouncing between many small modules?\r\n- Where are modules **shallow** — interface nearly as complex as the implementation?\r\n- Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no **locality**)?\r\n- Where do tightly-coupled modules leak across their seams?\r\n- Which parts of the codebase are untested, or hard to test through their current interface?\r\n\r\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.\r\n\r\n### 2. Present candidates as an HTML report\r\n\r\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.\r\n\r\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.\r\n\r\nFor each candidate, render a card with:\r\n\r\n- **Files** — which files\u002Fmodules are involved\r\n- **Problem** — why the current architecture is causing friction\r\n- **Solution** — plain English description of what would change\r\n- **Benefits** — explained in terms of locality and leverage, and how tests would improve\r\n- **Before \u002F After diagram** — side-by-side, custom-drawn, illustrating the shallowness and the deepening\r\n- **Recommendation strength** — one of `Strong`, `Worth exploring`, `Speculative`, rendered as a badge\r\n\r\nEnd the report with a **Top recommendation** section: which candidate you'd tackle first and why.\r\n\r\n**Use CONTEXT.md vocabulary for the domain, and the `\u002Fcodebase-design` vocabulary for the architecture.** If `CONTEXT.md` defines \"Order,\" talk about \"the Order intake module\" — not \"the FooBarHandler,\" and not \"the Order service.\"\r\n\r\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 card (e.g. a warning callout: _\"contradicts ADR-0007 — but worth reopening because…\"_). Don't list every theoretical refactor an ADR forbids.\r\n\r\nSee [HTML-REPORT.md](HTML-REPORT.md) for the full HTML scaffold, diagram patterns, and styling guidance.\r\n\r\nDo NOT propose interfaces yet. After the file is written, ask the user: \"Which of these would you like to explore?\"\r\n\r\n### 3. Grilling loop\r\n\r\nOnce the user picks a candidate, run the `\u002Fgrilling` skill to walk the decision tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.\r\n\r\nSide effects happen inline as decisions crystallize — run the `\u002Fdomain-modeling` skill to keep the domain model current as you go:\r\n\r\n- **Naming a deepened module after a concept not in `CONTEXT.md`?** Add the term to `CONTEXT.md`. Create the file lazily if it doesn't exist.\r\n- **Sharpening a fuzzy term during the conversation?** Update `CONTEXT.md` right there.\r\n- **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: _\"Want me to record this as an ADR 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.\r\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.\r\n",{"name":5,"description":7,"disable-model-invocation":24},true,"main","7623da0074c7f2756326dd104a40d1b0861a7edf",".agents\u002Fskills\u002Fimprove-codebase-architecture","https:\u002F\u002Fgithub.com\u002FDiffusity\u002FrepoSphere_java_backend","https:\u002F\u002Fgithub.com\u002FDiffusity","Member @gdg-da | @ossdaiict ","2026-08-18 17:58:04",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":24},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Diffusity\u002FrepoSphere_java_backend --skill improve-codebase-architecture",{"tool":38,"command":39},"bunx","bunx skills add Diffusity\u002FrepoSphere_java_backend --skill improve-codebase-architecture",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Diffusity\u002FrepoSphere_java_backend --skill improve-codebase-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDiffusity\u002FrepoSphere_java_backend\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[45,51],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"agents\u002Fopenai.yaml","REFERENCE","参考文档",171,"https:\u002F\u002Fgithub.com\u002FDiffusity\u002FrepoSphere_java_backend\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimprove-codebase-architecture\u002Fagents\u002Fopenai.yaml",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"HTML-REPORT.md",6808,"https:\u002F\u002Fgithub.com\u002FDiffusity\u002FrepoSphere_java_backend\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimprove-codebase-architecture\u002FHTML-REPORT.md",[56,63,70,77,84,91],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7ASXG7ZJ4SX5JDCYSQFWBNG","writing-shape","Writing, exploit — shape raw material into an article, paragraph by paragraph.","https:\u002F\u002Fgithub.com\u002FDiffusity\u002FrepoSphere_java_backend\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwriting-shape\u002FSKILL.md",[],[],{"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},"01M7ASXCE1RQCW502FDAJZ7J3X","writing-great-skills","Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.","https:\u002F\u002Fgithub.com\u002FDiffusity\u002FrepoSphere_java_backend\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwriting-great-skills\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7ASXA5NMS4ZEBCTWX29RNZ8","writing-fragments","Writing, explore — mine raw fragments, no structure yet.","https:\u002F\u002Fgithub.com\u002FDiffusity\u002FrepoSphere_java_backend\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwriting-fragments\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7ASX7AM9T3DAJ6A0A6GYTFZ","writing-beats","Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.","https:\u002F\u002Fgithub.com\u002FDiffusity\u002FrepoSphere_java_backend\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwriting-beats\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":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7ASX2F6FY5EW9SHSV5X2DHC","wizard","Generate an interactive bash wizard that walks a human through a manual procedure — third-party setup, a one-off migration, an A→B state transition — opening URLs, capturing values, confirming each step, and writing .env files and GitHub Actions secrets.","https:\u002F\u002Fgithub.com\u002FDiffusity\u002FrepoSphere_java_backend\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwizard\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7ASWY2DYFMW5PK6X6YWCC90","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\u002FDiffusity\u002FrepoSphere_java_backend\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwayfinder\u002FSKILL.md",[],[]]