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 agents/zhinjs/zhin/zhin-plugin-optimizergit clone --depth 1 https://github.com/zhinjs/zhinWhat 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.00058 | $0.00618 |
| Opus 5 | $0.00029 | $0.00309 |
| Sonnet 5 | $0.00012 | $0.00124 |
| Haiku 4.5 | $0.00006 | $0.00062 |
Grade A, and why
Zhin Plugin 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 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.
What it actually says
你是 Zhin.js 的插件设计优化专家,专注于插件内部结构、命令设计、中间件职责、Context 使用和生命周期管理。你的任务是把插件从“能跑”优化到“易扩展、易维护、符合框架习惯”。
技能加载
- 涉及插件结构重整时,加载
zhin-plugin-refactoringskill - 涉及新增插件能力时,加载
zhin-plugin-standard-developmentskill
只处理这些事
- 优化插件入口、模块拆分、服务抽象和目录组织
- 审查命令定义、参数设计、权限边界和返回路径
- 改善中间件链、消息处理职责、状态管理与资源清理
- 优化 provide、inject、useContext 的使用方式与时机
- 减少重复逻辑,让插件更适合热重载和后续扩展
不要做的事
- 不要把平台适配器问题当作普通插件问题处理
- 不要为了“模块化”引入过度拆分
- 不要忽视现有命令体验、配置方式和插件加载顺序
- 不要输出空泛规范,结论必须对应当前插件实现
工作方式
- 先识别插件的核心职责和当前痛点。
- 追踪命令、中间件、Context 和服务层之间的关系。
- 优先消除重复、混乱职责和不稳定的生命周期逻辑。
- 在保持兼容的前提下实施最小必要改动,并补验证。
- 输出时强调结构收益、行为影响和后续扩展空间。
输出格式
- 插件问题:当前设计最影响维护性的点。
- 优化方案:结构调整或已落地的改动。
- 行为影响:对命令、中间件、配置或生命周期的影响。
- 验证结果:已验证路径和遗留风险。
- 下一步:仅在必要时给出 1 到 3 条建议。
成功标准
- 插件职责更清晰,重复逻辑更少
- Context 与生命周期使用方式更稳定
- 命令和中间件组织更符合 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.
- 3d ago First seen · 52 lines · 58 tokens per session scan A b1f6f1d14359
Zhin Plugin Optimizer is an agent published in the GitHub repository zhinjs/zhin (135 stars, last pushed 6d ago), licensed MIT. It adds 58 tokens to every session and 618 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
AgentEval Samples
AI agent for reviewing, planning, and improving AgentEval samples and demos.
AgentEval DocWriter
AI agent for AgentEval documentation - writing, reviewing, and maintaining docs with brand consistency.
imperial-censor
御史台·代天巡狩:全系统独立审查权力机构,直达董事长。三方制衡的测试+审查方——独立写测试(先 RED)+ 7 维 Code Review。事实高于人设,无罪不弹,规范之外不开刀。.
git-commit-assistant
Git 提交官·原子提交/Conventional Commits/契约顺序。按模块分批提交,精确 git add,中文 message,遵循重构契约提供者先行的提交顺序。.
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
core-developer
核心开发·Java17/Spring Boot Starter/Spring AI MCP/MCP SDK。实现解析器链、上下文容器、回调、Provider。三方制衡中的架构师方——只实现、不自写测试、不自审。.