clean-code

Enforce coding standards for concise, readable, maintainable software.

Updated Nov 29, 2025
One-click install
npx skills add https://github.com/thimslugga/agent-skills --skill clean-code-thimslugga
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/thimslugga/agent-skills/tree/main/skills/development/clean-code
Command: npx skills add https://github.com/thimslugga/agent-skills --skill clean-code-thimslugga

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps developers write clear, maintainable code by enforcing pragmatic, concise guidelines and reducing unnecessary complexity and comments.

Core Features & Use Cases

  • Single Responsibility Principle (SRP): Each function or class does ONE thing.
  • Don't Repeat Yourself (DRY): Extract duplicates and promote reuse.
  • Keep It Simple (KISS): Prefer simple, direct solutions over over-engineered ones.
  • YAGNI / Boy Scout Rule: Avoid features not currently needed; leave code cleaner.
  • Naming & Style Guidance: Clear variable and function names; minimal comments.

Quick Start

Run a quick audit on a sample module to identify guideline violations and outline concrete refactor steps.

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 improve readability and maintainability?

To refactor code for readability and maintainability, enforce SRP, DRY, and KISS guidelines. Extract duplicated logic, prefer simple direct solutions over over-engineered ones, and ensure each function does one thing to reduce unnecessary complexity.

What are the best coding standards for writing concise functions?

Coding standards for concise functions include enforcing strict rules for function size, limiting level of nesting, using guard clauses, and applying the Single Responsibility Principle. Clear naming conventions and minimal comments further ensure concise, predictable software behavior.

How do I apply the Boy Scout Rule and YAGNI during software development?

Apply YAGNI by avoiding features not currently needed, and use the Boy Scout Rule to leave code cleaner than you found it. This pragmatic approach reduces unnecessary complexity and ensures safe edits with predictable behavior across daily development tasks.

Why should I avoid anti-patterns and unnecessary comments in my codebase?

Avoiding anti-patterns and unnecessary comments reduces complexity and maintains readability. Pragmatic coding standards prioritize clear variable and function names over explanatory comments, ensuring concise, maintainable software that is easier to review and refactor safely.

Can I run a quick audit to identify clean code violations in a module?

Yes, you can run a quick audit on a sample module to identify coding guideline violations. The audit checks for SRP, DRY, and nesting violations, outlining concrete refactor steps to ensure safe edits and predictable behavior.