Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计未展示

ring%3awriting-api-docsring 3awriting API 文档

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

824

周安装

34

GitHub Stars

180

下载量

269
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ring%3awriting-api-docs(ring 3awriting API 文档)
来源仓库:https://github.com/lerianstudio/ring
仓库路径:skills/ring%3Awriting-api-docs
安装命令:
npx skills add https://github.com/lerianstudio/ring --skill ring:writing-api-docs
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/lerianstudio/ring --skill ring:writing-api-docs

简介

用于辅助 API 设计和接口文档编写。

  • 适合梳理 endpoint、生成 OpenAPI 草稿或检查字段命名。
  • 需确认真实业务语义、鉴权方式和错误处理规则。
  • 应从现有代码或样例中提取事实,避免凭空补字段。
  • ring%3awriting-api-docs 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Writing API Reference Documentation

API reference documentation describes what each endpoint does, its parameters, request/response formats, and error conditions. It focuses on the "what" rather than the "why."

API Reference Principles

  • RESTful and Predictable: Standard HTTP methods, consistent URL patterns, document idempotency
  • Consistent Formats: JSON requests/responses, clear typing, standard error format
  • Explicit Versioning: Version in URL path, backward compatibility notes, deprecated fields marked

Endpoint Documentation Structure

SectionContent
TitleEndpoint name
DescriptionBrief description of what the endpoint does
HTTP Method + PathPOST /v1/organizations/{orgId}/ledgers/{ledgerId}/accounts
Path ParametersTable: Parameter, Type, Required, Description
Query ParametersTable: Parameter, Type, Default, Description
Request BodyJSON example + fields table
Success ResponseStatus code + JSON example + fields table
ErrorsTable: Status Code, Error Code, Description

Field Description Patterns

TypePattern
Basicname: string — The name of the Account
With constraintscode: string — The asset code (max 10 chars, uppercase)
With exampleemail: string — Email address (e.g., "user@example.com")
DeprecatedchartOfAccountsGroupName: string — **[Deprecated]** Use \route instead

Data Types Reference

TypeDescriptionExample
uuidUUID v4 identifier3172933b-50d2-4b17-96aa-9b378d6a6eac
stringText value"Customer Account"
integerWhole number42
booleanTrue/falsetrue
timestamptzISO 8601 (UTC)2024-01-15T10:30:00Z
jsonbJSON object{"key": "value"}
arrayList of values["item1", "item2"]
enumPredefined valuescurrency, crypto

Request/Response Examples

Rules:

  • Show realistic, working examples (not "foo", "bar")
  • Show all fields that would be returned
  • Use actual UUIDs, timestamps, realistic data

Error Documentation

Standard error format:

{
  "code": "ACCOUNT_NOT_FOUND",
  "message": "The specified account does not exist",
  "details": { "accountId": "invalid-uuid" }
}

Error table:

StatusCodeDescriptionResolution
400INVALID_REQUESTValidation failedCheck request format
401UNAUTHORIZEDMissing/invalid authProvide valid API key
403FORBIDDENInsufficient permissionsContact admin
404NOT_FOUNDResource doesn't existVerify resource ID
409CONFLICTResource already existsUse different identifier
422UNPROCESSABLE_ENTITYBusiness rule violationCheck constraints
500INTERNAL_ERRORServer errorRetry or contact support

HTTP Status Codes

Success: 200 (GET/PUT/PATCH), 201 (POST creates), 204 (DELETE)

Client errors: 400 (malformed), 401 (no auth), 403 (no permission), 404 (not found), 409 (conflict), 422 (invalid semantics)

Server errors: 500 (internal)


Pagination Documentation

For paginated endpoints, document query parameters:

ParameterTypeDefaultDescription
limitinteger10Results per page (max 100)
pageinteger1Page number

Response includes: items, page, limit, totalItems, totalPages


Versioning Notes

Note: You're viewing documentation for the current version (v3).

