clean-code

Enforce pragmatic coding standards for maintainable software development.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/ofelixdev/cc-kit --skill clean-code-ofelixdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/ofelixdev/cc-kit/tree/main/template/skills/clean-code
Command: npx skills add https://github.com/ofelixdev/cc-kit --skill clean-code-ofelixdev

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 Ain't Gonna Need It, and the Boy Scout Rule.
  • Standardizes Naming Conventions: Guides clear and intent-revealing names for variables, functions, and constants.
  • Optimizes Function Design: Encourages small, focused functions with minimal arguments and no side effects.
  • Promotes Clean Code Structure: Advocates for guard clauses, flat code, and composition over deep nesting.
  • AI Coding Style Guidelines: Provides direct instructions for AI agents on how to interact with users and handle tasks.
  • Pre-edit Checks: Mandates thinking about dependencies and potential impacts before editing any file.
  • Post-completion Self-Check: Requires rigorous verification of goals, code functionality, and error-free status before task completion.
  • Script Output Handling: Defines a strict protocol for running, parsing, summarizing, and acting upon validation script outputs.

Quick Start

Use the clean-code skill to refactor the provided function to adhere to the Single Responsibility Principle.

Frequently Asked Questions about clean-code

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

FAQPage Schema
How do I refactor code to follow clean code principles like SRP and DRY?

To refactor code for clean code principles, enforce pragmatic standards focusing on Single Responsibility and Don't Repeat Yourself. This involves standardizing naming conventions, optimizing functions to be small with minimal arguments, and promoting flat code structures with guard clauses.

What is the best way to maintain coding standards and avoid over-engineering?

The best way to maintain coding standards and avoid over-engineering is to apply the KISS and YAGNI principles. By enforcing concise, direct code modifications and removing unnecessary comments, you ensure long-term maintainability and developer productivity.

Can I use clean code guidelines to enforce function design and naming conventions?

Yes, clean code guidelines enforce function design by requiring small, focused functions with no side effects. They also standardize naming conventions to ensure variables and constants are clear and intent-revealing for better software maintainability.

Does the Boy Scout Rule apply when modifying existing code structures?

The Boy Scout Rule directly applies to all code modifications, ensuring you leave the code cleaner than you found it. It mandates pre-edit dependency checks and post-completion self-checks to verify functionality and error-free status before task completion.

How do AI interaction protocols handle script output and code validation?

AI interaction protocols handle script output by defining a strict process to run, parse, summarize, and act upon validation scripts. This ensures code functionality is rigorously verified against goals before any task is marked complete.