
Clean Code
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
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 -yInstalls 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
| Principle | Rule |
|---|---|
| SRP | Single Responsibility - each function/class does ONE thing |
| DRY | Don't Repeat Yourself - extract duplicates, reuse |
| KISS | Keep It Simple - simplest solution that works |
| YAGNI | You Aren't Gonna Need It - don't build unused features |
| Boy Scout | Leave code cleaner than you found it |
Naming Rules
| Element | Convention |
|---|---|
| Variables | Reveal intent: userCount not n |
| Functions | Verb + noun: getUserById() not user() |
| Booleans | Question form: isActive, hasPermission, canEdit |
| Constants | SCREAMING_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- Scientific Critical Thinking1.1K
- Matplotlib1.1K
- Scientific Brainstorming1.1K
- Mui1.1K
- Modal Serverless Gpu1.1K
- Ceo Advisor1.1K
- Plotly1.1K
- Conversation Memory1K
- Senior Prompt Engineer1K
- Senior Security989
- Agile Product Owner987
- Code Reviewer979
- Quality Documentation Manager971
- Xlsx954
- Modal923
- Docker Expert900
- Pptx893
- Security Compliance849
- Senior Ml Engineer801
- Devops Iac Engineer785
- Copywriting777
- Statistical Analysis770
- Marketing Ideas769
- Browser Automation756
Similar to Clean Code
More Code Review & Quality
software-architecturedavila7/claude-code-templates534 installsQuality-focused architecture guidance applying Clean Architecture and Domain-Driven Design to code and design decisions.
code-simplifierpproenca/dot-skills1.6K installsConcise guide that simplifies recently modified code while preserving exact behavior across 47 rules.
coding-standardsaffaan-m/ecc7.5K installsBaseline cross-project coding conventions for naming, immutability, readability, and code-quality review.
karpathy-guidelinesmultica-ai/andrej-karpathy-skills47.2K installsBehavioral guidelines that steer LLM coding toward simpler, surgical, verifiable changes.
refactorpproenca/dot-skills661 installsStructured refactoring guide of 43 rules across eight prioritized categories, drawn from Fowler's catalog and Clean Code.