smithery.ai

detailed-commenter

Ensures all code written or modified has detailed comments. Invoke when writing code to add comprehensive documentation in the user's preferred language.

First seen Apr 8, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,257 B
  • docs SUMMARY.md 179 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Detailed Commenter

This skill ensures that all code generated or modified includes detailed and comprehensive comments.

Instructions

When writing or modifying code, you MUST:

  1. Class-Level Comments: Add a detailed description above every class explaining its purpose, usage, and any key concepts.
  2. Method-Level Comments: Add a description above every method explaining what it does, its parameters, return values, and any side effects.
  3. Inline Comments: Add comments inside methods to explain complex logic, key steps, or specific variable assignments.
  4. Language: Use the same language as the user's request (or the existing project language) for comments. Since the user specifically requested this in Chinese context, prioritize Chinese comments unless instructed otherwise.

Guidelines

  • Be Verbose: It is better to over-explain than under-explain.
  • Explain 'Why': Don't just explain what the code does (which is visible), explain why it does it that way.
  • Update Comments: If you modify code, ensure the surrounding comments are updated to reflect the changes.

Example (Dart/Flutter)

/// 瀑布流内容网格 Widget
/// 使用 flutter_staggered_grid_view 实现不等高的卡片布局
class FeedGrid extends StatelessWidget {
  const FeedGrid({super.key});

  @override
  Widget build(BuildContext context) {
    // 模拟的数据列表
    // 包含高度、标题、热度等信息
    final List<Map<String, dynamic>> items = [
      {'height': 200.0, 'title': '妆容教程', 'likes': '1.2w'},
    ];

    return SliverPadding(
      padding: const EdgeInsets.symmetric(horizontal: 16),
      // 使用 MasonryGrid 实现交错布局
      sliver: SliverMasonryGrid.count(
        crossAxisCount: 2, // 设置两列
        mainAxisSpacing: 16, // 主轴间距
        crossAxisSpacing: 16, // 交叉轴间距
        childCount: items.length,
        itemBuilder: (context, index) {
          return _buildFeedCard(items[index]);
        },
      ),
    );
  }
}