AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Api Doc Writer

skill-kilimiaosix-agent-skills-api-doc-writer · by KilimiaoSix

Use when writing or revising product-facing API interface documentation, especially for backend REST APIs that need a concise Chinese contract document with business rules, common API conventions, per-endpoint request/response details, combined request examples, and error code explanations. Trigger when the user asks for 接口文档, API 文档, 接口说明, Feishu/Lark API docs, or to rewrite implementation-heavy…

No reviews yet
0 installs
36 views
0.0% view→install

Install

$ agentstack add skill-kilimiaosix-agent-skills-api-doc-writer

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-kilimiaosix-agent-skills-api-doc-writer)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Api Doc Writer? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

API Doc Writer

Trigger Conditions

Use this skill when the task is to produce or revise an API interface document for product, frontend, QA, or integration readers.

Typical inputs:

  • Existing backend code, controller/service implementation, OpenAPI notes, PRD, design notes, or a finished endpoint.
  • A request to write a Feishu/Lark document, Markdown API document, or interface specification.
  • Feedback that the current document contains too much backend implementation detail or that examples/fields need to be simplified.

Do not use this for implementation plans, backend design docs, code review reports, or internal debugging writeups.

Required Document Structure

Always use this top-level order:

  1. 功能说明
  2. 接口通用说明
  3. 单个接口说明
  4. 错误码说明

For multiple endpoints, repeat endpoint subsections under "3. 单个接口说明"; do not create a separate top-level section per endpoint.

Workflow

  1. Collect the public contract.
  • Identify endpoint name, method, public path, base URL or environment URL, auth requirement, request headers, query/body parameters, response wrapper, data fields, and error codes.
  • If code is available, verify field names and response shape from DTO/controller/tests, not from guesses.
  • Separate public behavior from backend implementation details.
  1. Write "1. 功能说明".
  • Start with a one-paragraph purpose statement.
  • Add "业务规则" as a table.
  • Include only rules that affect client behavior, display, validation, permission, limits, fallback, or user-visible semantics.
  1. Write "2. 接口通用说明".
  • Include protocol, default base URL if known, request/response format, authentication method, response wrapper, unit conventions, pagination conventions, and common headers.
  • Keep environment-specific values clearly marked as examples or default test values.
  1. Write "3. 单个接口说明".
  • For each endpoint include:
  • Basic info table: interface name, method, path, full example URL, login requirement.
  • Request parameters split by Header, Query, Path, and Body. Write "无" for absent parameter groups.
  • Response field table for data fields, with type and client-facing meaning.
  • A single "请求示例" subsection that combines curl command and scenario responses.
  1. Write "4. 错误码说明".
  • Provide a table with code, meaning, trigger scenario, and client handling suggestion.
  • Include auth errors, validation errors, permission errors, and service errors only when they can occur for this API.
  • If the API falls back and still returns success, describe that behavior in business rules instead of inventing an error code.
  1. Final pass.
  • Remove implementation file paths, class names, service names, Feign/client names, database table plans, test commands, build output, and backend verification notes unless the user explicitly asks for an engineering appendix.
  • Verify examples contain only fields that the API actually returns.
  • Check that no internal-only field, duplicated semantic field, placeholder token, private URL, account, or credential appears in the final document.

Hard Rules

  • The document is an API contract, not an implementation report.
  • Do not include backend file paths, modified file lists, compile commands, unit test commands, deployment notes, or internal call chains in the default output.
  • Do not expose internal-only fields. If a field only explains how the server made a decision and the client does not need it, omit it.
  • Do not duplicate field semantics. If limitBytes already communicates the effective quota, do not also expose fields like member, limitType, or action unless the real API returns them and the client has a use for them.
  • Do not say "temporarily fixed", "not fully launched", or "not yet counted" when the client contract is a display rule. Prefer client-facing wording such as "when this field is -1, the client should not display the detailed value".
  • Do not split examples into separate "成功用例", "失败用例", and "Curl 请求命令" sections. Merge them under one "请求示例" subsection.
  • Do not invent request/response fields, status codes, or error codes. Mark unknowns as "待确认" only if they cannot be discovered.
  • Do not include real access tokens, cookies, private account IDs, customer data, or private URLs. Use placeholders such as {access_token}, {domain}, and {id}.

Output Contract

When returning the document in chat or Markdown, output exactly these sections:

# 

## 1. 功能说明

### 1.1 业务规则

## 2. 接口通用说明

### 2.1 通用响应结构

## 3. 单个接口说明

### 3.1 

#### 3.1.1 基本信息

#### 3.1.2 请求参数

#### 3.1.3 响应字段

#### 3.1.4 请求示例

## 4. 错误码说明

The "请求示例" subsection must include:

  • one curl command;
  • at least one success response;
  • relevant failure responses such as unauthenticated, missing/invalid parameter, permission denied, or service exception when applicable.

Feishu/Lark Notes

When publishing to Feishu/Lark:

  • Preserve the same four-section structure.
  • Use tables for rules, parameters, response fields, and error codes.
  • Use code blocks for curl and JSON examples.
  • After update, fetch or search the remote document to confirm obsolete headings and removed fields are not still present.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.