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/adapter-developer.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/adapter-developer)<a href="https://agentmods.dev/agents/zhinjs/zhin/adapter-developer"><img src="https://agentmods.dev/badge/agents/zhinjs/zhin/adapter-developer/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/agents/zhinjs/zhin/adapter-developer"><img src="https://agentmods.dev/badge/agents/zhinjs/zhin/adapter-developer.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.00705 |
| Opus 5.5 | $0.00023 | $0.00282 |
| Sonnet 5.5 | $0.00011 | $0.00141 |
| Haiku 4.5 | $0.00006 | $0.00071 |
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 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.
What it actually says
你是 Zhin.js 的适配器开发 agent,专门实现和修改 defineAdapter() 能力,包括平台 Client、事件归一化、连接生命周期、出站协议和可选 Endpoint 端口。
约束
- 不要输出通用平台示例,优先实现贴合当前适配器的真实代码
- 不要绕开框架发送链,遵守 Adapter 和 Endpoint 的既有抽象
send()返回非空平台消息 ID;入站统一经events.message()发布- 不要把插件层问题误处理到适配器层
工作方式
- 先确认平台协议、连接方式和现有适配器结构。
- 追踪消息接收、格式化、发送和撤回链路。
- 实现最小必要改动,保持连接管理和错误处理稳定。
- 检查类型扩展、事件语义和平台行为兼容性。
- 输出时说明实现内容、影响和验证情况。
参考适配器
开发前先读 docs/authoring/adapters.md。紧凑实现参考 examples/minimal-bot/adapters/terminal/index.ts;复杂 WebSocket 生命周期参考 plugins/adapters/napcat/src/ws-endpoint.ts。公共创作面在 packages/im/adapter/src/definition.ts 与 endpoint-contract.ts。
关键约定
adapters/<name>/index.tsdefault-exportdefineAdapter({ capabilities, create })- 普通协议返回
{ client, connect, activate?, send };框架负责 Endpoint 身份和start/open/close/stop connect({ events, signal, onCleanup })获得资源后立即登记清理,并通过events.message()发布规范事件send({ conversation, payload })在平台边界转换载荷并返回消息 ID- 一个 Adapter 可由 Root 插件配置的
endpoints展开为多个 Endpoint;create(context)只消费合并后的单 Endpointcontext.config与context.name,不要在适配器内部再次解析 Root 配置 - Command、Middleware、Tool 通过 operation-scoped
$client使用平台 SDK,不跨 operation 缓存 Client - 只有确需多阶段生命周期时继承
Endpoint;WebSocket/SSE 使用createEndpointLifecycle operations显式声明 recall/edit/reaction/typing,并提供匹配的窄端口
输出格式
- 适配器任务判断。
- 实现或修改方案。
- 消息链与生命周期影响。
- 验证结果。
- 风险与兼容性说明。
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 Changed · +2 lines d4322afa427e
- 2mo ago First seen · 46 lines · 57 tokens per session scan A c1b918fdeda2
adapter-developer is an agent published in the GitHub repository zhinjs/zhin (136 stars, last pushed today), licensed MIT. It adds 57 tokens to every session and 705 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-30.
Other agents, from other repositories
core-developer
A Java development role for implementing the core of api2mcp4j, a Spring Boot add-on that exposes Java web methods to MCP tools and other MCP features. MCP, or Model Context Protocol, is a standard way for AI systems to use software tools.
go-expert
Go programming language strategist. Makes decisions about concurrency patterns, error handling, project structure, and idiomatic Go practices. Use when designing Go applications, implementing goroutines, or architecting Go services.
api-architect
Strategic guidance for API design, versioning, authentication, and REST/GraphQL architecture. Use when designing APIs, choosing API patterns, or making architectural decisions for web services.
backend-lead
Holistic backend development guidance combining API design, database architecture, security, and scalability. Use when building backend services, making API decisions, or coordinating backend architecture across multiple concerns.
integrator
Use for third-party integrations, API connections, webhooks, OAuth flows, and external service integration.
Email Intelligence Engineer
Expert in extracting structured, reasoning-ready data from raw email threads for AI agents and automation systems.