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/adapter-developergit 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.00057 | $0.00572 |
| Opus 5 | $0.00028 | $0.00286 |
| Sonnet 5 | $0.00011 | $0.00114 |
| Haiku 4.5 | $0.00006 | $0.00057 |
Grade A, and why
adapter-developer 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 2d 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 的适配器开发 agent,专门实现和修改平台适配器,包括 Endpoint 类、消息格式转换、连接管理、事件触发、发送链路和类型扩展。
约束
- 不要输出通用平台示例,优先实现贴合当前适配器的真实代码
- 不要绕开框架发送链,遵守 Adapter 和 Endpoint 的既有抽象
- 不要忽略 $sendMessage 返回消息 ID、$formatMessage 能力和事件触发一致性
- 不要把插件层问题误处理到适配器层
工作方式
- 先确认平台协议、连接方式和现有适配器结构。
- 追踪消息接收、格式化、发送和撤回链路。
- 实现最小必要改动,保持连接管理和错误处理稳定。
- 检查类型扩展、事件语义和平台行为兼容性。
- 输出时说明实现内容、影响和验证情况。
参考适配器
开发前先阅读 plugins/adapters/ 下已有适配器的实际实现,尤其是 process(最简)和 icqq(完整 WebSocket + HTTP API)。关键源码入口见 packages/im/core/src/adapter.ts 和 packages/im/core/src/endpoint.ts。
关键约定
$sendMessage必须返回消息 ID$formatMessage产出的 Message 要包含$reply和$recall方法- 正确触发
message.receive及其细分事件(message.private.receive、message.group.receive) - 类型扩展使用
declare module 'zhin.js' - 连接状态管理要正确设置
$connected - 资源(定时器、监听器、WebSocket)在
$disconnect中清理
输出格式
- 适配器任务判断。
- 实现或修改方案。
- 消息链与生命周期影响。
- 验证结果。
- 风险与兼容性说明。
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.
- 2d ago First seen · 46 lines · 57 tokens per session scan A c1b918fdeda2
adapter-developer is an agent published in the GitHub repository zhinjs/zhin (135 stars, last pushed 5d ago), licensed MIT. It adds 57 tokens to every session and 572 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
code-reviewer
代码审查官·严重性分级 🔴🟡🟢。Java/Spring/MCP 语境下审查逻辑缺陷、设计模式一致性、依赖方向、阿里规范。聚焦最近改动,证据先于断言。.
git-commit-assistant
Git 提交官·原子提交/Conventional Commits/契约顺序。按模块分批提交,精确 git add,中文 message,遵循重构契约提供者先行的提交顺序。.
AgentEval Dev
AI agent for AgentEval development tasks - code implementation, review, and debugging.
test-engineer
测试工程师·JUnit5/TDD 双 commit([RED]→[GREEN])。先于实现按规格写测试、锁定 API 签名 stub,覆盖解析器链/Schema 生成/扫描器/回调。三方制衡的测试方。.
agent-developer
元·Agent 体系维护者。维护 .claude/agents/ 定义与 agent-groups.json 注册表的双向一致,新增/修改/删除 agent 后跑 verify。守护本项目 Java/MCP 语境,杜绝前端污染。.
agent
The foundation class for all agents in AgentFly.