file-organization-and-structure
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 "file-organization-and-structure" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-7db9f53789a7b376ad363b9f5a2298371080592276879cb205701376108494f9. 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
Separate routines in files with blank lines, consider alphabetical ordering where appropriate, and follow standard C++ file structure. Suitable for organizing source files, when the language lacks class-based organization, or when editor navigation is limited.
Introduction source: third_party · kitchen-engineer42 · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Organize routines within files using blank line separation, consider alphabetical ordering when appropriate, and follow C++ standard file structure. Use when organizing source files, when language doesn't support class-based organization, or when editor navigation is limited.
- Testing
- Not tested
Browse files
Frontmatter
name: file-organization-and-structure
description: Organize routines within files using blank line separation, consider alphabetical ordering when appropriate, and follow C++ standard file structure. Use when organizing source files, when language doesn't support class-based organization, or when editor navigation is limited.File Organization and Structure
Apply these principles to create well-organized source files.
Routine Separation Within Files
When to apply: When a file contains multiple routines
- Use at least two blank lines to separate each routine from others
- Visual distinction:
- Use two to three blank lines to create visual difference from internal routine spacing
- Blank lines are as effective as asterisk or dash lines, and easier to input and maintain
Routine Ordering Strategy
When to apply: When organizing routines within a file and no stronger principle applies
- Alternative approach: Arrange related routines alphabetically
- Applicable scenarios:
- Programs cannot be decomposed into classes
- Editor doesn't allow easy function lookup
- Advantage: Saves search time
C++ Source File Content Order
When to apply: When organizing C++ source files
Follow this typical order for C++ source file contents:
- File description comment
#includefiles- Constant definitions applicable to multiple classes (if file contains multiple classes)
- Enums applicable to multiple classes (if file contains multiple classes)
- Macro function definitions
- Type definitions applicable to multiple classes (if file contains multiple classes)
- Imported global variables and functions
- Exported global variables and functions
- File-private variables and functions
- Classes, including constant definitions, enums, and type definitions within each class
Result
- Routine boundaries are clearly visible
- File structure follows consistent conventions
- Code is easier to navigate and maintain
Current listing version
0.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 C++ 源文件组织的实用指导原则
- 适用于多种开发场景,包括编辑器功能受限的情况
Highlights
- 触发描述清晰明确,覆盖多种变体场景
- 边界清晰,不易与其他 Skill 重叠
Areas to improve
-
缺少明确的出口条件描述 Reported severity: Minor
文档中未明确说明何时停止应用这些组织原则
Recommendation: 建议补充出口条件说明,如'当文件规模过大时应考虑拆分为多个文件'
Highlights
- Phase/步骤清晰,有 When to apply 说明
- frontmatter 完整,结构合理
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.