[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71FWDWPXVWR0GBB4SSWXPJK":3,"skill-same:01M71FWDWPXVWR0GBB4SSWXPJK":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":48,"install":49,"resources":61},"01M71FWDWPXVWR0GBB4SSWXPJK","improve-codebase-architecture",null,"Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.","Andy-CH-BO-AN\u002FAI-running-coach","Andy-CH-BO-AN","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F58759761?v=4","01M71FSKGT9TWBMY2SFP4V2JR8","01M71FSKHQAN25HG2TRY5WVCMG",2,"MIT","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002FAI-running-coach\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],"architecture","improve codebase architecture","improve","codebase","one","deepening","for","true","you","as","present","visual","scan","grill","html","pick","html report","report","2026-11-10 10:12:30",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- 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 domain language in `CONTEXT.md` gives names to good seams; ADRs in `docs\u002Fadr\u002F` 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 (`CONTEXT.md`) and any ADRs in the area you're touching first.\n\nThen walk the codebase using your runtime's available subagent or task delegation tool (e.g. `Agent` tool with `subagent_type=Explore`, `spawn_agent`, or equivalent subagent primitive). If your runtime environment does not support subagent spawning, perform the exploration step sequentially within the current agent turn. 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\nWrite a 100% self-contained, offline HTML file to the OS temp directory (`\u003Ctmpdir>\u002Farchitecture-review-\u003Ctimestamp>.html`), and ALSO save a copy to the workspace output directory (`output\u002Farchitecture-review-\u003Ctimestamp>.html`) so remote\u002Fheadless users can access and download it. Ensure the workspace destination directory exists prior to writing (e.g., create `output\u002F` via `mkdir -p output` if missing).\n\n**Desktop Opener & Headless Fallback:**\n- If a desktop environment is available, attempt to open the file (`open \u003Cpath>` on macOS, `xdg-open \u003Cpath>` on Linux, `start \u003Cpath>` on Windows).\n- If running in a headless session, remote container, CLI runner, or if desktop opening is unavailable:\n  1. Surface the workspace file path `output\u002Farchitecture-review-\u003Ctimestamp>.html` so remote users can open\u002Fdownload it from the workspace.\n  2. **Inline Markdown Fallback:** Render an inline Markdown summary of all candidates (Title, Files, Problem, Solution, Benefits, Recommendation Strength, and Top Recommendation) directly in your chat response so the deliverable is immediately readable regardless of environment.\n\n**Local Data & Security Constraint:** Do NOT load any unpinned external scripts or CSS from CDNs (such as Tailwind CDN or Mermaid CDN). The report MUST function completely offline with zero network requests. Use embedded CSS (system typography, CSS variables, flexbox\u002Fgrid layouts) and hand-crafted inline SVG \u002F HTML elements for diagrams (boxes, seams, call graphs, cross-sections, collapse visuals). 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 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.\"\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 card (e.g. a warning callout: _\"contradicts ADR-0007 — but worth reopening because…\"_). Don't list every theoretical refactor an ADR 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 report is delivered (via HTML file and inline fallback if headless), 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 decision 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 — run the `\u002Fdomain-modeling` skill to keep the domain model current as you go:\n\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.\n- **Sharpening a fuzzy term during the conversation?** Update `CONTEXT.md` right there.\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.\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 project's domain model 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 domain language in `CONTEXT.md` gives names to good seams; ADRs in `docs\u002Fadr\u002F` 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 (`CONTEXT.md`) and any ADRs in the area you're touching first.\n\nThen walk the codebase using your runtime's available subagent or task delegation tool (e.g. `Agent` tool with `subagent_type=Explore`, `spawn_agent`, or equivalent subagent primitive). If your runtime environment does not support subagent spawning, perform the exploration step sequentially within the current agent turn. 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\nWrite a 100% self-contained, offline HTML file to the OS temp directory (`\u003Ctmpdir>\u002Farchitecture-review-\u003Ctimestamp>.html`), and ALSO save a copy to the workspace output directory (`output\u002Farchitecture-review-\u003Ctimestamp>.html`) so remote\u002Fheadless users can access and download it. Ensure the workspace destination directory exists prior to writing (e.g., create `output\u002F` via `mkdir -p output` if missing).\n\n**Desktop Opener & Headless Fallback:**\n- If a desktop environment is available, attempt to open the file (`open \u003Cpath>` on macOS, `xdg-open \u003Cpath>` on Linux, `start \u003Cpath>` on Windows).\n- If running in a headless session, remote container, CLI runner, or if desktop opening is unavailable:\n  1. Surface the workspace file path `output\u002Farchitecture-review-\u003Ctimestamp>.html` so remote users can open\u002Fdownload it from the workspace.\n  2. **Inline Markdown Fallback:** Render an inline Markdown summary of all candidates (Title, Files, Problem, Solution, Benefits, Recommendation Strength, and Top Recommendation) directly in your chat response so the deliverable is immediately readable regardless of environment.\n\n**Local Data & Security Constraint:** Do NOT load any unpinned external scripts or CSS from CDNs (such as Tailwind CDN or Mermaid CDN). The report MUST function completely offline with zero network requests. Use embedded CSS (system typography, CSS variables, flexbox\u002Fgrid layouts) and hand-crafted inline SVG \u002F HTML elements for diagrams (boxes, seams, call graphs, cross-sections, collapse visuals). 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 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.\"\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 card (e.g. a warning callout: _\"contradicts ADR-0007 — but worth reopening because…\"_). Don't list every theoretical refactor an ADR 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 report is delivered (via HTML file and inline fallback if headless), 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 decision 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 — run the `\u002Fdomain-modeling` skill to keep the domain model current as you go:\n\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.\n- **Sharpening a fuzzy term during the conversation?** Update `CONTEXT.md` right there.\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.\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":41},true,"main","c8423dc370076b0251f5c049b7c3ea3bc4d17d75","ai\u002Fskills\u002Fimprove-codebase-architecture",0,"https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002FAI-running-coach","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN","2026-10-23 22:13:05",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":41},[51,54,57],{"tool":52,"command":53},"npx","npx skills add Andy-CH-BO-AN\u002FAI-running-coach --skill improve-codebase-architecture",{"tool":55,"command":56},"bunx","bunx skills add Andy-CH-BO-AN\u002FAI-running-coach --skill improve-codebase-architecture",{"tool":58,"command":59},"pnpm","pnpm dlx skills add Andy-CH-BO-AN\u002FAI-running-coach --skill improve-codebase-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002FAI-running-coach\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[62,68],{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"agents\u002Fopenai.yaml","REFERENCE","参考文档",166,"https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002FAI-running-coach\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fimprove-codebase-architecture\u002Fagents\u002Fopenai.yaml",{"path":69,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":70,"sourceHtmlUrl":71},"HTML-REPORT.md",7889,"https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002FAI-running-coach\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fimprove-codebase-architecture\u002FHTML-REPORT.md",[73,100,124,148,165,182],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":36},"01M71FWKE76AC8TMK2CQ19YAY6","token-decrease","Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says \"caveman mode\", \"talk like caveman\", \"use caveman\", \"less tokens\", \"be brief\", \"token decrease\", or invokes \u002Fcaveman. Also auto-triggers when token efficiency is requested.","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002FAI-running-coach\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Ftoken-decrease\u002FSKILL.md",[],[80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99],"token decrease","token","efficiency","Caveman Mode","communication","lite","ultra","usage","technical","auto","intensity","triggers","accuracy","default","mode","tokens","when","token efficiency","brief","use",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":36},"01M71FWHPQQBZWZ9ZHTV2SED9Y","readme-pm-review","Use only when the user explicitly asks for a product-manager style review of a repository README. Read only the README first, do not infer undocumented features, and provide readability feedback, rewrite suggestions, and product-priority recommendations.","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002FAI-running-coach\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Freadme-pm-review\u002FSKILL.md",[],[107,108,109,110,99,111,112,96,113,114,24,115,116,117,118,119,120,121,122,123],"README","readme pm review","pm","review","first","rewrite","product","only","infer","feedback","do","style","manager","features","repository","read","recommendations",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":36},"01M71FWFE09MTZVFZS2CY8Y939","python-review-qa-loop","Use when working on Python code changes that should follow this repo's shared review and QA loop. Read the shared workflow docs, make the smallest viable patch, run relevant tests, capture results, and route DB, credentials, secrets, or Garmin password related changes through the shared security guidance.","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002FAI-running-coach\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fpython-review-qa-loop\u002FSKILL.md",[],[110,131,132,133,134,135,136,137,138,139,140,96,141,99,142,143,144,145,146,147],"loop","qa","python","python review qa loop","credentials","db","route","code","patch","workflow","password","tests","security guidance","repo","python code","relevant","shared",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":36},"01M71FWCMB41PC4XCKG0HTMEFK","grilling","Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002FAI-running-coach\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fgrilling\u002FSKILL.md",[],[150,155,31,156,157,158,159,160,161,162,96,99,163,164],"about","plan","thinking","test","trigger","idea","user","stress","stress-test","decision",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":169,"categories":170,"keywords":171,"publishedAt":36},"01M71FWBE9N70PWAY8HF7RR4HY","grill-with-docs","A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002FAI-running-coach\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fgrill-with-docs\u002FSKILL.md",[],[31,172,173,174,175,176,177,178,179,25,156,180,27,181],"with","docs","grill with docs","which","sharpen","glossary","go","design","adr","interview",{"skillNo":183,"name":184,"nameZh":6,"description":185,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":188,"publishedAt":36},"01M71FWAJCWSX1NFJZN2M93K39","grill-me","A relentless interview to sharpen a plan or design.","https:\u002F\u002Fgithub.com\u002FAndy-CH-BO-AN\u002FAI-running-coach\u002Fblob\u002Fmain\u002Fai\u002Fskills\u002Fgrill-me\u002FSKILL.md",[],[31,189,190,176,156,179,25,181],"grill me","me"]