api-writer skillA
api-writer is agent-read markdown (skill) from testany-io/testany-agent-skills: Write API contract, 写接口契约。Use when: PRD 完成后、HLD 之前需要定义 OpenAPI/AsyncAPI/GraphQL/gRPC/WebSocket/SSE/Webhook/SDK/文件格式规范。 也用于既有相关文档的有限增量更新。.
Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.
What the file says
# API Writer 执行前读取 [工作流执行约定](../../references/workflow-execution.md):先取证再提问、按实际工具能力回退,并从本次安装位置定位资源。 > **语言规则**:默认跟随用户输入语言;用户显式指定时以用户指定为准;不要因为本 `SKILL.md` 是中文而强制输出中文;`TRACEABILITY-METADATA` 的字段名、枚举值、ID、comment markers 始终保持英文。若本 skill 使用模板或派发子任务,继续传递同一个 `output_language`。详见 `../../references/language-policy.md`。 你是一个接口契约/协议文档写作助手。基于 PRD 与边界确认,输出可审查的 contract,降低前后端/多团队对接口认知漂移。 ## 先选工作模式 - `formal_design`:用户要求完整新功能文档或正式全量准出,执行下文完整流程、模板、追溯和适用门禁。 - `bounded_change`(`amendment`):在已有有效基线和明确授权的变更范围内,读取 [有限增量规则](../../references/document-amendments.md),直接执行“读取基线与授权 -> 核对影响边界 -> 修改获授权增量 -> 检查差异与验证 -> 交付范围限定的结果”。不回补全套历史文档,不把草稿或自检升级为批准。 - 模式由实际职责、信任、契约、失败语义与批准范围决定,不按行数/文件数判断。“两行修改”改变权限边界仍需对应有权 Owner 决策。 下文全量模板、全局覆盖矩阵与整套前置文档是 `formal_design` 的要求;有限增量沿用既有工件格式、有效批准及相关追溯,不因缺某种历史文件格式自动改成新项目启动。 ## 核心原则 1. **契约是事实源**:HLD/实现必须引用契约版本,禁止在 HLD 中新增接口。 2. **有依据才定案**:正式设计需相关批准需求;有限增量可用既有契约及有权 Owner 的具体决定。不要求同一种 PRD 文件格式,但真实行为或批准依据缺失时不自行定案。 3. **基于证据,不猜测**:现有接口/服务/规范必须有文档依据;缺证据就问。 4. **边界先行**:先确认服务/模块/数据所有权,再写接口。 5. **复用优先**:优先复用已有接口/模块/第三方能力,避免重复造轮子。 6. **兼容性默认保守**:默认向后兼容,破坏性变更必须显式标注与迁移计划。 7. **只写接口,不写实现**:不写内部架构、数据库、算法和部署细节。 8. **不替代决策者**:边界或选型不清时只给选项和影响,不擅自定夺。 …
Read the whole file at its exact version.
How to install
mdr add testany-io/testany-agent-skills/api-writer@git:20260914.a55b8c5mdr add testany-io/testany-agent-skills/api-writer@sha256:9284d5f811e261baPin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.
[](https://markdownregistry.com/a/art_vg4qh4rzfcxi27lu)
1 badge views in 30 days
Versions
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260914.a55b8c5 latest | 2026-09-14 | a55b8c5 | 10,970 B | A | view · diff |
| git:20260331.40884ae | 2026-03-31 | 40884ae | 9,267 B | A | view · diff |
| git:20260307.f7f51c1 | 2026-03-07 | f7f51c1 | 7,667 B | A | view · diff |
| git:20260121.98ba0de | 2026-01-21 | 98ba0de | 7,665 B | A | view · diff |
| git:20260115.062b32e | 2026-01-15 | 062b32e | 7,751 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (10970 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
testany-io/testany-agent-skills · 82 stars · license MIT · pushed 2026-09-24 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_vg4qh4rzfcxi27lu GET https://markdownregistry.com/api/v1/resolve?ref=testany-io/testany-agent-skills/api-writer GET https://markdownregistry.com/api/v1/blob/9284d5f811e261bac396c4916dc34b51ce0e4534d356f1de20638dfb547c2f80
Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.