doc-generator

Extract code comments and annotations into Markdown, JSON, or OpenAPI YAML documentation.

1|1|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/penghang1223/niannian-workspace --skill doc-generator-penghang1223
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: doc-generator
Source: https://github.com/penghang1223/niannian-workspace/tree/main/skills/doc-generator
Command: npx skills add https://github.com/penghang1223/niannian-workspace --skill doc-generator-penghang1223

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, and includes scripts (resource) components.

What problem does it solve?

将源代码中的注释与文档信息提取并自动生成结构化的 API 文档、技术文档及 OpenAPI 规范,并支持直接输出到飞书云文档。

Core Features & Use Cases

  • API 文档生成:从代码提取端点、参数和返回值,生成可发布的文档。
  • 代码注释提取:支持多语言注释风格,自动整理文档。
  • 飞书云文档输出:一键将文档写入飞书云文档,方便团队协作。
  • 中文模板与 OpenAPI 规范:提供中文模板并可输出 OpenAPI YAML/JSON。
  • Use Case: 当你需要为一个新服务快速生成 API 文档并在飞书中分享给全量开发者时,直接运行该技能即可得到完整文档集。

Quick Start

请提供目标代码库路径,技能将从代码注释中提取信息并生成 API 文档、OpenAPI 规范和飞书云文档输出。

Frequently Asked Questions about doc-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate API documentation from source code comments automatically?

API documentation generation from source code comments works by parsing docstrings, inline comments, and route definitions to extract endpoints, parameters, and return values into structured Markdown, JSON, or OpenAPI YAML outputs.

What is the best way to extract docstrings into OpenAPI YAML format?

Extracting docstrings into OpenAPI YAML format involves parsing multi-language code annotations, including Python, JavaScript/TypeScript, and Go, to produce deterministic OpenAPI specifications and accurate API documentation.

Can I output generated API documentation directly to Feishu cloud docs?

You can output generated API documentation directly to Feishu cloud docs by writing the extracted code comments and route definitions as structured Markdown, enabling seamless team collaboration and sharing.

Does the API documentation generator support Go and TypeScript code parsing?

The API documentation generator supports multi-language parsing for Go and TypeScript code by extracting inline comments, route definitions, and docstrings to ensure accurate, deterministic documentation results.

Do I need pyyaml installed to generate OpenAPI YAML from code annotations?

You need pyyaml installed to generate OpenAPI YAML from code annotations, as this dependency is required for parsing and outputting the structured YAML specifications from your source code.

What limitations exist when parsing Python code comments for API documentation?

Limitations when parsing Python code comments for API documentation include relying on consistent docstring formats and inline comment styles to ensure accurate, deterministic extraction of endpoints and parameters.