agentleFS
agentsdanceagentsdance/agentskills/skills/code-documenter/SKILL.md

code-documenter

Skill3 starsChanged 11 months agoApache-2.0View on GitHub

Generate documentation for code including JSDoc, docstrings, and inline comments. Use when the user needs to add documentation, create API docs, or improve code readability.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Code Documenter

Generate comprehensive documentation for code.

Documentation Types

TypePurposeFormat
JSDocJavaScript/TypeScript/** ... */
DocstringsPython"""..."""
GoDocGo// Comment above
RustdocRust/// or //!

JSDoc Example

/**
 * Calculate the total price with tax and discounts.
 *
 * @param {number} subtotal - The pre-tax amount
 * @param {number} taxRate - Tax rate as decimal (e.g., 0.1 for 10%)
 * @param {Object} [options] - Optional settings
 * @param {number} [options.discount=0] - Discount amount
 * @param {boolean} [options.roundUp=false] - Whether to round up
 * @returns {number} The final price
 * @throws {Error} If subtotal is negative
 *
 * @example
 * calculateTotal(100, 0.1); // Returns 110
 * calculateTotal(100, 0.1, { discount: 10 }); // Returns 99
 */
function calculateTotal(subtotal, taxRate, options = {}) {
  // ...
}

Python Docstring

def calculate_total(subtotal: float, tax_rate: float, discount: float = 0) -> float:
    """
    Calculate the total price with tax and discounts.

    Args:
        subtotal: The pre-tax amount
        tax_rate: Tax rate as decimal (e.g., 0.1 for 10%)
        discount: Optional discount amount (default: 0)

    Returns:
        The final price after tax and discounts

    Raises:
        ValueError: If subtotal is negative

    Example:
        >>> calculate_total(100, 0.1)
        110.0
        >>> calculate_total(100, 0.1, discount=10)
        99.0
    """
    pass

Documentation Checklist

  • Function/method purpose
  • Parameter descriptions with types
  • Return value description
  • Exceptions/errors that can be thrown
  • Usage examples
  • Edge cases and limitations

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.