comment-code

Generates JSDoc-style documentation for Python source files using introspection and dependency analysis.

1|Updated Mar 23, 2026
One-click install
npx skills add https://github.com/Fandhe-AI/agent-cli-skills --skill comment-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: comment-code
Source: https://github.com/Fandhe-AI/agent-cli-skills/tree/main/skills/comment-code
Command: npx skills add https://github.com/Fandhe-AI/agent-cli-skills --skill comment-code

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pydocstyle, isort, and includes scripts (resource) and references (resource) components.

What problem does it solve?

The Skill Unit comment-code tackles the problem of lackluster or non-existent code comments. This hinders developers from quickly understanding the code structure, dependencies, and the intended purpose behind each piece of code.

Core Features & Use Cases

  • Code Documentation: Automates the addition of JSDoc or docstring-style documentation to enhance code readability and maintainability.
  • Dependency Analysis: Provides information about file dependencies, package versions, and service dependencies to improve overall code quality.
  • Boundary Analysis: Highlights the role and responsibilities of individual functions, classes, or modules to facilitate modular code development.

Quick Start

Run the comment-code command with the file or directory path to start enhancing its code comments.

Frequently Asked Questions about comment-code

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

FAQPage Schema
How do I automatically generate docstrings for Python source code files?

You can automatically generate docstrings for Python source code by running the comment-code command with a file or directory path. It uses Python introspection to identify boundaries and adds JSDoc-style documentation to enhance code readability.

How does Python introspection identify boundaries for code documentation?

Python introspection identifies boundaries by analyzing file dependencies, package versions, and service dependencies. This process highlights the specific roles and responsibilities of individual functions, classes, or modules to facilitate modular development.

Can I use JSDoc-style documentation for Python code maintainability?

Yes, you can use JSDoc-style documentation for Python code maintainability. The system utilizes introspection capabilities alongside documentation frameworks to automate the addition of structured comments based on dependency information.

Do I need pydocstyle and isort to analyze code dependencies?

You need pydocstyle and isort dependencies to support the code analysis and documentation framework. These dependencies assist the introspection capabilities in evaluating package versions and file dependencies for automated documentation updates.

What is the best way to update existing code comments across a directory?

The best way to update existing code comments across a directory is to run the comment-code command with the directory path. It performs code analysis and automated documentation updates to enhance overall code quality and structure.

Are there limitations when adding JSDoc-style documentation to Python files?

Limitations when adding JSDoc-style documentation depend on the accuracy of Python introspection and available dependency information. If boundary identification or package version analysis lacks sufficient context, the automated documentation updates may be incomplete.