docsapi
Use when: writing or reviewing API and code documentation, including docstrings, OpenAPI patterns, and parameter tables.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when: writing or reviewing API and code documentation, including docstrings, OpenAPI patterns, and parameter tables.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when: reviewing .prompt.md, .agent.md, SKILL.md, or .instructions.md files for contradictions, ambiguity, persona consistency, cognitive load, coverage gaps, and composition conflicts.
Use when: checking xanadAssistant workspace health, install status, repair reasons, or lockfile validity before proposing install, update, repair, or restore operations.
Use when: designing or reviewing CI/CD pipelines, GitHub Actions, stage design, environment gates, or artifact discipline.
Use when: writing or reviewing Dockerfiles, container images, multi-stage builds, layer caching, or image security.
Use when: writing or reviewing Infrastructure as Code for naming, state management, modularity, and drift detection.
Use when: reviewing DevOps changes for pipeline safety, secret hygiene, permissions, rollback, and deployment risk.
| name | docsApi |
| description | Use when: writing or reviewing API and code documentation, including docstrings, OpenAPI patterns, and parameter tables. |
| type | reference |
| version | 1.0 |
| license | MIT |
Skill metadata: version "1.0"; tags [docs, api-reference, docstrings]; recommended tools [].
Use this skill when documenting code: functions, classes, REST endpoints, CLI commands, or configuration schemas.
docsStructuredocsReviewdef process(items: list[str], limit: int = 100) -> dict[str, int]:
"""Count occurrences of each item up to a limit.
Args:
items: Strings to count. Duplicates are tallied.
limit: Maximum number of items to process. Defaults to 100.
Returns:
A mapping of item to occurrence count.
Raises:
ValueError: If limit is less than 1.
Example:
>>> process(["a", "b", "a"])
{"a": 2, "b": 1}
"""
Use Google style (Args/Returns/Raises/Example sections) unless the project already uses NumPy or reST style — match the corpus.
/**
* Count occurrences of each item up to a limit.
*
* @param items - Strings to count. Duplicates are tallied.
* @param limit - Maximum items to process. Defaults to 100.
* @returns A map of item to occurrence count.
* @throws {RangeError} If limit is less than 1.
*
* @example
* process(["a", "b", "a"]) // => { a: 2, b: 1 }
*/
// Process counts occurrences of each item up to limit.
// It returns a map of item to count.
// Returns an error if limit is less than 1.
func Process(items []string, limit int) (map[string]int, error)
Go doc comments begin with the function name, use complete sentences, and end with a period.
Use a Markdown table for reference documentation of CLI flags, env vars, or config options:
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
--output | string | stdout | No | File path for output. Use - for stdout. |
--format | enum | json | No | Output format: json, csv, text. |
--token | string | — | Yes | API token. Prefer env var API_TOKEN. |
Each endpoint should document:
POST /api/v1/users| Artifact | Must document |
|---|---|
| Public function/method | All params, return type, exceptions, one example |
| CLI command/flag | Description, type, default, required/optional |
| Config field | Description, type, default, valid values |
| REST endpoint | Method, path, request, all responses |
| Environment variable | Purpose, type, default, when to set |
| Breaking change | What changed, migration path, affected versions |