class-organization-and-layout
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.
Best use case
class-organization-and-layout is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using class-organization-and-layout should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/class-organization-and-layout/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How class-organization-and-layout Compares
| Feature / Agent | class-organization-and-layout | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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: 1. Header comment: Describes the class and provides overall usage instructions 2. Constructors and destructors 3. Public routines 4. Protected routines 5. Private routines and member data ## Class Implementation Member Order **When to apply:** When implementing classes in source files Organize class implementation in this order: 1. Header comment: Describes the file contents 2. Class data 3. Public routines 4. Protected routines 5. Private routines ## File-to-Class Relationship **When to apply:** When organizing project files (in languages that support multiple source files) 1. **Single responsibility:** Each file should contain routines supporting a single, unique purpose 2. **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) 3. **File naming:** Relate filename to class name (e.g., `CustomerAccount` class → `CustomerAccount.cpp` and `CustomerAccount.h`) 4. **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 1. Use multiple blank lines to clearly identify and separate each class 2. **Avoid over-emphasis:** - Don't mark every routine and comment with asterisk lines - When everything is emphasized, nothing is truly emphasized 3. **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
Related Skills
frontend-style-layout
Apply consistent styling and layout patterns with Tailwind v4. Use when building page layouts, choosing spacing methods, implementing responsive images, or migrating Tailwind v3 classes to v4. Covers Section Compound Pattern, spacing selection, CLS-free responsive images, and v4 class changes.
cc-routine-and-class-design
Evaluate routine and class design quality using Code Complete checklists (43 items). Use when designing routines or classes, reviewing class interfaces, choosing between inheritance and containment, or evaluating routine cohesion. Also trigger when tempted to use inheritance as a quick fix under deadline pressure, or when rationalizing 'but it works' for code with deep inheritance or many parameters. Produce severity-tagged reviews (VIOLATION/WARNING/PASS) in CHECKER mode or design decisions in APPLIER mode. Symptoms: vague routine names, >7 parameters, deep inheritance, mixed abstraction levels.
avalonia-layout-zafiro
Guidelines for modern Avalonia UI layout using Zafiro.Avalonia, emphasizing shared styles, generic components, and avoiding XAML redundancy.
agent-sessions-layout
Agent Sessions workbench layout — covers the fixed layout structure, grid configuration, part visibility, editor modal, titlebar, sidebar footer, and implementation requirements. Use when implementing features or fixing issues in the Agent Sessions workbench layout.
resilience-classify
Research and classify stablecoins for resilience sub-factor overrides (chainRisk, collateralQuality, custodyModel). Run after types/defaults are implemented to identify coins needing explicit overrides.
import-organization
Order imports by: built-in modules, external packages, internal modules, relative imports Use when maintaining consistent code style. Style category skill.
globalexceptionhandler-class
Structure of GlobalExceptionHandler class.
entity-class-conventions
Sets the standards for entity class design including annotations, ID generation strategies, and relationship configurations for database interaction.
corearena-classes-rewards
Troubleshooting class selection, tier upgrades, experience, and nugget economy
SkipClass
This skill should be used when the user asks to "convert lecture recordings into notes", "transcribe class videos", "match transcripts to slides", "summarize a lecture from recording and slides", or "generate lecture notes with notifications and TODOs".
apiresponse-class
Structure of ApiResponse class.
api-organization
Explains the standardized API organization pattern for this codebase. Use when creating new API endpoints, API clients, or modifying existing API structure. Covers the 5-file system (endpoint-types, endpoints, api-client, admin-api-client, protected-endpoints), role-based access patterns (admin vs regular users), and TypeScript type safety across the API layer. All API code lives in src/lib/api/ following this exact pattern.