Generate code comments and docstrings. Use when user asks to "add comments", "document this code", "explain with comments", or "add docstrings".
A simple skill that automatically generates code comments and docstrings.
# Copy to your project
cp SKILL.md ~/.claude/skills/comment-generator.md
# Or for project-specific
cp SKILL.md your-project/.claude/skills/comment-generator.md
cd your-project
claude
# Then ask:
"Add comments to this function"
"Document my Python class"
"Add JSDoc to my JavaScript code"
The skill automatically activates when you mention:
You:
Add comments to this function:
function fibonacci(n) {
if (n <= 1) return n;
return fibonacci(n - 1) + fibonacci(n - 2);
}
Claude (using comment-generator skill):
/**
* Calculates the nth Fibonacci number using recursion
* @param {number} n - The position in the Fibonacci sequence (0-indexed)
* @returns {number} The Fibonacci number at position n
* @example
* fibonacci(5) // Returns 5 (sequence: 0, 1, 1, 2, 3, 5)
*/
function fibonacci(n) {
// Base case: first two numbers are 0 and 1
if (n <= 1) return n;
// Recursive case: sum of previous two numbers
return fibonacci(n - 1) + fibonacci(n - 2);
}
description: Generate code comments and docstrings. Use when user asks to "add comments", "document this code", "explain with comments", or "add docstrings".
allowed-tools: [Read, Edit]
description: Generate React component JSDoc. Use when documenting React components.
## Our Comment Style
Always include:
1. Author name
2. Date created
3. Ticket number
## Additional Languages
**Ruby:**
```ruby
# Description here
def method
end
Go:
// Description here
func method() {}
## Common Issues
### Skill doesn't activate?
**Check:** Is your description specific enough?
```yaml
# ❌ Too vague
description: For comments
# ✅ Specific
description: Generate code comments. Use when user asks to "add comments" or "document code"
Fix: Add style guidelines in the skill:
## Our Style Guide
- Use imperative mood ("Calculate" not "Calculates")
- Always include examples for public APIs
- Maximum 80 characters per line
function-namer skillcode-formatter skillcode-quality skillSKILL.md - The skill file (copy this to .claude/skills/)README.md - This documentationSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer