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 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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" 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.1 | $0.00057 | $0.01419 |
| Opus 5.5 | $0.00023 | $0.00568 |
| Sonnet 5.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 1mo 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.
- 1mo 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 2mo ago), licensed Apache-2.0. It adds 57 tokens to every session and 1,419 once invoked, about $0.0002 per session on Opus 5.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-pull-request
Use this skill to create or edit a GitHub pull request with the repository template or the default structure.
hashiiiii-explain-pr
Use when a user asks to understand or explain a pull request's purpose, diff, or relationship to an issue.
review
Uses a fresh agent to review an implementation change without editing it. Checks behavior, security, regressions, complexity, tests, docs, and missing proof. Use for code, PR, diff, security, second-opinion, or pre-merge reviews.
codebase-modernizer
Audit a stale, inherited, or messy codebase — deps, bugs, security, tests, CI, docs, UI/UX — then emit a phased, testable modernization plan. Read-only: plans upgrades, never applies them. Not for single-PR review, PRD-to-tasks, or UX-only audits.
issue-work-loop
Run Herdr loops for one open GitHub issue (resolve→review→fix) or an existing PR (review→lazy fixer) until CLEAN. Don't use for plain resolution without review, review-only/no-fix requests, backlog automation, or merging.
code-reviewer
Review completed implementation batches for spec compliance and code quality. Invoke after execution batches complete, before merging, or when a review gate is reached in the workflow.