Skip to main content

document-an-api-example

Publish a tested API request and response example with prerequisites, safe placeholders, errors, and version context. Use when developers need a copyable example for one API operation or integration path.

来源信息

仓库
protosphinx/sphinxstack
最近来源活动
2026年7月29日 13:55
检测到的 SKILL.md 语言
英语
星标
3
Forks
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
document-an-api-example
category
write
description
Publish a tested API request and response example with prerequisites, safe placeholders, errors, and version context. Use when developers need a copyable example for one API operation or integration path.
# document-an-api-example Make the example executable, minimal, and honest about state. Show the successful path and the most useful failure without embedding real credentials or customer data. ## Inputs - Gather the current API schema, base URL, version, authentication method, required permissions, and rate behavior. - Identify a stable test environment and synthetic resource identifiers. - Confirm the expected response, error model, side effects, idempotency, and cleanup. ## Procedure 1. State the operation goal, prerequisites, version, and side effects. 2. Create synthetic setup data and safe placeholders with unmistakable names. 3. Write the smallest valid request in the project's primary tool or language. 4. Include required headers, encoding, and authentication placement without a usable secret. 5. Show a representative exact response with variable values clearly marked. 6. Add one common error request and explain how to recover. 7. Explain pagination, retries, idempotency, or asynchronous status only when relevant. 8. Run the example from a clean environment against the documented version. 9. Verify copy-and-paste behavior, output, permissions, cleanup, and linked schema. 10. Assign an owner or automated check for future API changes. ## Boundaries Never publish real keys, tokens, personal data, production identifiers, or unsafe destructive commands. Do not hide billable or irreversible side effects. Obtain permission before testing against a shared or production account. ## Done - The request runs from documented prerequisites and returns the checked response shape - Placeholders cannot be mistaken for working credentials or real customer data - A common failure and safe recovery are demonstrated - Version, side effects, permissions, cleanup, and authoritative schema links are accurate
在 GitHub 查看