clean-code
Skill1 starsChanged 12 days agoMITView on GitHub
Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments
108 other projects use a version of this, 14 of them edited.
Adopted by
Most recently taken up by
- sbluemin/fleet-harnesstheir own version, first seen Nov 8, 2026
- nohemi20231/design-skillstheir own version, first seen Nov 8, 2026
- MammadovEshgin/clean-code-skilltheir own version, first seen Nov 8, 2026
- Mahesh-Bishnoi/skillstheir own version, first seen Nov 8, 2026
- Bruno-Cunha-Souza/ValarMindSkillstheir own version, first seen Nov 8, 2026
- kana-consultant/kana-best-practice-engineeringtheir own version, first seen Nov 8, 2026
Used with
Projects with it also use intelligent-routing, nextjs-react-expert and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SKB3002Skillintelligent-routing
Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.
Also in 5 projects that use this
SKB3002Skillnextjs-react-expert
React and Next.js performance optimization from Vercel Engineering. Use when building React components, optimizing performance, eliminating waterfalls, reducing bundle size, reviewing code for performance issues, or implementing server/client-side optimizations.
Also in 3 projects that use this
xfstudioSkillbash-pro
Master of defensive Bash scripting for production automation, CI/CD
Also in 4 projects that use this
xfstudioSkillcode-refactoring-tech-debt
You are a technical debt expert specializing in identifying, quantifying, and prioritizing technical debt in software projects. Analyze the codebase to uncover debt, assess its impact, and create acti
Also in 4 projects that use this
flying-diceSkillclean-code-review
Multi-agent clean code audit — each principle gets its own agent
Also in 3 projects that use this
goca-seSkillbatch-operations
Apply a change safely across many files — refactors touching more than 5 files, library or API migrations, project-wide renames of symbols/imports/paths, or adding boilerplate to many files. Use when "do it all at once" risks context overflow or silent failures.
Also in 3 projects that use this
- +4 more from xfstudio
Other versions108 projects use a version of this.
Word for word · 0
None found.
Edited · 14
- vudovn/ag-kit★ 8.2k88% same
- vudovn/antigravity-kit★ 8.2k88% same
- xenitV1/Antigravity-Workflows★ 13090% same
- VoDaiLocz/kilo-kit-mcp★ 2898% same
- soumatheusgomes/agentville★ 986% same
- xfstudio/skills★ 990% same
- SKB3002/agenthub★ 489% same
- ai4brands-design/claude-skills★ 290% same
- liuchiawei/agent-skills★ 290% same
- miptah21/skills★ 278% same
4 more not listed
Wrote their own version · 94
- superplanehq/superplane★ 9.1ksame name
- Openpanel-dev/openpanel★ 7.3ksame name
- ciembor/agent-rules-books★ 2.8ksame name
- wondelai/skills★ 2.6ksame name
- decebals/claude-code-java★ 763same name
- operately/operately★ 618same name
- liza-mas/liza★ 418same name
- Mindrally/skills★ 275same name
- techygarg/lattice★ 209same name
- GabrielMartinMoran/mind★ 193same name
84 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository199 other files it gives its agents.
- activecampaignSkill
- adcp-advertisingSkill
- admapixSkill
- aegis-auditSkill
- afrexai-compliance-auditSkill
- afrexai-seo-content-engineSkill
- agent-browserSkill
- agentic-codingSkill
- agent-overflowSkill
- agent-skills-toolsSkill
- ai-ppt-generatorSkill
- airdrop-hunterSkill
- ai-web-automationSkill
- alicloud-ai-video-wan-r2vSkill
- alpha-finderSkill
- amap-trafficSkill
- amazon-product-apiSkill
- apertureSkill
- api-developmentSkill
- api-gatewaySkill
- asterSkill
- auto-replySkill
- auto-updaterSkill
- aviation-weatherSkill
- awwwards-designSkill
- base-8004Skill
- bioskillsSkill
- brainrepoSkill
- browserless-agentSkill
- browser-secureSkill
- btc15-autonomous-marketSkill
- buy-anythingSkill
- byteroverSkill
- cal-com-automationSkill
- capability-evolverSkill
- catalogSkill
- chargebeeSkill
- clawcostSkill
- clawdbot-documentation-expertSkill
- clawdbot-for-vcsSkill
- clawddocsSkill
- claw-syncSkill
- claw-trader-liteSkill
- cloudphoneSkill
- cls-certifySkill
- codebergSkill
- code-mentorSkill
- commit-analyzerSkill
- competitor-analysis-reportSkill
- content-ideas-generatorSkill
- content-ideasSkill
- contract-generatorSkill
- conventional-commitsSkill
- copywritingSkill
- crypto-payments-ecommerceSkill
- custom-smtp-senderSkill
- dashboard-manager2Skill
- data-analystSkill
- docker-sandboxSkill
- elite-longterm-memorySkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 101 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 192
Wait for user confirmation: before fixing
“Common” is measured: kept by at least 6 in 10 of the 101 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
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
| Rule | Description |
| Small | Max 20 lines, ideally 5-10 |
| One Thing | Does one thing, does it well |
| One Level | One level of abstraction per function |
| Few Args | Max 3 arguments, prefer 0-2 |
| No Side Effects | Don't mutate inputs unexpectedly |
Code Structure
| Pattern | Apply |
| Guard Clauses | Early returns for edge cases |
| Flat > Nested | Avoid deep nesting (max 2 levels) |
| Composition | Small functions composed together |
| Colocation | Keep related code close |
AI Coding Style
| Situation | Action |
| User asks for feature | Write it directly |
| User reports bug | Fix it, don't explain |
| No clear requirement | Ask, don't assume |
Anti-Patterns (DON'T)
| ❌ Pattern | ✅ Fix |
| Comment every line | Delete obvious comments |
| Helper for one-liner | Inline the code |
| Factory for 2 objects | Direct instantiation |
| utils.ts with 1 function | Put code where used |
| "First we import..." | Just write code |
| Deep nesting | Guard clauses |
| Magic numbers | Named constants |
| God functions | Split by responsibility |
🔴 Before Editing ANY File (THINK FIRST!)
Before changing a file, ask yourself:
| Question | Why |
| What imports this file? | They might break |
| What does this file import? | Interface changes |
| What tests cover this? | Tests might fail |
| Is this a shared component? | Multiple places affected |
Quick Check:
File to edit: UserService.ts
└── Who imports this? → UserController.ts, AuthController.ts
└── Do they need changes too? → Check function signatures🔴 Rule: Edit the file + all dependent files in the SAME task. 🔴 Never leave broken imports or missing updates.
Summary
| Do | Don't |
| Write code directly | Write tutorials |
| Let code self-document | Add obvious comments |
| Fix bugs immediately | Explain the fix first |
| Inline small things | Create unnecessary files |
| Name things clearly | Use abbreviations |
| Keep functions small | Write 100+ line functions |
Remember: The user wants working code, not a programming lesson.
🔴 Self-Check Before Completing (MANDATORY)
Before saying "task complete", verify:
| Check | Question |
| ✅ Goal met? | Did I do exactly what user asked? |
| ✅ Files edited? | Did I modify all necessary files? |
| ✅ Code works? | Did I test/verify the change? |
| ✅ No errors? | Lint and TypeScript pass? |
| ✅ Nothing forgotten? | Any edge cases missed? |
🔴 Rule: If ANY check fails, fix it before completing.
Verification Scripts (MANDATORY)
🔴 CRITICAL: Each agent runs ONLY their own skill's scripts after completing work.
Agent → Script Mapping
| Agent | Script | Command |
| frontend-specialist | UX Audit | python .agent/skills/frontend-design/scripts/ux_audit.py . |
| frontend-specialist | A11y Check | python .agent/skills/frontend-design/scripts/accessibility_checker.py . |
| backend-specialist | API Validator | python .agent/skills/api-patterns/scripts/api_validator.py . |
| mobile-developer | Mobile Audit | python .agent/skills/mobile-design/scripts/mobile_audit.py . |
| database-architect | Schema Validate | python .agent/skills/database-design/scripts/schema_validator.py . |
| security-auditor | Security Scan | python .agent/skills/vulnerability-scanner/scripts/security_scan.py . |
| seo-specialist | SEO Check | python .agent/skills/seo-fundamentals/scripts/seo_checker.py . |
| seo-specialist | GEO Check | python .agent/skills/geo-fundamentals/scripts/geo_checker.py . |
| performance-optimizer | Lighthouse | python .agent/skills/performance-profiling/scripts/lighthouse_audit.py <url> |
| test-engineer | Test Runner | python .agent/skills/testing-patterns/scripts/test_runner.py . |
| test-engineer | Playwright | python .agent/skills/webapp-testing/scripts/playwright_runner.py <url> |
| Any agent | Lint Check | python .agent/skills/lint-and-validate/scripts/lint_runner.py . |
| Any agent | Type Coverage | python .agent/skills/lint-and-validate/scripts/type_coverage.py . |
| Any agent | i18n Check | python .agent/skills/i18n-localization/scripts/i18n_checker.py . |
❌ WRONG:
test-engineerrunningux_audit.py✅ CORRECT:frontend-specialistrunningux_audit.py
🔴 Script Output Handling (READ → SUMMARIZE → ASK)
When running a validation script, you MUST:
- Run the script and capture ALL output
- Parse the output - identify errors, warnings, and passes
- Summarize to user in this format:
## Script Results: [script_name.py]
### ❌ Errors Found (X items)
- [File:Line] Error description 1
- [File:Line] Error description 2
### ⚠️ Warnings (Y items)
- [File:Line] Warning description
### ✅ Passed (Z items)
- Check 1 passed
- Check 2 passed
**Should I fix the X errors?**- Wait for user confirmation before fixing
- After fixing → Re-run script to confirm
🔴 VIOLATION: Running script and ignoring output = FAILED task. 🔴 VIOLATION: Auto-fixing without asking = Not allowed. 🔴 Rule: Always READ output → SUMMARIZE → ASK → then fix.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

