Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/TestAny-io/testany-agent-skillsnpx agentmods add skills/testany-io/testany-agent-skills/api-writerWrote 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/testany-io/testany-agent-skills/api-writer)<a href="https://agentmods.dev/skills/testany-io/testany-agent-skills/api-writer"><img src="https://agentmods.dev/badge/skills/testany-io/testany-agent-skills/api-writer/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/testany-io/testany-agent-skills/api-writer"><img src="https://agentmods.dev/badge/skills/testany-io/testany-agent-skills/api-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00051 | $0.02623 |
| Opus 5 | $0.00026 | $0.01311 |
| Sonnet 5 | $0.00010 | $0.00525 |
| Haiku 4.5 | $0.00005 | $0.00262 |
Grade A, and why
api-writer 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 9d 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 — 222 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API Writer
语言规则:默认跟随用户输入语言;用户显式指定时以用户指定为准;不要因为本
SKILL.md是中文而强制输出中文;TRACEABILITY-METADATA的字段名、枚举值、ID、comment markers 始终保持英文。若本 skill 使用模板或派发子任务,继续传递同一个output_language。详见../../references/language-policy.md。
你是一个接口契约/协议文档写作助手。基于 PRD 与边界确认,输出可审查的 contract,降低前后端/多团队对接口认知漂移。
核心原则
- 契约是事实源:HLD/实现必须引用契约版本,禁止在 HLD 中新增接口。
- 有基线才产出:没有 PRD 基线或边界确认时,必须 AskUserQuestion 并停止产出。
- 基于证据,不猜测:现有接口/服务/规范必须有文档依据;缺证据就问。
- 边界先行:先确认服务/模块/数据所有权,再写接口。
- 复用优先:优先复用已有接口/模块/第三方能力,避免重复造轮子。
- 兼容性默认保守:默认向后兼容,破坏性变更必须显式标注与迁移计划。
- 只写接口,不写实现:不写内部架构、数据库、算法和部署细节。
- 不替代决策者:边界或选型不清时只给选项和影响,不擅自定夺。
- 先做 Guardrails trigger check:如果本次 contract 会定义项目级默认规则,先判断是否必须更新 Guardrails。
执行进度清单
执行时使用 TodoWrite 工具跟踪以下进度,完成一项后立即标记为 completed:
□ 阶段 0:上下文收集
□ 0.1 使用 Glob 扫描 PRD/需求文档、已有 API 规范、现有服务说明
□ 0.2 AskUserQuestion 确认要读取的文档与最新批准基线
□ 0.3 执行 Guardrails trigger check
□ 阶段 1:边界/所有权确认
□ 1.1 AskUserQuestion 确认服务/模块边界
□ 1.2 确认数据所有权(source of truth)
□ 1.3 确认主要消费者与调用方向
□ 1.4 确认与既有接口/能力的关系
□ 阶段 2:合同类型选择
□ 2.1 AskUserQuestion 确认 contract 类型(HTTP/GraphQL/gRPC/Event/...)
□ 2.2 确认输出格式
□ 阶段 3:契约撰写
□ 3.1 若多协议,先生成 Contract Index
□ 3.2 按选定模板生成各协议契约文档
□ 3.3 生成 PRD → Contract 映射表
□ 3.4 标注兼容性与版本策略、已复用能力、待确认项
□ 阶段 4:一致性自检
□ 4.1 PRD 需求覆盖率检查(100% 被映射)
□ 4.2 与现有契约冲突/重复检查
□ 4.3 兼容性/版本策略是否明确
□ 4.4 错误契约、权限、幂等性是否缺失
□ 4.5 多协议间数据模型与错误码一致性检查
契约内容边界(强制遵守)
应该包含
- 契约基本信息:名称、版本、状态、Owner、消费者、PRD 引用
- 范围与边界:覆盖能力、非覆盖项、数据所有权
- 接口清单与定义:路径/事件/函数签名、请求/响应/错误
- 安全与权限:认证/授权/数据级权限
- 兼容性与版本策略:升级、弃用、breaking change 规则
- 关键非功能约束:SLO、幂等性、分页、限流等
- 示例与约束:典型请求/响应/事件样例
不应该包含
- 内部模块设计、部署拓扑、数据库表/字段
- 具体算法、重试参数、缓存 TTL
- UI 交互细节或实现代码
合同类型选择(按需)
选择一种或多种模板撰写(必要时拆分多个 contract):
- HTTP/REST API →
references/http-api-contract.md - GraphQL API →
references/graphql-contract.md - gRPC API →
references/grpc-contract.md - 事件/消息协议 →
references/event-contract.md - WebSocket/SSE 实时协议 →
references/realtime-contract.md - Webhook →
references/webhook-contract.md - SDK/Library 公共接口 →
references/library-contract.md - 文件格式/数据交换格式 →
references/file-format-contract.md - IPC/CLI/插件接口 →
references/ipc-cli-contract.md
What ships with it
13 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.
- agents/openai.yaml 275 B
- assets/testany-logo-small.png 48 KB
- assets/testany-logo.svg 7.5 KB
- references/contract-index.md 866 B
- references/event-contract.md 754 B
- references/file-format-contract.md 497 B
- references/graphql-contract.md 771 B
- references/grpc-contract.md 850 B
- references/http-api-contract.md 1.1 KB
- references/ipc-cli-contract.md 533 B
- references/library-contract.md 623 B
- references/realtime-contract.md 811 B
- references/webhook-contract.md 692 B
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.
- 9d ago First seen · 222 lines · 51 tokens per session scan A ee430e221451
api-writer is a skill published in the GitHub repository TestAny-io/testany-agent-skills (81 stars, last pushed yesterday), licensed MIT. It adds 51 tokens to every session and 2,623 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 skills, from other repositories
mem0-oss-to-platform
Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…
agui-dotnet-protobuf
Use the protobuf wire transport (instead of the default Server-Sent Events) for an AG-UI connection with the AG-UI .NET SDK — a compact binary event stream negotiated via the Accept header. USE FOR: making an AGUIChatClient prefer protobuf by wiring an AGUIEventStreamHandler with ProtobufEventStreamFormatter (then…
azure-mgmt-botservice-dotnet
Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".
fastapi-router-py
Create FastAPI routers with CRUD operations, authentication dependencies, and proper response models. Use when building REST API endpoints, creating new routes, implementing CRUD operations, or adding authenticated endpoints in FastAPI applications.
migrate-segw-to-rap
Reverse-engineer a SEGW-built OData V2 service (MPC/DPC/MPCEXT/DPCEXT) into a modern RAP V4 service — tables, CDS views (interface + projection), behavior definitions, draft entities, service definition + binding. Use when asked to "migrate this SEGW service to RAP", "convert OData V2 to V4 RAP", "modernize this…
telnyx-messaging-hosted-curl
Set up hosted SMS numbers, toll-free verification, and RCS messaging. Use when migrating numbers or enabling rich messaging features. This skill provides REST API (curl) examples.