| name | Global Coding Style |
| description | Maintain consistent coding style, formatting, and naming conventions across the entire codebase following DRY and YAGNI principles. Use this skill when writing or refactoring any code in any language or framework to ensure consistent indentation, naming patterns, function size, and code organization. Apply this skill when naming variables, functions, classes, or files, when formatting code with proper spacing and line breaks, when removing dead code or unused imports, when extracting duplicated logic into reusable functions, or when ensuring small focused functions that do one thing well. This skill ensures the entire codebase maintains uniform style through automated formatting tools (Prettier, Black, ESLint), follows established naming conventions (camelCase, PascalCase, snake_case), avoids code duplication, removes commented-out code, and prioritizes readability and maintainability over cleverness. |
Global Coding Style
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle global coding style.
When to use this skill
- When writing any new code in any file across the project
- When refactoring existing code to improve readability and maintainability
- When naming variables, functions, classes, files, or modules
- When formatting code (indentation, spacing, line breaks, bracket placement)
- When ensuring consistent naming conventions (camelCase for JS, snake_case for Python, etc.)
- When identifying and extracting duplicated code (DRY principle)
- When removing dead code, commented-out blocks, or unused imports
- When breaking down large functions into smaller, focused single-purpose functions
- When configuring or using code formatters (Prettier, Black, ESLint, RuboCop)
- When setting up linting rules or EditorConfig for the project
- When ensuring code follows team or language-specific style guides
- When deciding whether to build new functionality or use existing solutions (YAGNI principle)
- When avoiding premature optimization or unnecessary abstraction
Instructions
For details, refer to the information provided in this file: global coding style