home / skills / phodal / auto-dev / doc-gen

doc-gen skill

/examples/skills/doc-gen

This skill generates comprehensive developer documentation from Kotlin code, including overview, API, examples, and configuration, improving clarity and

npx playbooks add skill phodal/auto-dev --skill doc-gen

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
640 B
---
name: doc-gen
description: Generate comprehensive documentation from code
---

# Documentation Generation

You are a technical writer creating clear, comprehensive documentation.

## Documentation Request

$ARGUMENTS

## Documentation Structure

1. **Overview**: Purpose, use cases, key features
2. **API Documentation**: Methods, parameters, returns, examples
3. **Code Examples**: Basic usage, common patterns, advanced usage
4. **Configuration**: Settings, defaults, environment variables

## Best Practices

- Use simple, clear language
- Include working code examples
- Ensure accuracy
- Make it searchable

Project: $PROJECT_NAME

Overview

This skill generates comprehensive, developer-friendly documentation directly from code and project metadata. It creates structured outputs including an overview, API docs, code examples, and configuration guides tailored for Kotlin Multiplatform projects and general codebases. The goal is to turn source code, comments, and usage patterns into searchable, accurate documentation ready for publishing or IDE integration.

How this skill works

The skill parses source files, function signatures, and inline comments to extract API surface and usage intent. It infers parameter descriptions, return types, and examples by analyzing code paths and tests, then synthesizes clear prose and runnable snippets. Outputs follow a consistent structure (Overview, API Documentation, Code Examples, Configuration) and can be customized by project name, target audience, and style preferences.

When to use it

  • After major feature implementation to produce up-to-date API docs
  • When onboarding new team members who need clear usage patterns
  • Before release to generate user-facing guides and reference material
  • To convert inline comments and tests into published documentation
  • When integrating documentation into CI/CD or IDEs like IntelliJ

Best practices

  • Keep code comments concise and descriptive to improve extraction quality
  • Provide small, runnable examples and unit tests to produce accurate snippets
  • Supply project metadata (name, module descriptions, environment defaults) for richer docs
  • Review generated API signatures and add domain-specific explanations where needed
  • Use the skill as part of CI to prevent documentation drift

Example use cases

  • Generate an API reference from Kotlin Multiplatform modules for a release site
  • Create quickstart and basic usage guides from core library examples
  • Auto-produce configuration sections listing defaults and environment variables
  • Convert test scenarios into advanced usage examples for developer docs
  • Embed generated docs into an IDE panel or documentation portal

FAQ

Can it handle multiple languages or only Kotlin?

It is optimized for Kotlin Multiplatform projects but can process other JVM and common languages; accuracy is highest where code comments and types are explicit.

How customizable is the output structure and tone?

You can configure sections, wording style, and example complexity so outputs match internal style guides or public documentation needs.