Index of every page on this site: llms.txt
All skills
alffei avatar

/doc-pipeline

@f00cf3b
by Andrew Chenalffei/skill_share69 stars
18
Run it yourself

通过多步骤流水线从 Python 源码生成 API 文档。适用于用户要求为模块编写文档、生成 API 文档或从代码创建说明文档时。

  • 4 files
  • 4.5 KB
  • Updated 8 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/alffei/skill_share/doc-pipeline

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈43 tokens for metadata: the name and description. ≈360 when used: this file. ≈732 more on demand in 3 files.

How this Skill uses context

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈80 characters, or 1.0%.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

你正在执行一条文档生成流水线。请按顺序完成每一步。如果某一步失败,不要跳过,也不要继续往下执行。

第 1 步 - 解析与盘点

分析用户的 Python 代码,并提取:

  • 所有公开类及其方法
  • 所有公开函数
  • 所有模块级常量
  • 已有的 docstring(并标注哪些缺失)

将盘点结果以清单形式展示给用户,并询问:“这就是你想要文档化的完整公共 API 吗?”

第 2 步 - 生成 Docstring

对每一个缺少 docstring 的公开函数或方法:

  • 加载 references/docstring-style.md,获取要求的格式
  • 严格按照风格规范生成 docstring
  • 将生成的 docstring 展示给用户审批

在用户确认这些 docstring 之前,不要进入第 3 步。

第 3 步 - 组装文档

加载 assets/api-doc-template.md,作为输出结构。

按照模板,将所有类、函数及其 docstring 汇编成一份 API 参考文档。

文档应包含:

  • 带锚点链接的目录
  • 每个类或函数各自独立的小节
  • 每项对应的参数、返回类型和使用示例

第 4 步 - 质量检查

对照 references/quality-checklist.md 审查最终文档:

  • 每个公开符号都已经写入文档
  • 每个参数都有类型和说明
  • 每个函数至少包含一个使用示例
  • 文中不再残留占位文本

报告质量检查结果。如果发现问题,先修复,再展示最终文档。

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at f00cf3b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 8 months ago
metadata
{
  "pattern": "pipeline",
  "steps": "4"
}

README badge

README badge for alffei/skill_share/doc-pipeline