For deprecated: > **Deprecated:** This endpoint will be removed in v4. Use [/v3/accounts](link) instead.


Quality Checklist

  • HTTP method and path correct
  • All path parameters documented
  • All query parameters documented
  • All request body fields documented with types
  • All response fields documented with types
  • Required vs optional clear
  • Realistic request/response examples included
  • All error codes documented
  • Deprecated fields marked
  • Links to related endpoints included

Standards Loading (MANDATORY)

Before writing any API documentation, MUST load relevant standards:

  1. Voice and Tone Guidelines - Load ring:voice-and-tone skill
  2. Field Description Patterns - Load ring:api-field-descriptions skill
  3. Documentation Structure - Load ring:documentation-structure skill

HARD GATE: CANNOT proceed with API documentation without loading these standards.


Blocker Criteria - STOP and Report

ConditionDecisionAction
API endpoint not implementedSTOPReport: "Cannot document non-existent endpoint"
API behavior undeterminedSTOPReport: "Need confirmed API behavior before documenting"
Response schema unknownSTOPReport: "Need response schema to document fields"
Error codes undefinedSTOPReport: "Need error code list before completing"
Voice/tone guidelines unclearSTOPReport: "Need style guide clarification"

Cannot Be Overridden

These requirements are NON-NEGOTIABLE:

  • MUST document ALL fields (request and response)
  • MUST include realistic examples (not "foo", "bar")
  • MUST document ALL error codes
  • MUST use present tense and active voice
  • MUST use sentence case for headings
  • CANNOT skip required vs optional indicators

Severity Calibration

SeverityCriteriaExamples
CRITICALMissing core sections, incorrect API pathsNo request/response examples, wrong HTTP method
HIGHMissing field documentation, no error codesUndocumented required fields, missing error table
MEDIUMVoice/tone violations, structure issuesPassive voice, title case headings
LOWMinor clarity improvements, formattingCould add more context, spacing issues

Pressure Resistance

User SaysYour Response
"Skip the examples, developers will figure it out""CANNOT skip examples. Realistic examples are REQUIRED for every endpoint. I'll add complete request/response examples."
"Just document the happy path, errors are rare""MUST document all error codes. Error handling is critical for developers. I'll include the complete error table."
"The code is the documentation""Code is NOT documentation. API reference MUST explain purpose, constraints, and behavior. I'll write proper field descriptions."
"We'll add docs later, ship the feature first""Documentation is part of the feature. CANNOT ship undocumented APIs. I'll complete the documentation now."
"Copy the schema, that's enough""Schema alone is insufficient. MUST add descriptions, examples, and context. I'll write complete documentation."

Anti-Rationalization Table

RationalizationWhy It's WRONGRequired Action
"Field name is self-explanatory"Self-explanatory to you ≠ self-explanatory to usersMUST write explicit description
"Simple API doesn't need extensive docs"Simplicity doesn't reduce documentation needDocument ALL fields completely
"Error codes are standard HTTP"Each error needs context and resolution guidanceMUST document all errors with resolutions
"Examples slow down documentation"Examples are the most-read part of API docsMUST include realistic examples
"Internal API, limited audience"Internal users deserve quality docs tooApply same standards as public APIs
"Schema is generated, no need to write"Generated schemas lack context and guidanceMUST add human-written descriptions

When This Skill is Not Needed

Signs that API documentation already meets standards:

  • ALL endpoints have HTTP method, path, and description
  • ALL request fields documented with type, required status, constraints
  • ALL response fields documented with type and description
  • ALL error codes listed with descriptions and resolutions
  • Realistic JSON examples for every request and response
  • Links to related endpoints included
  • Voice and tone guidelines followed consistently

If all above are true: Documentation is complete, no changes needed.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.53%
按下载量换算93

Claude

31.93%
按下载量换算86

Cursor

16.65%
按下载量换算45

Gemini CLI

8.75%
按下载量换算24

安全审计

暂无安全审计结果可展示。

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills