clean-code

Enforce pragmatic coding standards for concise, maintainable code.

Updated Aug 30, 2024
One-click install
npx skills add https://github.com/jfrometa/esquizo --skill clean-code-jfrometa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/jfrometa/esquizo/tree/main/.agent/skills/clean-code
Command: npx skills add https://github.com/jfrometa/esquizo --skill clean-code-jfrometa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pragmatic coding standards help developers write concise, direct, and maintainable code, reducing unnecessary complexity and excessive comments.

Core Features & Use Cases

  • Enforces SRP, DRY, KISS, and YAGNI to keep code simple and focused.
  • Guides naming, structure, and anti-pattern avoidance across typical tasks like feature implementation, bug fixes, and code reviews.
  • Provides actionable best practices that can be adopted incrementally in existing projects.

Quick Start

  • Review the current module and identify long, multi-purpose functions; refactor into smaller, single-responsibility units.
  • Remove duplicate logic by extracting reusable components or utilities (DRY).
  • Rename ambiguous variables and functions to clearly express intent; replace vague comments with precise names where possible.

Frequently Asked Questions about clean-code

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

FAQPage Schema
What are the best practices for refactoring code to improve maintainability?

Code refactoring for maintainability involves breaking down long functions into single-responsibility units, removing duplicate logic, and replacing vague comments with precise naming.

How do I apply DRY and KISS principles during a code review?

Apply DRY and KISS during code reviews by identifying multi-purpose functions, extracting reusable components to eliminate duplication, and renaming ambiguous variables to clearly express intent.

What is the Single Responsibility Principle and how does it reduce side effects?

The Single Responsibility Principle ensures each function handles one task, which minimizes side effects and creates modular, robust structures that are easier to maintain and debug.

How do I start cleaning up an existing codebase with excessive comments and complex functions?

Start cleaning an existing codebase by reviewing current modules, refactoring complex multi-purpose functions into smaller units, and replacing vague comments with self-explanatory, precise names.

Does clean code require specific frameworks or dependencies to implement?

Clean code standards do not require specific frameworks or dependencies, allowing developers to apply pragmatic modularization and guard clauses directly within existing software projects.