dexploarer/claudius-skills/comment-generator
Claude Code and agent skill by dexploarer/claudius-skills
- community
Checking that the SKILL.md file is still in the repository.
Generate code comments and docstrings. Use when user asks to "add comments", "document this code", "explain with comments", or "add docstrings".
Install
npx vskill@latest install dexploarer/claudius-skills/comment-generatorSKILL.md
The same SKILL.md was published earlier as dexploarer/claudius-skills/comment-generator.
Comment Generator Skill
Automatically generates clear, helpful comments for code.
When to Use
This skill activates when the user wants to add comments to their code:
- "Add comments to this function"
- "Document this code"
- "Add docstrings to my Python class"
- "Explain this with inline comments"
Instructions
Step 1: Identify Language
Determine the programming language from:
- File extension
- Syntax patterns
- User specification
Step 2: Choose Comment Style
JavaScript/TypeScript:
Python:
Java:
Step 3: Comment Structure
For functions/methods:
- Summary: What it does (one line)
- Parameters: Each parameter explained
- Returns: What it returns
- Throws/Raises: Any exceptions (if applicable)
- Examples: Usage example (if complex)
For classes:
- Summary: What the class represents
- Attributes: Key properties
- Usage: How to instantiate and use
For complex logic:
- Inline comments: Explain why, not what
- Section comments: Mark major sections
- TODO/FIXME: Note improvements needed
Step 4: Write Clear Comments
✅ Good comments:
- Explain WHY, not just WHAT
- Use clear, simple language
- Are concise but complete
- Add value (don't state the obvious)
❌ Bad comments:
✅ Better:
Examples
Example 1: Simple Function
Input:
Output:
Example 2: Complex Function
Input:
Output:
Tips
For Beginners
- Start with function/method summaries
- Add parameter descriptions
- Include simple examples
For Intermediate
- Add type information
- Document exceptions
- Include edge cases
For Advanced
- Add algorithmic complexity
- Document thread safety
- Include performance notes
What NOT to Comment
❌ Don't comment obvious code:
❌ Don't duplicate code in comments:
❌ Don't leave outdated comments:
Remember
- Comments should add value
- Update comments when code changes
- Explain complex logic
- Document public APIs thoroughly
- Keep private code comments minimal but helpful
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingexamples/beginner/simple-skills/comment-generator/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dexploarer/claudius-skills/comment-generator)