comment-layout-and-formatting

Applies appropriate indentation and spacing rules to code comments to improve readability and preserve the code’s visual structure. Intended for use when writing or formatting code comments or when defining code style guidelines.

Last repository push
GitHub Stars
140
Forks
36
Issues / PRs
1

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "comment-layout-and-formatting" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-87cf2564d970e08728bdbdc8ed5b8c7e54d7bc16d817f030535521d0b0619f28. Verify the upstream source and version against https://github.com/kitchen-engineer42/pdf2skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Applies appropriate indentation and spacing rules to code comments to improve readability and preserve the code’s visual structure. Intended for use when writing or formatting code comments or when defining code style guidelines.

0 Downloads

Introduction source: third_party · kitchen-engineer42 · 0.0.1 Reference

SkillPi interpretation

Tasks
Apply proper indentation and spacing rules to code comments to enhance readability and maintain code visual structure. Use when writing or formatting comments within code blocks, or when establishing code style guidelines.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: comment-layout-and-formatting
description: Apply proper indentation and spacing rules to code comments to enhance readability and maintain code visual structure. Use when writing or formatting comments within code blocks, or when establishing code style guidelines.

Comment Layout and Formatting

Apply these rules to ensure comments enhance rather than disrupt code readability.

Comment Indentation

When to apply: When writing or formatting code comments (excluding end-of-line comments)

  1. Align comments with the code they describe using the same indentation level
  2. Ensure comments do not obscure the visual indentation structure of the code
  3. Maintain visual hierarchy to help readers understand program logic structure

Rationale: Research (Shneiderman 1980) shows comments that interfere with visual scanning reduce their effectiveness. Good comment style should enhance, not disrupt, visual structure.

Comment Spacing

When to apply: When separating code blocks or emphasizing comments

  1. Place at least one blank line before each comment to separate it from code
  2. Optional: Use blank lines both before and after comments (two total)
    • Pros: Better visual effect, easier to scan
    • Cons: Consumes more display space
  3. Decision is primarily aesthetic unless display space is extremely limited

Core principle: Having a consistent convention is more important than the specific details of the convention.

Result

  • Code logical structure remains clearly visible
  • Comments are visually separated from code
  • Comments align with their corresponding code blocks

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value65/100

Highlights

  • 提供代码注释缩进与间距的实用规范,提升代码可读性
  • 适用于开发者日常编码和制定团队风格指南
Trigger Precision85/100

Highlights

  • 触发场景描述清晰,覆盖编写注释和制定规范两种主要使用情境
Structure and Standards75/100

Areas to improve

  • 缺少端到端代码示例 Reported severity: Minor

    文档提供了详细的规则和原理,但缺少 before/after 的实际代码示例来直观展示规范效果。

    Recommendation: 建议添加 1-2 个完整的代码片段示例,展示不规范注释与规范注释的对比,帮助用户更直观理解规则应用。

Highlights

  • 结构清晰,分 Indentation 和 Spacing 两大部分
  • 每部分包含适用场景、具体规则和原理解释
  • 强调了统一规范的重要性
Execution Reliability90/100

Highlights

  • 纯文档指导型 Skill,无外部依赖和执行风险
  • 内容逻辑自洽,基于可读性研究,具有实践指导价值
Evidence Verifiability (mean of the first four)79/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.