Tooluck logoTooluck
SKILL.md

document-code

Agent skill fromcodeaholicguy/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 install document-code

install document-code
# install the ai-devkit pack with the skills CLI
npx skills add codeaholicguy/ai-devkit

# or add only this skill to Claude Code: copy the folder

skills/document-code/

# into

~/.claude/skills/document-code/ (all projects)

.claude/skills/document-code/ (one project)

skills/document-code/SKILL.md

Apache-2.0Full file
1# Code Documentation Assistant
2
3Build structured understanding of code entry points with an analysis-first workflow.
4
5## Hard Rule
6- Do not create documentation until the entry point is validated and analysis is complete.
7
8## Workflow
9
101. Gather & Validate
11- Confirm entry point (file, folder, function, API), purpose, and desired depth.
12- Verify it exists; resolve ambiguity or suggest alternatives if not found.
13- Search for existing knowledge before analyzing: `npx ai-devkit@latest memory search --query "<entry point name or purpose>"`
14
152. Collect Source Context
16- Summarize purpose, exports, key patterns.
17- Folders: list structure, highlight key modules.
18- Functions/APIs: capture signature, parameters, return values, error handling.
19
203. Analyze Dependencies
21- Build dependency view up to depth 3, track visited nodes to avoid loops.
22- Categorize: imports, function calls, services, external packages.
23- Exclude external systems or generated code.
24
254. Synthesize
26- Overview (purpose, language, high-level behavior).
27- Core logic, execution flow, patterns.
28- Error handling, performance, security considerations.
29- Improvements or risks discovered during analysis.
30
315. Create Documentation
32- Normalize name to kebab-case (`calculateTotalPrice` → `calculate-total-price`).
33- Create `docs/ai/implementation/knowledge-{name}.md` using the Output Template — this is the source of truth.
34- Include mermaid diagrams when they clarify flows or relationships.
35
366. Offer HTML Artifact
37…

Excerpt shown under the repository's Apache-2.0 license.

More skills in ai-devkit

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates