self-documenting-code-practices
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "self-documenting-code-practices":https://skillpi.com/zh/skills/deepskill-b97aa8bc7b0b8275057c42f6a0f565ac33305856f7d45af2b9458e94b2b46622。安装前核对上游来源和版本:https://github.com/kitchen-engineer42/pdf2skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
通过良好编程风格应用自文档化代码实践,并评估类设计的抽象质量。适用于编写代码、进行代码审查、设计类接口或制定文档标准的场景。
介绍来源: third_party · kitchen-engineer42 · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: self-documenting-code-practices
description: Apply self-documenting code practices through good programming style and evaluate class design for abstraction quality. Use when writing code, conducting code reviews, designing class interfaces, or establishing documentation standards.Self-Documenting Code Practices
Apply these practices to create code that documents itself through quality design and style.
Documentation Types
External Documentation
- Definition: Information located outside source code listings, typically separate documents or Unit Development Folders (UDF)
- Unit Development Folder (UDF) / Software Development Folder (SDF):
- Informal documentation containing developer notes during construction
- Primary purpose: provide clues about design decisions not recorded elsewhere
- Contents: copies of relevant requirements, top-level design sections, development standards, current code listings, design notes
- Detailed Design Document: Low-level design document describing class-level or routine-level design decisions
Internal Documentation (Programming Style)
- Definition: Documentation located within the program listing itself
- Characteristics: Most detailed documentation type, at source statement level
- Advantage: Most closely tied to code, most likely to remain correct when code is modified
Programming Style as Primary Documentation
Core principle: The primary contributor to code-level documentation is not comments, but good programming style.
Components of good programming style:
- Good program structure
- Straightforward, easy-to-understand methods
- Good variable naming
- Good routine naming
- Use of named constants instead of literals
- Clear layout
- Minimized control flow and data structure complexity
Goal: Achieve "self-documenting code" where the code itself carries most of the documentation burden.
Effect: Good programming style makes code meaning obvious without relying on extensive comments.
Self-Documenting Code Checklist: Classes
When to apply: When designing or reviewing classes
Verify the following points:
- Abstraction consistency: Does the class interface present a consistent abstraction?
- Naming accuracy: Is the class well-named, describing its core purpose?
- Interface intuitiveness: Does the class interface clearly indicate how to use it?
- Abstraction level: Is the interface abstract enough that users don't need to consider implementation details?
- Black-box property: Can the class be treated as a black box?
Action: If any answer is "no," refactor the class design.
Result
- Code is self-explanatory and easy to understand
- Class interfaces present clean abstractions
- Documentation burden is reduced through quality design
- Code is easier to maintain and modify
当前收录版本
0.0.1
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供自文档化代码的完整方法论,涵盖外部与内部文档类型
- 针对类设计的抽象质量提供可操作的检查清单
- 适用于代码编写、审查、接口设计等多个高频开发场景
亮点
- description 明确列出四大适用场景,边界清晰
- 触发词覆盖充分,无明显误触或漏触风险
待提升项
-
缺少独立 When to Use 章节及端到端示例 原报告严重程度:轻微
文档结构良好但未设置独立的 When to Use 章节,且缺乏完整的端到端使用示例
改进建议:建议增加独立的 When to Use 章节并补充一个完整的端到端示例以增强可操作性
亮点
- frontmatter 完整,章节划分清晰
- Checklist 提供明确的出口条件和行动指引
亮点
- 内容为方法论指导,无需外部依赖,执行路径清晰
- 所有建议均为可验证的最佳实践,无不可逆操作风险
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。