Skip to main content
skill

clean-code · davila7 — Claude Code skill: coding standards, install

Gives the agent a set of clean-code rules: small functions, intent-revealing names, no obvious comments, no needless abstraction. Useful when you want working code, not a tutorial.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --skill development/clean-code
Open on GitHub

What clean-code does

The skill lays out the rules the agent follows while writing and editing code. It ships as tables: core principles (single responsibility, DRY, KISS, YAGNI), naming conventions, limits on function size and nesting depth. A separate section lists anti-patterns — a comment on every line, a helper for a one-liner, a factory for two objects, a utils.ts holding a single function.

Before touching any file, the skill makes the agent check what imports it and which tests cover it, then edit the dependent files in the same task. When the work is done, there is a self-check: goal met, all files updated, lint and TypeScript pass. Anything that fails gets fixed before the agent reports back.

The skill also documents a set of verification scripts, but those belong to other skills in the same collection. Each agent runs only its own: ux_audit.py for frontend work, api_validator.py for backend. Without those skills installed the scripts are simply not there, and clean-code runs fine on its own. Tool access is limited to Read, Write and Edit.

What it helps with

  • stop the agent from writing hundred-line functions
  • strip the obvious comments the agent adds to every line
  • rename variables like n and data into something readable
  • check what imports a file before editing it
  • remove abstractions like a factory built for two objects

Example prompts for the agent

  • add a password change endpoint, follow clean-code
  • fix the duplicate email bug, skip the explanation
  • refactor UserService.ts per clean-code and update the dependent files

How to install clean-code

1claude-code-templates

npx claude-code-templates@latest --skill development/clean-code

2Skills CLI (Vercel)

npx skills add davila7/claude-code-templates --skill clean-code -a claude-code

3Manually: put the files in place

~/.claude/skills/clean-code/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/clean-code/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about clean-code

How do I install clean-code in Claude?

With the templates CLI: npx claude-code-templates@latest --skill development/clean-code. Or via the skills CLI: npx skills add davila7/claude-code-templates --skill clean-code -a claude-code. The file lands at ~/.claude/skills/clean-code/SKILL.md.

What does the clean-code skill do?

It sets the coding rules the agent follows: one responsibility per function, clear names, guard clauses instead of deep nesting, no comments that restate the code. It also adds a self-check before the agent calls a task complete.

Does clean-code need Python or the other skills?

No. The verification scripts such as ux_audit.py and api_validator.py belong to other skills in the collection, and the matching agent is the one that runs them.

Similar skills

Everything for Code review and refactoring →

clean-code by other authors comes first.

clean-code sickn33 This skill guides code writing, review, and refactoring around Clean Code principles. Use it for legacy changes, pull requests, and test-focused work. CX Codex +1 12,400installs clean-code wondelai A skill that gives coding agents a readability standard: names that carry intent, small functions, disciplined comments, one error-handling style. CX Codex +1 6,600installs clean-code decebals Guides your coding assistant to write readable code using DRY, KISS, and YAGNI principles. Useful when dealing with bloated methods and vague naming. CX Codex +1 379installs clean-code pproenca A skill that feeds the agent 48 rules on naming, functions, errors and tests, drawn from Robert C. Martin's book with modern fixes. Useful during reviews and refactors. CX Codex +1 842installs clean-code-guard amElnagdy Reviews fresh code against Clean Code and SOLID, flags the mistakes LLMs keep repeating, and runs in three modes: guard pass, live, review. CX Codex +1 4,700installs typescript-clean-code bmad-labs A skill for reviewing and refactoring TypeScript: code smell catalogs, four detection layers, and step-by-step workflows. CX Codex +1 628installs clean-code-principles AsyrafHussin A skill for architecture review and code quality: SOLID, DRY, KISS, design patterns. Useful when refactoring or weighing design decisions. CX Codex +1 1,800installs code-refactoring-refactor-clean sickn33 Analyzes code smells and plans stepwise refactoring based on SOLID and clean code principles. Helps clean tangled modules before introducing new features. CX Codex +1 1,200installs clean-architecture pproenca A skill with 42 rules from Robert C. Martin's book: it tells the agent which way dependencies should point and where layer boundaries belong. CX Codex +1 2,000installs code-simplification addyosmani Simplifies working code without changing its behavior. Use it after a feature passes tests, during review, or when nested logic has become hard to read. CX Codex +1 62,800installs

From the same set205

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor