docs

Generate inline comments and structured markdown documentation for source code.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/thisguymartin/ai-native-dev --skill docs-thisguymartin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docs
Source: https://github.com/thisguymartin/ai-native-dev/tree/main/.gemini/skills/docs
Command: npx skills add https://github.com/thisguymartin/ai-native-dev --skill docs-thisguymartin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many codebases lack clear, maintainable explanations of domain logic, integration points, and non-obvious decisions, which slows onboarding and increases bugs; this Skill provides brief, high-value documentation and inline comments targeted at the "why" rather than the obvious "what."

Core Features & Use Cases

  • Inline Commenting: Add concise, one- to three-line comments explaining business rules, edge cases, and performance/security considerations without changing code behavior.
  • External Documentation Generation: Produce structured markdown (README, architecture, module overviews, API contracts, glossary) by scanning directories and identifying key modules and data flows.
  • Clarification Protocol & Output Summary: Always ask mandatory scope and mode questions before editing and produce a Documentation Summary that lists files changed, coverage, and recommendations.
  • Use Case: Triage a legacy auth module by adding targeted inline comments to unusual validation logic and generate an auth/overview.md that describes flows and dependencies.

Quick Start

Document src/auth/login.py inline focusing on domain logic and add concise comments for non-obvious logic.

Frequently Asked Questions about docs

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

FAQPage Schema
How do I generate technical documentation for undocumented source code?

Generate technical documentation by scanning directories to identify domain logic and undocumented areas, then producing structured markdown for modules, APIs, and architecture. The process enforces brevity and non-invasive edits while targeting the reasoning behind code rather than obvious behavior.

What is the best way to add inline comments explaining business logic to legacy code?

Add inline comments by targeting non-obvious domain logic, edge cases, and security considerations without changing code behavior. The process inserts concise one- to three-line explanations focusing on the why behind business rules, ensuring the comments remain brief and non-invasive.

Can I document an entire module's architecture and API contracts in markdown?

Document module architecture and API contracts in markdown by scanning directories to identify key modules and data flows. The process generates structured external files including README overviews, architecture descriptions, and glossary entries that map dependencies and integration points.

How does the clarification protocol work before generating code documentation?

The clarification protocol enforces mandatory scope and mode questions before editing any source code. After documentation is generated, it produces a Documentation Summary listing files changed, coverage metrics, and recommendations, ensuring clear boundaries and non-invasive edits.

When should I avoid adding inline code comments to source files?

Avoid adding inline code comments when logic is obvious or self-explanatory, as the process targets non-obvious domain decisions and edge cases. The mandatory clarification protocol ensures scope is verified beforehand, preventing unnecessary edits and maintaining codebase brevity.