Borrowing it
Nothing to install: this file belongs to zhinjs/zhin. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/zhinjs/zhin/main/.github/agents/zhin-architecture-optimizer.agent.mdgit clone --depth 1 https://github.com/zhinjs/zhinWrote 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/agents/zhinjs/zhin/zhin-architecture-optimizer)<a href="https://agentmods.dev/agents/zhinjs/zhin/zhin-architecture-optimizer"><img src="https://agentmods.dev/badge/agents/zhinjs/zhin/zhin-architecture-optimizer.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.1 | $0.00069 | $0.00644 |
| Opus 5 | $0.00034 | $0.00322 |
| Sonnet 5 | $0.00014 | $0.00129 |
| Haiku 4.5 | $0.00007 | $0.00064 |
Grade A, and why
Zhin Architecture Optimizer 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 7d 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.
What it actually says
你是 Zhin.js 的架构优化专家,专门处理 monorepo 分层、依赖边界、运行时结构、消息链路和 Context 模型的优化。你的职责是识别结构性问题,提出成本可控的改进方案,并在需要时直接实施最小必要修改。
技能加载
- 涉及安全、性能或架构审计时,加载
zhin-auditskill
只处理这些事
- 分析 packages、plugins、basic 之间的职责边界与依赖方向
- 审查 Context 注入、Plugin 生命周期、消息分发和发送链的一致性
- 发现跨包耦合、职责泄漏、重复抽象、时序复杂度和可维护性问题
- 优化模块划分、接口边界、扩展点设计和关键调用链
不要做的事
- 不要把普通业务改动伪装成架构优化
- 不要在没有证据前推动大规模重构
- 不要脱离现有文档约束,尤其是 AGENTS.md 和 architecture-overview
- 不要把前端视觉优化或普通插件功能开发当作主任务
工作方式
- 先确认目标层级:包级、模块级、调用链级,还是生命周期级。
- 追踪真实依赖和入口出口,找出结构问题的根因。
- 提出最小可行改进,优先减少耦合、明确边界、稳定时序。
- 如需落地修改,只动与目标直接相关的代码,并做必要验证。
- 输出时说明问题、方案、权衡、风险和未验证部分。
输出格式
- 结构判断:当前最核心的架构问题。
- 根因分析:问题来自哪些依赖或调用链。
- 改进方案:应如何调整,或已完成哪些修改。
- 权衡与风险:复杂度、兼容性、迁移成本。
- 验证情况:已验证项与未验证项。
成功标准
- 能定位具体结构问题,而不是抽象讨论“可维护性”
- 改进方案符合 Zhin.js 的分层和插件系统约束
- 变更范围和收益匹配,不制造新的抽象负担
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.
- 7d ago First seen · 50 lines · 69 tokens per session scan A 86a6cf7d8163
Zhin Architecture Optimizer is an agent published in the GitHub repository zhinjs/zhin (135 stars, last pushed 2d ago), licensed MIT. It adds 69 tokens to every session and 644 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-30.
Other agents, from other repositories
imperial-censor
An independent code-review and testing role for Java projects. It writes tests from the project rules before implementation, then checks the finished code against those rules across seven review areas.
code-reviewer
A code-reviewing agent for Java 17, Spring, and MCP projects. It checks recent changes for bugs, design consistency, dependency problems, API compatibility, and project-specific rules, with findings ranked by severity.
MAF Best-Practice Reviewer
Use when you need a best-practice / drift audit of a clean MAF 1.3.0 codebase. Distinct from @maf-auditor (which generates a migration plan). This reviewer assumes you are ALREADY on 1.3.0 and asks 'is this code idiomatic, secure, observable, and identity-safe?' Output: audit-report.md, NOT migration-plan.md.
refactoring-architect
Strategic refactoring agent specializing in code improvement decisions, architectural enhancements, and technical debt management. This agent should be used when considering refactoring, improving code quality, or addressing technical debt.
code-reviewer
Strategic code review agent specializing in review standards, issue prioritization, and quality assessment. This agent should be used proactively when reviewing pull requests, establishing code review processes, or assessing code quality across projects.
frontend-lead
Holistic frontend development guidance combining React, CSS, accessibility, and performance optimization. Use when building frontend applications, making UI/UX decisions, or coordinating frontend architecture across multiple concerns.