comment-style

Guides Python comment formatting with style rules for inline, block, and section dividers.

1|Updated Feb 18, 2024
One-click install
npx skills add https://github.com/jhnhnck/attu-bot --skill comment-style-jhnhnck
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: comment-style
Source: https://github.com/jhnhnck/attu-bot/tree/main/.claude/skills/comment-style
Command: npx skills add https://github.com/jhnhnck/attu-bot --skill comment-style-jhnhnck

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides clear guidelines for writing consistent, readable, and maintainable Python comments, helping developers adhere to best practices.

Core Features & Use Cases

  • Comment Formatting Rules: Enforces lowercase, brief inline comments, proper section dividers, and appropriate tag usage like TODO, NOTE, and FIXME.
  • Comment Style Guidance: Offers examples of good versus bad comments, illustrating proper line and block comment syntax.
  • Operational Consistency: Ensures comments focus on why rather than what, improving code comprehension and collaboration.

Quick Start

When editing Python files, follow the authoritative comment style to maintain code clarity and consistency.

Frequently Asked Questions about comment-style

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

FAQPage Schema
What are the best practices for writing Python comments in a collaborative environment?

Best practices for Python comments involve using lowercase, brief inline comments and proper section dividers to improve code readability. Comments should focus on the 'why' rather than the 'what', utilizing tags like TODO, NOTE, and FIXME for operational consistency.

How do I format block comments and section dividers in Python?

Format Python block comments and section dividers using standard line syntax to logically separate code modules. This ensures comments remain clear and consistent, avoiding unnecessary or redundant explanations while maintaining operational consistency across the codebase.

When should I use TODO, NOTE, and FIXME tags in my code comments?

Use TODO, NOTE, and FIXME tags to highlight specific maintenance tasks, important context, or known issues within the code. Apply these special tags alongside standard inline and block comments to signal areas requiring future resolution or attention.

What is the difference between good and bad Python comments?

Good Python comments explain the underlying intent and use proper syntax for block and inline formats. Bad comments are redundant, merely state the obvious, or clutter the codebase without adding meaningful context for collaborative maintenance.

How do I avoid redundant comments when writing Python code?

Avoid redundant Python comments by ensuring they explain the 'why' rather than the 'what'. Standardizing your style helps eliminate unnecessary explanations that simply restate the code, keeping the codebase clean and focused on maintainability.