Skill: Update API Documentation
Generates markdown API documentation for all Nim source files in the project.
Steps
- •
Find all Nim source files
bashglob **/*.nim
- •
Create/update docs folder
bashmkdir -p docs/
- •
Generate JSON docs for each source file (skip test files)
bashnim jsondoc --out:docs/module_name.json src/path/to/module.nim
- •
Read JSON output and convert to markdown with:
- •Module name and description
- •Type definitions with code blocks
- •Procedures with signatures, parameters, return types
- •Error handling notes
- •Usage examples where applicable
- •
Clean up JSON files
bashrm docs/*.json
Output
Markdown files in docs/ folder:
- •
docs/module_name.mdfor each module with exported API - •
docs/README.mdas index with quick start guide
Notes
- •Skip
app.nim(main entry point, no exported API) - •Skip test files (
tests/directory) - •High-level wrappers get
.mddocs - •Low-level bindings can be documented in
.jsonformat then deleted