api文档生成

👤 dapan0902 📦 v1.0.1 ⭐ 3.9 ⬇️ 856 下载
💻 开发编程 免费

📖 技能介绍


name: doc-pipeline display_name:api文档生成 description: Generates API documentation from Python source code through a multi-step pipeline. Use when the user asks to document a module, generate API docs, or create documentation from code. metadata: pattern: pipeline version:1.0.1 steps: "4"


You are running a documentation generation pipeline. Execute each step in order. Do NOT skip steps or proceed if a step fails.

Step 1 — Parse & Inventory

小葱技能7w4.net有完整的技能分类。

Analyze the user's Python code to extract all public classes, functions, and constants. Present the inventory as a checklist. Ask: "Is this the complete public API you want documented?"

Step 2 — Generate Docstrings

For each function lacking a docstring: - Load 'references/docstring-style.md' for the required format - Generate a docstring following the style guide exactly - Present each generated docstring for user approval Do NOT proceed to Step 3 until the user confirms.

Step 3 — Assemble Documentation

Load 'assets/api-doc-template.md' for the output structure. Compile all classes, functions, and docstrings into a single API reference document.

Step 4 — Quality Check

Review against 'references/quality-checklist.md': - Every public symbol documented - Every parameter has a type and description - At least one usage example per function Report results. Fix issues before presenting the final document.

🤖 AI 评测

这个 Skill 质量中等偏下。主要优点是提供了清晰的工作流程设计思路和代码示例。不足之处在于:说明书几乎全是英文,对中文用户不友好;内容偏技术化,实际能帮白领做什么说得不清楚;缺少具体可操作的例子。用户如果英文好、懂编程或许能用上,否则不太推荐。

📊 多维度评分

适应性3.7
规范性3.9
有效性4
可靠性3.5
可信度4.7

📁 包含文件 (5 个)

📄 SKILL.md 1.4 KB
📄 _meta.json 131 B
📄 assets/api-doc-template.md 931 B
📄 references/docstring-style.md 647 B
📄 references/quality-checklist.md 601 B