dev-code-quality

Code Quality Standards. Use it everytime you plan or implement any code.

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026⬇️1downloads

When & Why to Use This Skill

This Claude skill serves as a comprehensive framework for maintaining high-level code quality and technical excellence. It enforces universal programming standards—including naming conventions, function design, and error handling—to ensure that every piece of code is readable, maintainable, and scalable. By integrating these best practices into the development workflow, it helps developers eliminate technical debt and adhere to 'Clean Code' principles from the planning phase through implementation.

Use Cases

  • Initial Code Implementation: Use the skill during the coding phase to ensure naming conventions and function structures follow professional standards from the start.
  • Automated Code Audits: Apply the guidelines to existing code snippets to identify and fix issues like 'magic numbers,' excessive function parameters, or poor error handling.
  • Refactoring Legacy Code: Systematically improve older codebases by reorganizing logic, extracting constants, and converting complex methods into pure functions.
  • Standardizing Team Workflows: Establish a consistent coding style across a development team to reduce cognitive load during peer reviews and improve long-term maintainability.
  • Technical Documentation and Commenting: Optimize code readability by applying the 'why, not what' commenting philosophy and ensuring self-documenting code structures.
namedev-code-quality
descriptionCode Quality Standards. Use it everytime you plan or implement any code.

Universal Code Quality Standards

Naming Conventions (adapt to language case style)

  • Classes/Types: nouns that represent concepts
  • Functions/Methods: verbs that describe actions
  • Booleans: questions (is/has/can/should)
  • Constants: descriptive, not abbreviated
  • Avoid: abbreviations, single letters (except i,j for loops), mental mapping

Function Design

  • Single responsibility
  • Maximum 3-4 parameters
  • One level of abstraction
  • No side effects unless name indicates
  • Early returns for guard clauses
  • Pure functions when possible

Code Organization

  • Group related code together
  • Order: public before private
  • Most important/high-level code first
  • Dependencies at top

Comments

  • Why, not what (code explains what)
  • Explain non-obvious business rules
  • Document gotchas and workarounds
  • Keep comments updated with code
  • Prefer self-documenting code over comments

Error Handling

  • Fail fast, fail clearly
  • Specific error types
  • Include context in error messages
  • Don't swallow exceptions
  • Log appropriately

Magic Numbers

  • Extract to named constants
  • Explain the meaning, not just the value