clean-code

Enforce pragmatic coding standards with pre-editing checks and verification scripts.

Updated Mar 2, 2026
One-click install
npx skills add https://github.com/vitoropereira/claude-starter-kit --skill clean-code-vitoropereira
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/vitoropereira/claude-starter-kit/tree/main/.claude/skills/quality/clean-code
Command: npx skills add https://github.com/vitoropereira/claude-starter-kit --skill clean-code-vitoropereira

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enforces pragmatic coding standards to ensure code is concise, direct, and avoids over-engineering or unnecessary comments, leading to more maintainable and understandable software.

Core Features & Use Cases

  • Enforces SOLID principles: Promotes Single Responsibility, Don't Repeat Yourself, Keep It Simple, You Aren't Gonna Need It, and the Boy Scout Rule.
  • Standardizes Naming Conventions: Ensures clear and intent-revealing names for variables, functions, booleans, and constants.
  • Optimizes Function Design: Guides the creation of small, focused functions with minimal arguments and no side effects.
  • Promotes Clean Code Structure: Encourages guard clauses, flat code, composition, and colocation.
  • Defines AI Coding Style: Provides clear actions for feature requests, bug fixes, and unclear requirements.
  • Identifies and Avoids Anti-Patterns: Lists common pitfalls and their solutions.
  • Mandates Pre-Editing Checks: Ensures thorough consideration of dependencies and impact before file modifications.
  • Includes Verification Scripts: Lists mandatory scripts for linting, type checking, and other quality assurance measures.

Quick Start

Apply the clean-code skill to refactor the provided code snippet according to pragmatic coding standards.

Frequently Asked Questions about clean-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce clean code standards when refactoring existing code?

To enforce clean code standards during refactoring, apply principles like SRP, DRY, KISS, and YAGNI. This ensures refactored code remains concise, direct, and maintainable while avoiding over-engineering and unnecessary comments.

What are the pragmatic coding standards for improving code maintainability?

Pragmatic coding standards for maintainability include standardizing naming conventions, optimizing functions to be small with minimal arguments, and using guard clauses. These rules prevent side effects and promote clean code structure.

How do I apply the Boy Scout Rule to software development tasks?

Apply the Boy Scout Rule by leaving code cleaner than found during feature requests or bug fixes. This involves performing pre-editing checks to assess dependencies and impact before modifying files.

What are common clean code anti-patterns and how do I avoid them?

Common clean code anti-patterns include deep nesting, large functions with side effects, and unclear naming. Avoid them by using flat code, composition, guard clauses, and intent-revealing variable names.

Do I need verification scripts to maintain coding standards?

Yes, verification scripts are required to maintain coding standards. Run mandatory scripts for linting, type checking, and quality assurance to ensure code adherence before finalizing edits.