[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C8WH1TJKXPBE01XNZWM03A":3,"skill-same:01M7C8WH1TJKXPBE01XNZWM03A":57},{"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":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":46},"01M7C8WH1TJKXPBE01XNZWM03A","improve-codebase-architecture",null,"Find opportunities for deeper modules and explore the user’s selected candidate. Use when explicitly invoked for architecture exploration.","transitive-bullshit\u002Fskills","transitive-bullshit","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F552829?v=4","01M7C8KS4F4572TZFKR12N2A3W","Travis Fischer","01M7C8KS56YA2KDQHDNXEGS23P",4,"MIT","https:\u002F\u002Fgithub.com\u002Ftransitive-bullshit\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: improve-codebase-architecture\ndescription: \"Find opportunities for deeper modules and explore the user’s selected candidate. Use when explicitly invoked for architecture exploration.\"\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 [codebase-design](..\u002Fcodebase-design\u002FSKILL.md) for deep-module concepts and principles. Preserve the project’s domain vocabulary and explain architecture in the terms that make the candidate clearest.\n- The project’s glossary (`GLOSSARY.md`, `CONTEXT.md`, or its documented equivalent) gives names to useful seams. Existing ADRs record decisions this workflow should not re-litigate.\n\nFor exploration, present candidates and let the user select a direction. If the user already selected a candidate or requested implementation, proceed within that scope; the exploration workflow does not add another approval round. Keep an audit read-only unless changes were requested.\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 existing domain glossary and relevant ADRs before proposing changes.\n\nInspect the selected scope directly, or delegate independent areas when parallel review helps and the host supports it. Look for concrete 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** 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\nUse the project’s established domain names and the concepts from `codebase-design`. Translate the architecture terminology to existing component, service, or API names where clearer.\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\nWhen the request is to choose among candidates, stop at the report and ask which direction to explore. When a candidate is already selected, continue to its interface design or authorized implementation.\n\n### 3. Grilling loop\n\nWhen an interview is requested or unresolved product decisions require one, use [grilling](..\u002Fgrilling\u002FSKILL.md) to discuss constraints, dependencies, interface shape, and behavior coverage. Reuse settled decisions and continue authorized implementation without repeating an interview.\n\nWhen documenting the domain is within the requested scope, use [domain-modeling](..\u002Fdomain-modeling\u002FSKILL.md) to record resolved decisions in the existing glossary:\n\n- **Naming a deepened module after a concept not in the project glossary?** Add the term to the project glossary. Create the file lazily if it doesn't exist.\n- **Sharpening a fuzzy term during the conversation?** Update the project glossary 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?** Read [Design It Twice](..\u002Fcodebase-design\u002FDESIGN-IT-TWICE.md) and compare meaningfully different interfaces.\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 [codebase-design](..\u002Fcodebase-design\u002FSKILL.md) for deep-module concepts and principles. Preserve the project’s domain vocabulary and explain architecture in the terms that make the candidate clearest.\n- The project’s glossary (`GLOSSARY.md`, `CONTEXT.md`, or its documented equivalent) gives names to useful seams. Existing ADRs record decisions this workflow should not re-litigate.\n\nFor exploration, present candidates and let the user select a direction. If the user already selected a candidate or requested implementation, proceed within that scope; the exploration workflow does not add another approval round. Keep an audit read-only unless changes were requested.\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 existing domain glossary and relevant ADRs before proposing changes.\n\nInspect the selected scope directly, or delegate independent areas when parallel review helps and the host supports it. Look for concrete 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** 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\nUse the project’s established domain names and the concepts from `codebase-design`. Translate the architecture terminology to existing component, service, or API names where clearer.\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\nWhen the request is to choose among candidates, stop at the report and ask which direction to explore. When a candidate is already selected, continue to its interface design or authorized implementation.\n\n### 3. Grilling loop\n\nWhen an interview is requested or unresolved product decisions require one, use [grilling](..\u002Fgrilling\u002FSKILL.md) to discuss constraints, dependencies, interface shape, and behavior coverage. Reuse settled decisions and continue authorized implementation without repeating an interview.\n\nWhen documenting the domain is within the requested scope, use [domain-modeling](..\u002Fdomain-modeling\u002FSKILL.md) to record resolved decisions in the existing glossary:\n\n- **Naming a deepened module after a concept not in the project glossary?** Add the term to the project glossary. Create the file lazily if it doesn't exist.\n- **Sharpening a fuzzy term during the conversation?** Update the project glossary 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?** Read [Design It Twice](..\u002Fcodebase-design\u002FDESIGN-IT-TWICE.md) and compare meaningfully different interfaces.\n",{"name":5,"description":7,"disable-model-invocation":24},true,"main","fc9ff73613f4346442defd1318eae264af415d72","skills\u002Fimprove-codebase-architecture",1,"https:\u002F\u002Fgithub.com\u002Ftransitive-bullshit\u002Fskills","https:\u002F\u002Fgithub.com\u002Ftransitive-bullshit","https:\u002F\u002Ftransitivebullsh.it","My heart is open source 💕 ","2026-10-24 01:38:48",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":24},[36,39,42],{"tool":37,"command":38},"npx","npx skills add transitive-bullshit\u002Fskills --skill improve-codebase-architecture",{"tool":40,"command":41},"bunx","bunx skills add transitive-bullshit\u002Fskills --skill improve-codebase-architecture",{"tool":43,"command":44},"pnpm","pnpm dlx skills add transitive-bullshit\u002Fskills --skill improve-codebase-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftransitive-bullshit\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[47,53],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"agents\u002Fopenai.yaml","REFERENCE","参考文档",166,"https:\u002F\u002Fgithub.com\u002Ftransitive-bullshit\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fimprove-codebase-architecture\u002Fagents\u002Fopenai.yaml",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"HTML-REPORT.md",6577,"https:\u002F\u002Fgithub.com\u002Ftransitive-bullshit\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fimprove-codebase-architecture\u002FHTML-REPORT.md",[58,65,72,80,87,94],{"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},"01M7C8Z0JQ0VH6YYSJQGXJKVV4","xurl","Paid X API fallback through xurl after cheaper X reads fail, or for authorized account actions unsupported by bird.","https:\u002F\u002Fgithub.com\u002Ftransitive-bullshit\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fxurl\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},"01M7C8YY74K2MJYK311R1PG31A","x-data","Read or research X\u002FTwitter posts, URLs, profiles, threads, or the user's X history using the cheapest available source.","https:\u002F\u002Fgithub.com\u002Ftransitive-bullshit\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fx-data\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":76,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7C8YV6AAFSCTS39C2MBKTTV","write-skills","Create or revise agent skills. Use when adding a new skill file, renaming a skill, simplifying an existing skill, improving trigger descriptions, or deciding what belongs in a skill versus references, scripts, assets, or ordinary docs.","https:\u002F\u002Fgithub.com\u002Ftransitive-bullshit\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwrite-skills\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftransitive-bullshit\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwrite-skills\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7C8YQFGTFVQQJCH8SPFS3YQ","web-perf","Audit, diagnose, or optimize website loading and interaction performance, Core Web Vitals, and Lighthouse performance scores.","https:\u002F\u002Fgithub.com\u002Ftransitive-bullshit\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fweb-perf\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7C8YJ6QFV6QFCJESHGZZ2B8","vercel-react-best-practices","Apply React and Next.js performance guidance. Use for performance work or a specific rendering, data-fetching, or bundle concern.","https:\u002F\u002Fgithub.com\u002Ftransitive-bullshit\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-react-best-practices\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7C8YBRVCMAZ99D1Y5QXHMG8","vercel-optimize","Audit deployed Vercel cost and performance using project metrics. Use for expensive or slow routes, usage analysis, and caching opportunities.","https:\u002F\u002Fgithub.com\u002Ftransitive-bullshit\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-optimize\u002FSKILL.md",[],[]]