code-documenter by jeffallan/claude-skills
npx skills add https://github.com/jeffallan/claude-skills --skill code-documenter专为内联文档、API 规范、文档站点和开发者指南设计的文档专家。
适用于任何涉及代码文档、API 规范或面向开发者的指南的任务。具体子主题请参考下表。
python -m doctest file.py;对于模块级检查使用 pytest --doctest-modules
* TypeScript/JavaScript: 使用 tsc --noEmit 确认类型化示例可编译
* OpenAPI: 使用 npx @redocly/cli lint openapi.yaml 验证规范
* 如果验证失败:在进入报告步骤之前,修复示例并重新验证def fetch_user(user_id: int, active_only: bool = True) -> dict:
"""Fetch a single user record by ID.
Args:
user_id: Unique identifier for the user.
active_only: When True, raise an error for inactive users.
Returns:
A dict containing user fields (id, name, email, created_at).
Raises:
ValueError: If user_id is not a positive integer.
UserNotFoundError: If no matching user exists.
"""
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
def compute_similarity(vec_a: np.ndarray, vec_b: np.ndarray) -> float:
"""Compute cosine similarity between two vectors.
Parameters
----------
vec_a : np.ndarray
First input vector, shape (n,).
vec_b : np.ndarray
Second input vector, shape (n,).
Returns
-------
float
Cosine similarity in the range [-1, 1].
Raises
------
ValueError
If vectors have different lengths.
"""
/**
* Fetches a paginated list of products from the catalog.
*
* @param {string} categoryId - The category to filter by.
* @param {number} [page=1] - Page number (1-indexed).
* @param {number} [limit=20] - Maximum items per page.
* @returns {Promise<ProductPage>} Resolves to a page of product records.
* @throws {NotFoundError} If the category does not exist.
*
* @example
* const page = await fetchProducts('electronics', 2, 10);
* console.log(page.items);
*/
async function fetchProducts(
categoryId: string,
page = 1,
limit = 20
): Promise<ProductPage> { ... }
根据上下文加载详细指导:
| 主题 | 参考 | 加载时机 |
|---|---|---|
| Python 文档字符串 | references/python-docstrings.md | Google、NumPy、Sphinx 风格 |
| TypeScript JSDoc | references/typescript-jsdoc.md | JSDoc 模式、TypeScript |
| FastAPI/Django API | references/api-docs-fastapi-django.md | Python API 文档 |
| NestJS/Express API | references/api-docs-nestjs-express.md | Node.js API 文档 |
| 覆盖率报告 | references/coverage-reports.md | 生成文档报告 |
| 文档系统 | references/documentation-systems.md | 文档站点、静态生成器、搜索、测试 |
| 交互式 API 文档 | references/interactive-api-docs.md | OpenAPI 3.1、门户、GraphQL、WebSocket、gRPC、SDK |
| 用户指南和教程 | references/user-guides-tutorials.md | 入门指南、教程、故障排除、常见问题解答 |
根据任务,提供:
Google/NumPy/Sphinx 文档字符串、JSDoc、OpenAPI 3.0/3.1、AsyncAPI、gRPC/protobuf、FastAPI、Django、NestJS、Express、GraphQL、Docusaurus、MkDocs、VitePress、Swagger UI、Redoc、Stoplight
每周安装量
1.1K
仓库
GitHub 星标
7.2K
首次出现
Jan 20, 2026
安全审计
安装于
opencode963
gemini-cli935
codex913
github-copilot881
cursor816
amp809
Documentation specialist for inline documentation, API specs, documentation sites, and developer guides.
Applies to any task involving code documentation, API specs, or developer-facing guides. See the reference table below for specific sub-topics.
python -m doctest file.py for doctest blocks; pytest --doctest-modules for module-wide checkstsc --noEmit to confirm typed examples compilenpx @redocly/cli lint openapi.yamldef fetch_user(user_id: int, active_only: bool = True) -> dict:
"""Fetch a single user record by ID.
Args:
user_id: Unique identifier for the user.
active_only: When True, raise an error for inactive users.
Returns:
A dict containing user fields (id, name, email, created_at).
Raises:
ValueError: If user_id is not a positive integer.
UserNotFoundError: If no matching user exists.
"""
def compute_similarity(vec_a: np.ndarray, vec_b: np.ndarray) -> float:
"""Compute cosine similarity between two vectors.
Parameters
----------
vec_a : np.ndarray
First input vector, shape (n,).
vec_b : np.ndarray
Second input vector, shape (n,).
Returns
-------
float
Cosine similarity in the range [-1, 1].
Raises
------
ValueError
If vectors have different lengths.
"""
/**
* Fetches a paginated list of products from the catalog.
*
* @param {string} categoryId - The category to filter by.
* @param {number} [page=1] - Page number (1-indexed).
* @param {number} [limit=20] - Maximum items per page.
* @returns {Promise<ProductPage>} Resolves to a page of product records.
* @throws {NotFoundError} If the category does not exist.
*
* @example
* const page = await fetchProducts('electronics', 2, 10);
* console.log(page.items);
*/
async function fetchProducts(
categoryId: string,
page = 1,
limit = 20
): Promise<ProductPage> { ... }
Load detailed guidance based on context:
| Topic | Reference | Load When |
|---|---|---|
| Python Docstrings | references/python-docstrings.md | Google, NumPy, Sphinx styles |
| TypeScript JSDoc | references/typescript-jsdoc.md | JSDoc patterns, TypeScript |
| FastAPI/Django API | references/api-docs-fastapi-django.md | Python API documentation |
| NestJS/Express API | references/api-docs-nestjs-express.md | Node.js API documentation |
| Coverage Reports | references/coverage-reports.md |
Depending on the task, provide:
Google/NumPy/Sphinx docstrings, JSDoc, OpenAPI 3.0/3.1, AsyncAPI, gRPC/protobuf, FastAPI, Django, NestJS, Express, GraphQL, Docusaurus, MkDocs, VitePress, Swagger UI, Redoc, Stoplight
Weekly Installs
1.1K
Repository
GitHub Stars
7.2K
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode963
gemini-cli935
codex913
github-copilot881
cursor816
amp809
99,500 周安装
| Generating documentation reports |
| Documentation Systems | references/documentation-systems.md | Doc sites, static generators, search, testing |
| Interactive API Docs | references/interactive-api-docs.md | OpenAPI 3.1, portals, GraphQL, WebSocket, gRPC, SDKs |
| User Guides & Tutorials | references/user-guides-tutorials.md | Getting started, tutorials, troubleshooting, FAQs |