Clean Code

Enforce naming, function design, and comment conventions for readable code.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/daniel-heydari-dev/personal-ai-skills --skill clean-code-daniel-heydari-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Clean Code
Source: https://github.com/daniel-heydari-dev/personal-ai-skills/tree/main/templates/claude/.claude/skills/clean-code
Command: npx skills add https://github.com/daniel-heydari-dev/personal-ai-skills --skill clean-code-daniel-heydari-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers write code that is easier to read, understand, and maintain, reducing bugs and improving collaboration.

Core Features & Use Cases

  • Naming Conventions: Enforces clear and descriptive naming for variables, functions, and classes.
  • Function Design: Promotes small, single-responsibility functions with limited parameters.
  • Comment Best Practices: Guides on when and how to use comments effectively, prioritizing self-documenting code.
  • Code Organization: Recommends logical grouping and ordering of code elements within files.
  • Magic Values: Encourages the use of named constants and enums instead of hardcoded numbers and strings.
  • Simplicity (KISS): Advocates for the simplest effective solution, avoiding premature optimization or abstraction.

Quick Start

Apply the clean code principles to the provided code snippet.

Frequently Asked Questions about Clean Code

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

FAQPage Schema
How do I write readable and maintainable code?

To write readable and maintainable code, enforce clear naming conventions, design small single-responsibility functions, and use named constants instead of hardcoded magic numbers to reduce technical debt.

What are clean code best practices for function design?

Clean code best practices for function design involve creating small, single-responsibility functions with limited parameters to ensure simplicity and improve overall code maintainability.

When should I use comments vs self-documenting code?

You should prioritize self-documenting code through clear naming and simple logic, using comments only to explain necessary context rather than compensating for poor code readability.

How do I eliminate magic numbers and strings in my codebase?

Eliminate magic numbers and strings by replacing hardcoded values with named constants and enums, which improves code readability and prevents scattered, unmanageable technical debt.

Does applying clean code standards help with refactoring?

Applying clean code standards helps with refactoring by promoting the KISS principle—advocating for the simplest effective solution—which makes existing code easier to understand and modify.