class-organization-and-layout
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 "class-organization-and-layout" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-6af44d0c434199f43d903d6724a733808f2175b2c6aeaaff3108bad4335aa7c0. 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
Organize class members in a standard order, separate classes with blank lines, and maintain one-class-per-file structure. Applicable when designing class interfaces and implementations, organizing project files, or establishing object-oriented coding conventions.
Introduction source: third_party · kitchen-engineer42 · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Organize class members in standard order, separate classes with blank lines, and maintain one-class-per-file structure. Use when designing class interfaces, implementing classes, organizing project files, or establishing OOP coding standards.
- Testing
- Not tested
Browse files
Frontmatter
name: class-organization-and-layout
description: Organize class members in standard order, separate classes with blank lines, and maintain one-class-per-file structure. Use when designing class interfaces, implementing classes, organizing project files, or establishing OOP coding standards.Class Organization and Layout
Apply these principles to create consistent, maintainable class structures.
Class Interface Member Order
When to apply: When defining class interfaces in header files
Present class members in this order:
- Header comment: Describes the class and provides overall usage instructions
- Constructors and destructors
- Public routines
- Protected routines
- Private routines and member data
Class Implementation Member Order
When to apply: When implementing classes in source files
Organize class implementation in this order:
- Header comment: Describes the file contents
- Class data
- Public routines
- Protected routines
- Private routines
File-to-Class Relationship
When to apply: When organizing project files (in languages that support multiple source files)
- Single responsibility: Each file should contain routines supporting a single, unique purpose
- One-to-one relationship:
- Place only one class per file when language permits (C++, Java, VB)
- Exception: compelling reasons exist (e.g., several small classes forming a single pattern)
- File naming: Relate filename to class name (e.g.,
CustomerAccountclass →CustomerAccount.cppandCustomerAccount.h) - Concept reinforcement: Files reinforce that grouped routines belong to the same class
Class Visual Separation
When to apply: When separating different classes within a file
- Use multiple blank lines to clearly identify and separate each class
- Avoid over-emphasis:
- Don't mark every routine and comment with asterisk lines
- When everything is emphasized, nothing is truly emphasized
- Hierarchical separation (if special characters must be used):
- Establish character hierarchy (densest to sparsest)
- Example: Asterisks for class separation, dashes for routine separation, blank lines for important comments
- Never place two lines of asterisks or dashes together
Principle: In formatting, less is more.
Result
- Class boundaries are clearly visible
- Visual noise is minimized
- File structure reinforces class organization
- Members follow consistent ordering conventions
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 适用于面向对象编程的多个关键场景,包括类接口设计、实现、项目文件组织等
- 提供了清晰的类成员排序规范和文件组织原则
Highlights
- 触发词覆盖全面,包含designing class interfaces、implementing classes、organizing project files等多种变体
- 边界清晰,不易与其他Skill重叠
Highlights
- 结构清晰,分章节明确,每个部分都有When to apply门控
- 提供了具体的示例和最佳实践,便于理解执行
Areas to improve
-
缺少对不可逆操作的确认机制说明 Reported severity: Minor
文档中未提及在执行类重构或文件重组织时的确认机制
Recommendation: 建议在File-to-Class Relationship部分增加对大规模重构操作的确认提示
Highlights
- 工具来源明确,参数正确,覆盖主要异常情况
- 提供了清晰的执行步骤和最佳实践
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.
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.
User discussion
No verified reviews yet.