Agent Skills › DexForce/EmbodiChain › update-api-docs

update-api-docs

GitHub

用于生成或更新Python项目的Sphinx API文档。当CI报告缺失导出、新增公共API或需同步参考页时触发。通过检查器定位缺失项,补充__all__及详细文档,确保文档与代码一致且无副作用。

.agents/skills/update-api-docs/SKILL.md DexForce/EmbodiChain

Trigger Scenarios

CI报告缺少__all__导出 新增或修改公共API 需要填充或同步API参考页面

Install

npx skills add DexForce/EmbodiChain --skill update-api-docs -g -y
More Options

Non-standard path

npx skills add https://github.com/DexForce/EmbodiChain/tree/main/.agents/skills/update-api-docs -g -y

Use without installing

npx skills use DexForce/EmbodiChain@update-api-docs

指定 Agent (Claude Code)

npx skills add DexForce/EmbodiChain --skill update-api-docs -a claude-code -g -y

安装 repo 全部 skill

npx skills add DexForce/EmbodiChain --all -g -y

预览 repo 内 skill

npx skills add DexForce/EmbodiChain --list

SKILL.md

Frontmatter
{
    "name": "update-api-docs",
    "description": "Generate or update EmbodiChain Sphinx API documentation for public Python exports. Use when the API docs checker or CI reports missing __all__ exports, after adding or changing public APIs, or when asked to fill, generate, or synchronize API-reference pages and their descriptions."
}

Update API Docs

Generate useful API documentation for every public export reported by the read-only checker. Treat static __all__ declarations as the public API contract and preserve existing hand-written documentation.

Workflow

  1. Run the checker in machine-readable mode:

    python docs/scripts/check_api_docs.py --format json
    

    Exit status 1 is expected when exports are missing. Read the JSON report; if missing_count is zero, report that the docs are aligned and stop.

  2. Group missing entries by module. Read each reported source file and inspect the exported definition, signature, type annotations, and docstring. Locate existing API pages with:

    rg -n "automodule:: <module>|currentmodule:: <module>" docs/source/api_reference
    
  3. Choose the documentation location:

    • Add the export to an existing curated module page when one exists. Follow that page's headings, autosummary groups, and detailed autodoc directives.
    • Document a package-level re-export under its public import path, not only under the implementation module.
    • If no suitable curated page exists, add or extend the module section in docs/source/api_reference/public_api.rst. This file is an agent-maintained fallback, not checker output. Keep fallback module headings sorted by import path and entries in their declared __all__ order to minimize diff churn.
  4. Write documentation that explains the API:

    • Add the export to the appropriate autosummary block.
    • Add the matching autoclass, autofunction, autodata, or other detailed directive when the surrounding page provides detailed entries.
    • Add a concise section overview when names alone do not explain the group.
    • If the source docstring is missing or too vague for autodoc, improve it with a meaningful summary and Google-style Args, Returns, and Raises sections where applicable.
    • Derive descriptions from the implementation and tests. Do not invent behavior, examples, guarantees, or parameter semantics.
  5. Keep the change scoped to documentation. Do not alter runtime behavior, signatures, or __all__ merely to silence the checker. Do not replace curated prose with generic generated text or add placeholders such as "part of the public API."

  6. Rerun the checker until it reports zero missing exports:

    python docs/scripts/check_api_docs.py
    
  7. Run Black on every changed Python file, then validate the documentation workflow:

    pytest tests/docs/test_check_api_docs.py -q --confcutdir=tests/docs
    python -m sphinx -b dummy docs/source docs/build/api-docs-check
    

    When source docstrings were changed, also run focused tests for those modules. Fix new Sphinx warnings caused by the edit; distinguish them from unrelated pre-existing warnings.

Completion Report

Report the documented import paths, the pages or docstrings updated, and the validation results. If an export cannot be documented accurately from the repository, identify the exact missing semantic information instead of guessing.

Version History

  • 131e55b Current 2026-08-28 22:45

Same Skill Collection

.agents/skills/add-atomic-action/SKILL.md
.agents/skills/add-embodiment-component/SKILL.md
.agents/skills/add-functor/SKILL.md
.agents/skills/add-robot/SKILL.md
.agents/skills/add-semantic-call/SKILL.md
.agents/skills/add-solver/SKILL.md
.agents/skills/add-task-env/SKILL.md
.agents/skills/add-task-program/SKILL.md
.agents/skills/add-test/SKILL.md
.agents/skills/benchmark/SKILL.md
.agents/skills/implement-performance/SKILL.md
.agents/skills/pr/SKILL.md
.agents/skills/pre-commit-check/SKILL.md
.agents/skills/project-dev-context/SKILL.md
.agents/skills/release/SKILL.md
.agents/skills/review-pr/SKILL.md
.claude/skills/add-atomic-action/SKILL.md
.claude/skills/add-embodiment-component/SKILL.md
.claude/skills/add-functor/SKILL.md
.claude/skills/add-robot/SKILL.md
.claude/skills/add-semantic-call/SKILL.md
.claude/skills/add-solver/SKILL.md
.claude/skills/add-task-env/SKILL.md
.claude/skills/add-task-program/SKILL.md
.claude/skills/add-test/SKILL.md
.claude/skills/benchmark/SKILL.md
.claude/skills/pr/SKILL.md
.claude/skills/pre-commit-check/SKILL.md
.claude/skills/project-dev-context/SKILL.md
.claude/skills/release/SKILL.md
.claude/skills/review-pr/SKILL.md
.claude/skills/update-api-docs/SKILL.md
.claude/skills/implement-performance/SKILL.md

Metadata

Files
0
Version
6611467
Hash
4e59cfc2
Indexed
2026-08-28 22:45

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-25 04:00
浙ICP备14020137号-1