From aj-geddes-useful-ai-prompts-4
Generates clear code documentation using language-specific standards like JSDoc, Python docstrings, JavaDoc, and inline comments.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aj-geddes-useful-ai-prompts-4:code-documentationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- [Overview](#overview)
Create clear, comprehensive code documentation using language-specific standards like JSDoc, Python docstrings, JavaDoc, and inline comments.
Minimal working example:
/**
* Calculates the total price including tax and discount.
*
* @param {number} basePrice - The base price before tax and discount
* @param {number} taxRate - Tax rate as a decimal (e.g., 0.08 for 8%)
* @param {number} [discount=0] - Optional discount amount
* @returns {number} The final price after tax and discount
* @throws {Error} If basePrice or taxRate is negative
*
* @example
* const price = calculateTotalPrice(100, 0.08, 10);
* console.log(price); // 98
*
* @example
* // Without discount
* const price = calculateTotalPrice(100, 0.08);
* console.log(price); // 108
*/
function calculateTotalPrice(basePrice, taxRate, discount = 0) {
if (basePrice < 0 || taxRate < 0) {
throw new Error("Price and tax rate must be non-negative");
}
return basePrice * (1 + taxRate) - discount;
}
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Function Documentation | Function Documentation |
| Class Documentation | Class Documentation |
| Type Definitions | Type Definitions |
| Function Documentation | Function Documentation |
| Class Documentation | Class Documentation |
| Module Documentation | Module Documentation |
npx claudepluginhub aj-geddes/useful-ai-promptsGenerates JSDoc for JS/TS, docstrings for Python, Rustdoc, Javadoc, GoDoc, READMEs, and API docs by analyzing code signatures, params, returns, and examples.
Provides docstring templates for Python (Google style) and JavaScript (JSDoc), README structures, and standards for technical documentation. Use when generating API docs, READMEs, or updating code comments.
Generates professional documentation including READMEs, API references, architecture docs, changelogs, and developer guides from codebase analysis.