comment-layout-and-formatting
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "comment-layout-and-formatting":https://skillpi.com/zh/skills/deepskill-87cf2564d970e08728bdbdc8ed5b8c7e54d7bc16d817f030535521d0b0619f28。安装前核对上游来源和版本:https://github.com/kitchen-engineer42/pdf2skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
在代码注释中应用合适的缩进和间距规则,以增强可读性并维护代码的视觉结构。适用于编写或格式化代码注释和制定代码风格规范的场景。
介绍来源: third_party · kitchen-engineer42 · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
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)
- Align comments with the code they describe using the same indentation level
- Ensure comments do not obscure the visual indentation structure of the code
- 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
- Place at least one blank line before each comment to separate it from code
- Optional: Use blank lines both before and after comments (two total)
- Pros: Better visual effect, easier to scan
- Cons: Consumes more display space
- 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
当前收录版本
0.0.1
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供代码注释缩进与间距的实用规范,提升代码可读性
- 适用于开发者日常编码和制定团队风格指南
亮点
- 触发场景描述清晰,覆盖编写注释和制定规范两种主要使用情境
待提升项
-
缺少端到端代码示例 原报告严重程度:轻微
文档提供了详细的规则和原理,但缺少 before/after 的实际代码示例来直观展示规范效果。
改进建议:建议添加 1-2 个完整的代码片段示例,展示不规范注释与规范注释的对比,帮助用户更直观理解规则应用。
亮点
- 结构清晰,分 Indentation 和 Spacing 两大部分
- 每部分包含适用场景、具体规则和原理解释
- 强调了统一规范的重要性
亮点
- 纯文档指导型 Skill,无外部依赖和执行风险
- 内容逻辑自洽,基于可读性研究,具有实践指导价值
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。