Agent skill
routine-layout-and-structure
Format routine parameters using standard indentation and organize routine internal structure with blank lines. Use when defining functions with multi-line parameters, writing routine implementations, or establishing coding standards for function formatting.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/routine-layout-and-structure
SKILL.md
Routine Layout and Structure
Apply these formatting rules to improve routine readability and maintainability.
Routine Parameter Layout
When to apply: When routine parameters cannot fit on a single line
- Use standard indentation for multi-line parameter lists
- Place each parameter on a new line
- Vertically align parameters using standard indentation
Avoid "Endline Layout":
- Endline layout attempts to align parameters to the right edge
- High maintenance cost: changing function name length requires reformatting all parameter lines
- Can cause right-side space limitations
Advantages of standard indentation:
- Better accuracy, consistency, readability, and maintainability
- Function name changes don't affect parameter layout
- Adding or removing parameters requires modifying only one line
Routine Internal Structure
When to apply: When writing routine implementations with declarations and executable code
Use blank lines to separate logical parts of the routine:
- After the routine header
- Around data declarations and named constant declarations (if present)
- Before the routine body
Purpose: Clearly delineate the logical components (header, declarations, body) of the routine.
Result
- Parameter lists are clear and easy to maintain
- Routine structure is visually organized with clear section boundaries
- Code modifications don't cascade formatting changes
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?