Document code

From codeaholicguy/ai-devkit · View interactive version

Document code is an AI agent skill from the GitHub repository codeaholicguy/ai-devkit. AI DevKit · Document a code entry point with structured analysis, dependency mapping, and saved knowledge docs. Use when users ask to document, understand, or map code for a module, file, folder, function, or API.

How to use this skill

Skill file

Code Documentation Assistant

Build structured understanding of code entry points with an analysis-first workflow.

Hard Rule

Workflow

  1. Gather & Validate
  1. Collect Source Context
  1. Analyze Dependencies
  1. Synthesize
  1. Create Documentation
  1. Offer HTML Artifact

HTML Artifact

Generated only when the user opts in at step 6. A self-contained HTML file optimized for scanning, not reference reading. Complements the markdown — does not replace it.

Constraints:

Section mapping (from the Output Template):

Red Flags and Rationalizations

| Rationalization | Why It's Wrong | Do Instead |

|---|---|---|

| "I already understand this code" | Understanding ≠ documented understanding | Write it down, then verify |

| "The code is self-documenting" | Future readers lack your current context | Capture the why, not just the what |

| "Dependencies are obvious" | Implicit dependencies cause surprises | Map them explicitly to depth 3 |

Validation

Output Template

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.