Python Comments
Generate clear, concise Python code comments explaining logic and purpose within a given function or block.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add python-comments npx -- -y @trustedskills/python-comments
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"python-comments": {
"command": "npx",
"args": [
"-y",
"@trustedskills/python-comments"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill allows AI agents to add comments to Python code. It can insert single-line or multi-line comments, and explain existing code through commenting. The agent can also remove existing comments from a codebase.
When to use it
- Code Documentation: Automatically generate documentation for a Python script by adding descriptive comments.
- Code Explanation: Have the AI agent explain complex sections of code by inserting clarifying comments.
- Clean Up Codebases: Remove unnecessary or outdated comments from a project to improve readability.
- Learning and Debugging: Add temporary comments to understand the flow of execution during debugging.
Key capabilities
- Adds single-line comments
- Adds multi-line comments
- Explains code through commenting
- Removes existing comments
Example prompts
- "Add a comment explaining what this function does."
- "Remove all the comments from this file."
- "Insert a multi-line comment describing the purpose of this class."
Tips & gotchas
This skill requires access to Python code as input. The quality of explanations depends on the clarity and structure of the original code.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.