typescript-clean-code
Installation
SKILL.md
Clean Code
Principles, practices, and workflows for TypeScript developers.
Critical: Reference-First Approach
Always load and consult the reference files before applying any principle or making any recommendation. The references in this skill contain curated, authoritative knowledge from Robert C. Martin's books, adapted for TypeScript. When this skill is active:
- Read references before responding - For any code quality or professional practice topic, load the relevant
rules.mdandexamples.mdfiles fromreferences/before giving advice or writing code. Do not rely on general knowledge alone. - Reference content overrides internal knowledge - If your general knowledge conflicts with what the reference files state, follow the reference files. They contain the specific rules, thresholds, and patterns this skill enforces.
- Cite specific rules - When making recommendations, reference the specific rule (e.g., "per
references/functions/rules.mdRule 1: Keep Functions Small, 2-5 lines ideal") so the user can trace the guidance back to its source. - Use examples from reference files - Prefer the bad/good code examples in
references/[topic]/examples.mdover generating your own. These examples are curated for TypeScript and demonstrate the exact patterns intended. - Follow workflows step-by-step - When executing a task (review, refactoring, TDD, etc.), load the corresponding workflow file and follow each step, loading the reference files each step points to.
Do not skip loading references. Even if you "know" Clean Code principles, the reference files contain specific TypeScript adaptations, thresholds, checklists, and smell catalogs that your general knowledge may not match exactly.