Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/yugasun/aiops/improve-codebase-architecturenpx skills add yugasun/aiops --skill improve-codebase-architecturegit clone --depth 1 https://github.com/yugasun/aiopsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/yugasun/aiops/improve-codebase-architecture)<a href="https://agentmods.dev/skills/yugasun/aiops/improve-codebase-architecture"><img src="https://agentmods.dev/badge/skills/yugasun/aiops/improve-codebase-architecture.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00057 | $0.01419 |
| Opus 5 | $0.00028 | $0.00709 |
| Sonnet 5 | $0.00011 | $0.00284 |
| Haiku 4.5 | $0.00006 | $0.00142 |
Grade A, and why
improve-codebase-architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Improve Codebase Architecture
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 design-vocabulary.md — use those terms exactly in every suggestion.
The domain language in CONTEXT.md gives names to good seams; ADRs in docs/adr/ record decisions this command should not re-litigate.
Process
1. Graph check (optional)
architecture_health flows run a graph_build phase first (phases.py). If you arrive here without a graph, check for graphify-out/graph.json:
- If
graphify-out/graph.jsonexists, tell the user: "代码图谱已就绪(N 个模块),将基于图谱做增强分析。" Then query/code-graph query god-nodesand/code-graph query communitiesto get the global view. Query specific modules as needed via/code-graph query. - If no graph exists, tell the user: "未检测到代码图谱,使用有机探索模式。如需更精确的分析,可先运行
/code-graph build(需要先安装 graphify)。" Then fall back to organic exploration.
2. Multi-modal sweep
Run 6 perspective agents in parallel using the Agent tool. Each agent queries the code graph from a different angle. See sweep-patterns.md for agent prompt templates.
Structure agent — Identify shallow modules (god-nodes where interface ≈ implementation)
Data-flow agent — Trace cross-module data flow and seam leakage
Change agent — Identify friction from hotspots: high-coupling + high-churn modules
Test agent — Map untested critical seams (high in-degree, zero test coverage)
Security agent — Identify trust boundary violations and auth/business logic mixing
Performance agent — Structural performance risks: broad-state queries, missing cache seams, deep sync chains
3. Cross-validate
Spawn a synthesis agent that receives all 6 perspectives:
- De-duplicate findings (same module flagged by multiple agents = higher confidence)
- Rank by convergence: findings confirmed by 2+ agents rank highest
- Apply the deletion test to the top findings
- Produce a final candidate list (5-10 items)
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 90 lines · 57 tokens per session scan A 13e02cd122c8
improve-codebase-architecture is a skill published in the GitHub repository yugasun/aiops (4 stars, last pushed 15d ago), licensed Apache-2.0. It adds 57 tokens to every session and 1,419 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
hashiiiii-images
Use this skill to create project images, especially flat geometric images with a dark background and one accent color.
hashiiiii-pull-request
Use this skill to create or edit a GitHub pull request with the repository template or the default structure.
hashiiiii-issues
Use this skill to create or edit GitHub issues with a consistent body structure.
hashiiiii-git
Use this skill to name a Git branch or write a commit message.
hashiiiii-locale
Use this skill to set or change locale preferences for a user, project, or local Git worktree.
make_plan
For external plan request scenarios, guides the Agent to request a clear, actionable, step-by-step plan from a stronger Agent via listagents and chatwithagent, emphasizing that the plan is executed by the requester, not by the consulted Agent.