Code Comment

🌐Community
by homestylew · vlatest · Repository

Generates concise, helpful code comments to improve readability and understanding of your codebase – a valuable tool for collaboration & maintenance.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add code-comment npx -- -y @trustedskills/code-comment
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "code-comment": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/code-comment"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill allows AI agents to generate comments for code. It can add explanations, document functions, or provide context within existing code blocks. The generated comments are intended to improve code readability and maintainability by clarifying the purpose of specific sections.

When to use it

  • Documenting a new function: Quickly create initial documentation for newly written code.
  • Explaining complex logic: Generate comments that clarify intricate algorithms or processes within existing code.
  • Improving code readability: Add comments to make older, less-documented code easier to understand and maintain.
  • Generating docstrings: Create concise summaries of functions and classes for use in documentation generation tools.

Key capabilities

  • Generates code comments based on provided code snippets.
  • Supports various programming languages (specific languages not listed).
  • Can add explanations, document functions, or provide context.

Example prompts

  • "Add a comment explaining this function: def calculate_average(numbers): ..."
  • "Generate comments for the following code block: [code snippet]"
  • "Document this class with docstrings: class MyClass: ..."

Tips & gotchas

The quality of generated comments depends on the clarity and structure of the provided code. Ensure that the code is well-formatted to get more accurate and helpful comments.

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 HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
homestylew
Installs
4

🌐 Community

Passed automated security scans.