api-writer

api-writer is a command for Claude Code from TestAny-io/testany-agent-skills. It costs 12 tokens per session (397 once invoked), scanned A, original, MIT.

A command that turns a product requirements document into a reviewable description of how a software interface should work. An interface is the agreed way that programs or services exchange requests and data.

In plain words
What is it for?
Use it to draft HTTP/REST, GraphQL, gRPC, event, WebSocket, webhook, SDK, file-format, command-line, or plugin contracts from a PRD.
Why use it?
It helps teams agree on requests, responses, errors, security, compatibility, and operational limits before implementation begins.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the testany-eng plugin — 16 skills, 21 commands shipped together

Install

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.

agentmods
npx agentmods add commands/testany-io/testany-agent-skills/api-writer
Clone the repo
git clone --depth 1 https://github.com/TestAny-io/testany-agent-skills

Made for: Claude Code.

Or install testany-eng, the plugin that ships this one along with the rest of its 16 skills, 21 commands.

Wrote 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.

agentmods badge for api-writer

README.md
[![agentmods](https://agentmods.dev/badge/commands/testany-io/testany-agent-skills/api-writer.svg)](https://agentmods.dev/commands/testany-io/testany-agent-skills/api-writer)
Your own site
<a href="https://agentmods.dev/commands/testany-io/testany-agent-skills/api-writer"><img src="https://agentmods.dev/badge/commands/testany-io/testany-agent-skills/api-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 397 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00012 $0.00397
Opus 5 $0.00006 $0.00198
Sonnet 5 $0.00002 $0.00079
Haiku 4.5 $0.00001 $0.00040

Measured 6d ago against content hash 3e5b68800438, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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 6d 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.

plugins/testany-eng/commands/api-writer.md · 44 lines

What it actually says

API Writer

启动 API 契约撰写流程。基于 PRD 与边界确认,输出可审查的接口契约文档。

使用方式

提供 PRD 文件路径:

$ARGUMENTS

支持的契约类型

  1. HTTP/REST API - OpenAPI 规范
  2. GraphQL API - GraphQL Schema
  3. gRPC API - Protocol Buffers
  4. 事件/消息协议 - AsyncAPI 规范
  5. WebSocket/SSE - 实时协议
  6. Webhook - 回调接口
  7. SDK/Library - 公共接口
  8. 文件格式 - 数据交换格式
  9. IPC/CLI/插件 - 进程间/命令行接口

契约聚焦内容

  • 接口清单:路径/事件/函数签名、请求/响应/错误
  • 安全与权限:认证/授权/数据级权限
  • 兼容性策略:版本、弃用、breaking change
  • 非功能约束:SLO、幂等性、分页、限流

工作流程

  1. 上下文收集:读取 PRD,扫描现有 API/规范
  2. 边界确认:服务/模块边界、数据所有权
  3. 类型选择:选择契约类型
  4. 契约撰写:生成契约 + PRD 映射表
  5. 一致性自检:覆盖率、冲突、兼容性检查

请提供 PRD 文件路径开始撰写。

Changes

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.

  1. 6d ago First seen · 44 lines · 12 tokens per session scan A 3e5b68800438

Subscribe to this mod's changes

api-writer is a command published in the GitHub repository TestAny-io/testany-agent-skills (80 stars, last pushed 9d ago), licensed MIT. It adds 12 tokens to every session and 397 once invoked, about $0.0001 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.

Related

Other commands, from other repositories

init

Initialize configurations for Supabase local development.

fcakyon/claude-codex-settings · 0 tokens

http-service

Build, review or debug a Bun HTTP service. Loads the http-service skill, then works the task through its workflow.

MadAppGang/magus · 27 tokens

start-10-1

Command "start-10-1" from minicoohei/ai-agent-camp, covering 🎓 lesson 10-1: clasp基本・gasプロジェクト管理, 📍 このセッションでやること, 🎯 準備チェック, 🚀 step 1: claspのインストールと apps script api の確認 and 🚀 step 2: google認証.

minicoohei/ai-agent-camp · 2 tokens

api-contract-review

Review an API contract (endpoints, request/response shapes, error codes, auth model) BEFORE implementation for naming consistency, versioning, pagination, idempotency, and alignment with existing endpoints. Distinct from review-hard (post-implementation risk) and repo-consistency-sweep (pattern matching on written…

Mozurok/fhorja.dev · 100 tokens

build

Discover an AI Gateway's models and MCP tools, retrieve a credential, and integrate them into your app — call a model, connect MCP tools, or scaffold a runnable agent.

Azure/ai-gateway · 35 tokens

fastapi

FastAPI application design and implementation conventions. Use this skill when building, updating, or reviewing FastAPI services, routers, dependencies, request/response schemas, streaming endpoints, or API tests. Trigger on FastAPI-specific work such as path operation design, dependency injection, response models…

mfmezger/ai_agent_dotfiles · 84 tokens