clean-code

Enforce pragmatic coding standards for concise, direct code.

1|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/bthillerup/bens-garage-session-2 --skill clean-code-bthillerup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/bthillerup/bens-garage-session-2/tree/main/.github/skills/clean-code
Command: npx skills add https://github.com/bthillerup/bens-garage-session-2 --skill clean-code-bthillerup

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 complexity.

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: Ensures clear and intent-revealing names for variables, functions, booleans, and constants.
  • Optimizes Function Design: Guides developers to write small, focused functions with minimal arguments and no side effects.
  • Promotes Clean Code Structure: Encourages guard clauses, flat code, composition, and colocation.
  • AI Coding Style Guidelines: Provides specific actions for AI agents when handling user requests, bug reports, or unclear requirements.
  • Pre-edit Checks: Mandates a thinking process before editing any file, considering dependencies and potential impacts.
  • Post-completion Self-Check: Ensures all tasks are met, code works, and no errors are left behind.
  • Mandatory Script Verification: Outlines specific scripts for different agents to run for validation.

Quick Start

Apply the clean code principles to refactor the provided code snippet for improved readability and maintainability.

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 with clean code principles, enforce Single Responsibility and Don't Repeat Yourself rules by standardizing naming conventions, optimizing function design for minimal arguments, and promoting flat structure patterns.

What are the best practices for writing clean, pragmatic code without over-engineering?

Best practices for pragmatic clean code involve applying KISS and YAGNI principles to avoid over-engineering, using intent-revealing names, writing small focused functions without side effects, and following the Boy Scout Rule.

How do I apply SOLID coding standards to improve readability and maintainability?

Apply SOLID coding standards by enforcing concise function design with guard clauses, ensuring clear naming conventions for variables and booleans, and structuring code through composition and colocation for maintainability.

Can I use these coding standards to guide AI agents during code development?

Yes, these coding standards provide specific AI coding style guidelines for handling user requests and bug reports, mandating pre-edit thinking processes to evaluate dependencies and post-completion self-checks to verify code works without errors.

Does following clean code structure patterns require running specific validation scripts?

Following clean code structure patterns mandates running specific validation scripts outlined for different agents to verify code, ensuring all tasks are met and no errors are left behind after development.