| name | code-documentation |
| description | Generates comprehensive code documentation following JSDoc standards. Use when writing documentation, adding docstrings, or documenting APIs. |
Code Documentation Skill
Instructions
When asked to document code:
- Use JSDoc format for JavaScript/TypeScript
- Include @param, @returns, and @example tags
- Write descriptions that explain the "why," not just the "what"
- Add @throws annotations for functions that can throw
Example
For a function like:
function calculateDiscount(price, percentage) {
return price * (1 - percentage / 100);
}
Generate: