api-docs

GitHub

从代码自动生成公共API参考文档,确保签名、参数和示例与源码一致。

examples/scribe/skills/api-docs/SKILL.md omnigent-ai/omnigent

Trigger Scenarios

用户请求API参考文档 用户要求为模块编写使用文档

Install

npx skills add omnigent-ai/omnigent --skill api-docs -g -y
More Options

Non-standard path

npx skills add https://github.com/omnigent-ai/omnigent/tree/main/examples/scribe/skills/api-docs -g -y

Use without installing

npx skills use omnigent-ai/omnigent@api-docs

指定 Agent (Claude Code)

npx skills add omnigent-ai/omnigent --skill api-docs -a claude-code -g -y

安装 repo 全部 skill

npx skills add omnigent-ai/omnigent --all -g -y

预览 repo 内 skill

npx skills add omnigent-ai/omnigent --list

SKILL.md

Frontmatter
{
    "name": "api-docs",
    "description": "Document a module or public API surface (functions, classes, CLI commands, endpoints) from the code itself. Use when the user asks for API reference, to document a module, or to write usage docs for a public interface."
}

api-docs — document a public API surface from the code

Produce reference docs that match the code exactly, derived from the source, not from assumptions about what the API "probably" does.

Read the surface

Identify the public surface to document (a module, class, CLI command group, or set of endpoints). Then have the researcher read it carefully:

  • Dispatch the researcher (purpose: explore) to enumerate the public entry points and report each one's real signature, parameters, defaults, return shape, and raised errors — with file:line evidence.
  • Prefer what the code declares (signatures, type hints, docstrings, default values) over prose descriptions. Public vs. private follows the project's convention (e.g. a leading underscore, or an __all__ / export list).

Structure

For each entry point:

### `<name>(<signature>)`

<one-line summary of what it does>

**Parameters**
- `<name>` (`<type>`, default `<value>`) — <meaning>

**Returns** — `<type>`: <meaning>

**Raises** — `<Error>`: <when>

**Example**
```
<minimal, runnable usage>
```

Write the entries

  • Keep the summary to one line; put detail in the parameter and example sections.
  • Document every public parameter, including defaults, in the order they appear in the signature.
  • Give one minimal example per entry point that actually runs against the documented signature.
  • Do not document private/internal helpers unless the user asks; a reference is the contract, not a code tour.

Verify

Signatures, defaults, and error types drift fastest, so route the finished reference through the reviewer (purpose: review) to confirm every signature and default matches the current code.

Version History

  • a8f41cb Current 2026-08-12 09:03

Same Skill Collection

.claude/skills/antigravity-sdk-e2e-dev/SKILL.md
.claude/skills/copilot-sdk-e2e-dev/SKILL.md
.claude/skills/cursor-sdk-e2e-dev/SKILL.md
.claude/skills/harness-integration-guide/SKILL.md
.claude/skills/pi-native-e2e-dev/SKILL.md
deploy/docker/SKILL.md
examples/debby/skills/debate/SKILL.md
examples/deep-research/skills/deep-research/SKILL.md
examples/polly/skills/cross-review/SKILL.md
examples/polly/skills/fanout/SKILL.md
examples/polly/skills/investigate/SKILL.md
examples/scribe/skills/changelog/SKILL.md
examples/scribe/skills/migration-guide/SKILL.md
examples/sentinel/skills/security-audit/SKILL.md
omnigent/onboarding/agent/skills/build-omnigent/SKILL.md
omnigent/onboarding/agent/skills/detect-framework/SKILL.md
omnigent/onboarding/agent/skills/omnigent-knowledge/SKILL.md
.claude/skills/antigravity-native-e2e-dev/SKILL.md
.claude/skills/cli-setup-verify/SKILL.md
.claude/skills/polly-e2e-dev/SKILL.md
.claude/skills/run-load-test/SKILL.md

Metadata

Files
0
Version
a8f41cb
Hash
fbfcf9b2
Indexed
2026-08-12 09:03

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-12 19:48
浙ICP备14020137号-1 $Гость$