根据任务的规模和阶段,指导你选择相关技能及其使用顺序,涵盖想法梳理、实现和故障排查,帮助确定下一步以及如何衔接后续工作。
- 选择从想法到实现的步骤
- 确定故障排查的起点
- 规划分多次会话完成的开发
检查代码结构,找出妨碍理解和测试的问题,将改进候选方案整理成带前后对比图的HTML报告。选定方案后,通过对话进一步明确约束、依赖关系和设计决策。
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
improve-codebase-architecture检查代码库,提出改善结构的候选方案,针对难以理解或测试的部分展开分析。核心思路是将复杂处理封装在简洁的使用接口之后。HTML报告展示各方案涉及的文件、问题、解决方案、收益和推荐程度,并用改动前后的图示进行比较。
适合理解一个概念需要在许多小模块间跳转,或现有结构难以测试的情况。它会优先检查用户指定的区域,或变更历史中频繁出现的区域。选定候选方案后,通过对话讨论约束、依赖关系、设计和需要保留的测试。
需要使用codebase-design、grilling和domain-modeling技能。它会参考GLOSSARY.md以及docs/adr/中的设计决策,并可能在讨论中更新术语表。报告保存在操作系统的临时目录中,显示时通过内容分发网络加载Tailwind和Mermaid。
本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。
AI 仅根据 SKILL.md 的内容,从 4 个方面进行了评估。星标数和热度不计入评估。
总分按每项 A=25 分、B=15 分、C=5 分相加。 由 AI(OpenAI Codex)于 2026年10月19日 评估。仅供参考,安装前请同时查看原文。
安装前可以查看交给 AI 代理的指令内容。
Surface architectural friction and propose deepening opportunities: refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.
This command is informed by the project's domain model and built on a shared design vocabulary:
GLOSSARY.md gives names to good seams; ADRs in docs/adr/ record decisions this command should not re-litigate.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:
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.Read the project's domain glossary (GLOSSARY.md) and any ADRs in the area you're touching first.
Then spawn a sub-agent to walk the codebase. Don't follow rigid heuristics; explore organically and note where you experience friction:
Apply 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.
Write 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 /tmp (or %TEMP% on Windows), and write to <tmpdir>/architecture-review-<timestamp>.html so each run gets a fresh file. Open it for the user (xdg-open <path> on Linux, open <path> on macOS, start <path> on Windows) and tell them the absolute path.
The report uses Tailwind via CDN for layout and styling, and Mermaid via CDN for diagrams where a graph/flow/sequence reliably communicates the structure. Mix Mermaid with hand-crafted CSS/SVG visuals: use Mermaid when relationships are graph-shaped (call graphs, dependencies, sequences), and hand-built divs/SVG when you want something more editorial (mass diagrams, cross-sections, collapse animations). Each candidate gets a before/after visualisation. Be visual.
For each candidate, render a card with:
Strong, Worth exploring, Speculative, rendered as a badgeEnd the report with a Top recommendation section: which candidate you'd tackle first and why.
Use GLOSSARY.md vocabulary for the domain, and the /codebase-design vocabulary for the architecture. If GLOSSARY.md defines "Order," talk about "the Order intake module," not "the FooBarHandler," and not "the Order service."
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.
See HTML-REPORT.md for the full HTML scaffold, diagram patterns, and styling guidance.
Do NOT propose interfaces yet. After the file is written, ask the user: "Which of these would you like to explore?"
Once the user picks a candidate, call the Skill tool with "grilling" to walk the decision tree with them: constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.
Side effects happen inline as decisions crystallize; call the Skill tool with "domain-modeling" to keep the domain model current as you go:
GLOSSARY.md? Add the term to GLOSSARY.md. Create the file lazily if it doesn't exist.GLOSSARY.md right there.还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
根据任务的规模和阶段,指导你选择相关技能及其使用顺序,涵盖想法梳理、实现和故障排查,帮助确定下一步以及如何衔接后续工作。
在单次会话中协调承担不同任务的子智能体,推进长期目标。后台工作与用户对话同时进行,并改进共享规范、工作环境和后续任务所需的信息访问条件。
将进行中的对话整理为交接摘要,移除敏感信息,明确后续重点、参考资料和建议技能,再启动新的后台智能体,从当前工作目录继续处理任务。
以指定提交、分支或标签为基准,从开发规范和原始需求两个角度审查代码变更。分别报告规范问题与需求缺漏,便于独立判断两方面的结果。
帮助设计用法精简、内部集中处理复杂逻辑的模块。通过统一术语和判断标准,评估模块是否易用、实现替换位置是否合适,以及是否便于测试。
通过能检测具体症状的测试或脚本,调查难以复现的故障和性能下降。缩小失败条件,验证多个原因假设,完成修复后检查原始复现流程及防止复发的测试。