Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments
.claude/skills/dokhacgiakhoa-clean-code/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 29% | 0% |
| case-22 | ✗→✓ | ▲ Improved | -29% | 0% |
| case-07 | ✓→✗ | ▼ Worse | 10% | 0% |
| case-12 | ✓→✗ | ▼ Worse | -46% | 0% |
> CRITICAL SKILL - Be concise, direct, and solution-focused.
| 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 |
| 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.
| 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 |
| 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 |
| Situation | Action | |-----------|--------| | User asks for feature | Write it directly | | User reports bug | Fix it, don't explain | | No clear requirement | Ask, don't assume |
| ❌ 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 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.
| 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.
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.
> 🔴 CRITICAL: Each agent runs ONLY their own skill's scripts after completing work.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 14,116 | 17,302 | +23% | 1 | 1 | 0% | 3,416 | 3,108 | -9% | 0 | 0 | — |
case-02 | fail→pass | 12,430 | 7,533 | -39% | 1 | 1 | 0% | 2,294 | 2,995 | +31% | 0 | 0 | — |
case-03 | pass→pass | 22,178 | 12,646 | -43% | 1 | 1 | 0% | 3,959 | 3,576 | -10% | 0 | 0 | — |
case-04 | pass→pass | 25,164 | 10,270 | -59% | 1 | 1 | 0% | 4,083 | 2,866 | -30% | 0 | 0 | — |
case-05 | pass→pass | 13,281 | 7,989 | -40% | 1 | 1 | 0% | 2,874 | 2,630 | -8% | 0 | 0 | — |
case-06 | fail→pass | 9,363 | 6,499 | -31% | 1 | 1 | 0% | 2,027 | 2,623 | +29% | 0 | 0 | — |
case-07 | pass→fail | 8,757 | 3,459 | -61% | 1 | 1 | 0% | 1,646 | 1,818 | +10% | 0 | 0 | — |
case-08 | fail→fail | 5,532 | 5,529 | -0% | 1 | 1 | 0% | 980 | 1,999 | +104% | 0 | 0 | — |
case-09 | pass→pass | 16,758 | 8,294 | -51% | 1 | 1 | 0% | 3,129 | 2,262 | -28% | 0 | 0 | — |
case-10 | pass→pass | 8,597 | 5,528 | -36% | 1 | 1 | 0% | 1,604 | 2,149 | +34% | 0 | 0 | — |
case-11 | pass→pass | 12,021 | 4,779 | -60% | 1 | 1 | 0% | 2,205 | 1,865 | -15% | 0 | 0 | — |
case-12 | pass→fail | 13,925 | 5,294 | -62% | 1 | 1 | 0% | 2,746 | 1,491 | -46% | 0 | 0 | — |
case-13 | pass→fail | 10,617 | 7,496 | -29% | 1 | 1 | 0% | 2,214 | 2,428 | +10% | 0 | 0 | — |
case-14 | pass→pass | 14,552 | 6,515 | -55% | 1 | 1 | 0% | 3,024 | 2,537 | -16% | 0 | 0 | — |
case-15 | pass→pass | 5,228 | 3,955 | -24% | 1 | 1 | 0% | 849 | 1,694 | +100% | 0 | 0 | — |
case-16 | pass→pass | 7,541 | 4,004 | -47% | 1 | 1 | 0% | 1,250 | 1,872 | +50% | 0 | 0 | — |
case-17 | fail→fail | 13,038 | 10,737 | -18% | 1 | 1 | 0% | 2,781 | 2,862 | +3% | 0 | 0 | — |
case-18 | pass→pass | 6,551 | 5,118 | -22% | 1 | 1 | 0% | 1,159 | 2,078 | +79% | 0 | 0 | — |
case-19 | pass→pass | 6,385 | 3,976 | -38% | 1 | 1 | 0% | 1,220 | 1,873 | +54% | 0 | 0 | — |
case-20 | fail→fail | 6,140 | 5,779 | -6% | 1 | 1 | 0% | 183 | 1,366 | +646% | 0 | 0 | — |
case-21 | pass→pass | 8,400 | 9,756 | +16% | 1 | 1 | 0% | 1,618 | 3,025 | +87% | 0 | 0 | — |
case-22 | fail→pass | 13,353 | 7,796 | -42% | 1 | 1 | 0% | 2,748 | 1,952 | -29% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of 0 percentage points is the difference between those two pass rates over the 20 comparable cases. 3 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.