New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Pragmatic coding standards that enforce small functions, direct fixes, and minimal comments for AI-assisted coding.

skills.sh installs
1.1K
GitHub stars
34.1K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers core principles (SRP, DRY, KISS, YAGNI), naming rules, function limits, code structure, and anti-patterns to avoid
  • Sets concrete limits such as functions under 20 lines, at most 3 arguments, and nesting no deeper than 2 levels
  • Requires checking importers and dependent files before edits, and running lint and type checks before reporting a task complete
  • Includes a script-output workflow that reads results, summarizes errors and warnings, and asks before fixing

Install

$ npx -y skills add davila7/claude-code-templates --skill clean-code -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Clean Code - Pragmatic AI Coding Standards

CRITICAL SKILL - Be concise, direct, and solution-focused.


Core Principles

PrincipleRule
SRPSingle Responsibility - each function/class does ONE thing
DRYDon't Repeat Yourself - extract duplicates, reuse
KISSKeep It Simple - simplest solution that works
YAGNIYou Aren't Gonna Need It - don't build unused features
Boy ScoutLeave code cleaner than you found it

Naming Rules

ElementConvention
VariablesReveal intent: userCount not n
FunctionsVerb + noun: getUserById() not user()
BooleansQuestion form: isActive, hasPermission, canEdit
ConstantsSCREAMING_SNAKE: MAX_RETRY_COUNT

Rule: If you need a comment to explain a name, rename it.


Function Rules

Details

Repository
github.com/davila7/claude-code-templates
Categories
Code Review & Quality, Agent Workflow & Planning
First seen
May 16, 2026

More from davila7/claude-code-templates

All 398

Similar to Clean Code

More Code Review & Quality