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.00065 | $0.03066 |
| Opus 5.5 | $0.00026 | $0.01226 |
| Sonnet 5.5 | $0.00013 | $0.00613 |
| Haiku 4.5 | $0.00006 | $0.00307 |
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 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.
How it starts
The opening of the file, as written. The whole thing — 235 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,降低前后端/多团队对接口认知漂移。
先选工作模式
formal_design:用户要求完整新功能文档或正式全量准出,执行下文完整流程、模板、追溯和适用门禁。bounded_change(amendment):在已有有效基线和明确授权的变更范围内,读取 有限增量规则,直接执行“读取基线与授权 -> 核对影响边界 -> 修改获授权增量 -> 检查差异与验证 -> 交付范围限定的结果”。不回补全套历史文档,不把草稿或自检升级为批准。- 模式由实际职责、信任、契约、失败语义与批准范围决定,不按行数/文件数判断。“两行修改”改变权限边界仍需对应有权 Owner 决策。
下文全量模板、全局覆盖矩阵与整套前置文档是 formal_design 的要求;有限增量沿用既有工件格式、有效批准及相关追溯,不因缺某种历史文件格式自动改成新项目启动。
核心原则
- 契约是事实源:HLD/实现必须引用契约版本,禁止在 HLD 中新增接口。
- 有依据才定案:正式设计需相关批准需求;有限增量可用既有契约及有权 Owner 的具体决定。不要求同一种 PRD 文件格式,但真实行为或批准依据缺失时不自行定案。
- 基于证据,不猜测:现有接口/服务/规范必须有文档依据;缺证据就问。
- 边界先行:先确认服务/模块/数据所有权,再写接口。
- 复用优先:优先复用已有接口/模块/第三方能力,避免重复造轮子。
- 兼容性默认保守:默认向后兼容,破坏性变更必须显式标注与迁移计划。
- 只写接口,不写实现:不写内部架构、数据库、算法和部署细节。
- 不替代决策者:边界或选型不清时只给选项和影响,不擅自定夺。
- 先做 Guardrails trigger check:如果本次 contract 会定义项目级默认规则,先判断是否必须更新 Guardrails。
执行进度清单
按任务需要跟踪以下进度;使用可用计划工具或简短清单,标记真实完成状态:
□ 阶段 0:上下文收集
□ 0.1 使用 Glob 扫描 PRD/需求文档、已有 API 规范、现有服务说明
□ 0.2 读取并核验最新批准基线,仅询问剩余缺口
□ 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、幂等性、分页、限流等
- 示例与约束:典型请求/响应/事件样例
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.
- 1mo ago Changed · +13 lines · +14 tokens per session 9284d5f811e2
- 1mo 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 (82 stars, last pushed yesterday), licensed MIT. It adds 65 tokens to every session and 3,066 once invoked, about $0.0003 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 skills, from other repositories
skd-edit
A focused editor for 1C data composition schemas, the report definitions that describe queries, fields, filters, totals, and parameters. It changes an existing Template.xml file through specific operations.
epf-bsp-add-command
A command for adding a user-facing command to a 1C external processing's BSP description. BSP is a standard 1C library used to connect add-ons to business applications.
xdto-compile
An XML-schema compiler for 1C:Enterprise. It turns an XSD file, which describes the structure of XML data, into an XDTO package for use in 1C integrations and web services.
skd-info
A structure reader for 1C data composition schemas, the report definitions that contain queries, fields, parameters, and display variants. It gives a compact summary instead of requiring you to read the raw XML.
xdto-edit
A focused editor for changing individual types or properties in an existing XDTO package used by 1C:Enterprise. XDTO packages describe data structures exchanged between systems.
xdto-info
A structure-inspection tool for XDTO packages in 1C:Enterprise. It shows types, properties, required values, allowed values, and package references in terms that 1C code can use.