documentation-generation

Generate structured technical documentation from doc plans and templates.

364|53|Updated May 9, 2026
One-click install
npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill documentation-generation-cosmicstack-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: documentation-generation
Source: https://github.com/cosmicstack-labs/mercury-agent-skills/tree/main/categories/development/documentation-generation
Command: npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill documentation-generation-cosmicstack-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you create documentation that remains correct over time, so developers and stakeholders can rely on it instead of chasing outdated READMEs and API references.

Core Features & Use Cases

  • Doc-as-code practices: Version documentation alongside source code, review changes in PRs, and lint/generate docs in CI to prevent drift.
  • Reader-focused structure: Tailor docs for onboarding, debugging, and stakeholder understanding by matching content to the reader’s context.
  • Practical patterns and templates: Apply README structures, API reference conventions, and runnable examples (OpenAPI/Swagger, JSDoc/typed comments, and doc generators) to improve clarity and trust.

Quick Start

Ask your AI to produce a doc plan for your repository that includes a README template, an API reference outline, and a CI workflow to generate and validate docs on every push.

Frequently Asked Questions about documentation-generation

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

FAQPage Schema
How do I generate API documentation that stays accurate as my codebase changes?

You can generate API documentation that stays accurate by applying doc-as-code workflows, versioning docs alongside source code, and linting OpenAPI or JSDoc references in CI to prevent drift on every push.

What is doc-as-code and how does it prevent documentation drift?

Doc-as-code is the practice of versioning documentation with your source code and reviewing changes in PRs. It prevents drift by running automated generation and linting steps in CI to validate formatting and spec correctness.

How do I structure a README for different reader intents like onboarding and debugging?

To structure a README for different reader intents, organize content by matching context to the reader, applying practical templates that separate onboarding instructions, debugging guides, and stakeholder summaries for improved clarity.

Can I automate OpenAPI and Swagger spec validation in my CI pipeline?

Yes, you can automate OpenAPI and Swagger spec validation in your CI pipeline by running doc generation and linting workflows on every push to validate formatting, check links, and ensure spec correctness before merging.

What is the best way to plan technical documentation for a software project?

The best way to plan technical documentation is to create a doc plan that includes a README template, an API reference outline, and a CI workflow to generate and validate docs, ensuring content is organized by reader intent.

Do I need JSDoc or TypeScript comments to generate API reference materials?

You can use JSDoc or typed TypeScript comments to generate API reference materials. The documentation generation process extracts these comments to create structured outputs while validating formatting and spec correctness.