comment-generator

Generate structured code comments and docstrings for JavaScript/TypeScript, Python, and Java.

6|2|Updated Oct 31, 2025
One-click install
npx skills add https://github.com/Dexploarer/claudius-skills --skill comment-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: comment-generator
Source: https://github.com/Dexploarer/claudius-skills/tree/main/examples/beginner/simple-skills/comment-generator
Command: npx skills add https://github.com/Dexploarer/claudius-skills --skill comment-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing clear, comprehensive code comments and docstrings is essential for maintainability but can be a tedious and time-consuming task. This Skill automates the generation of these explanations, ensuring code clarity without manual effort.

Core Features & Use Cases

  • Multi-Language Docstrings: Generates comments in appropriate styles for JavaScript/TypeScript, Python, and Java.
  • Structured Documentation: Creates summaries, parameter explanations, return values, and examples for functions, methods, and classes.
  • Use Case: "Add JSDoc comments to my calculateDiscount JavaScript function, explaining its parameters and return value."

Quick Start

Add comments to the processUserData function in 'src/utils.js'.

Frequently Asked Questions about comment-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add documentation to functions and methods across JavaScript, Python, and Java?

Generate code comments and docstrings automatically for functions, methods, and classes. This Skill detects your language by file extension, creates structured documentation with summaries, parameters, returns, and examples in the appropriate style (JSDoc for JavaScript/TypeScript, docstrings for Python, JavaDoc for Java), and applies them without altering code behavior.

Can I generate comments for existing code without rewriting it?

Yes. The Skill reads your source code, generates comments and docstrings for functions, methods, and classes, and applies them while preserving all code logic and structure. It works with JavaScript/TypeScript, Python, and Java files.

What's the best way to document Python functions with docstrings?

Use automated docstring generation to create structured documentation with summaries, parameter descriptions, return value explanations, and usage examples in Python's standard format. This ensures consistency across your codebase and saves manual effort.

Does this work with JavaScript and TypeScript code?

Yes. The Skill generates JSDoc-style comments for JavaScript and TypeScript functions, methods, and classes, including parameter types, return types, and practical examples in the format JavaScript developers expect.

Why should I automate comment generation instead of writing them manually?

Automated comment generation ensures consistent, comprehensive documentation across all functions and classes without the time investment of manual writing. It reduces maintenance burden and improves code clarity for teams.

Can I generate comments for classes and their methods together?

Yes. The Skill generates structured comments for classes, methods, and functions simultaneously, creating complete documentation with class summaries, method descriptions, parameters, return values, and examples across JavaScript/TypeScript, Python, and Java.