From bmad-skills
Applies Clean Code principles and professional practices to TypeScript/JavaScript code writing, reviews, refactoring, TDD, bug fixes, test planning, task estimation, deadlines, and teams.
npx claudepluginhub bmad-labs/skills --plugin bmad-skillsThis skill uses the workspace's default tool permissions.
Principles, practices, and workflows for TypeScript developers.
LICENSEguidelines.mdprogress.mdreferences/acceptance-testing/examples.mdreferences/acceptance-testing/knowledge.mdreferences/acceptance-testing/rules.mdreferences/classes/examples.mdreferences/classes/knowledge.mdreferences/classes/rules.mdreferences/coding-practices/examples.mdreferences/coding-practices/knowledge.mdreferences/coding-practices/rules.mdreferences/collaboration/examples.mdreferences/collaboration/knowledge.mdreferences/collaboration/rules.mdreferences/comments/examples.mdreferences/comments/knowledge.mdreferences/comments/rules.mdreferences/commitment/examples.mdreferences/commitment/knowledge.mdSuggests manual /compact at logical task boundaries in long Claude Code sessions and multi-phase tasks to avoid arbitrary auto-compaction losses.
Share bugs, ideas, or general feedback.
Principles, practices, and workflows for TypeScript developers.
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:
rules.md and examples.md files from references/ before giving advice or writing code. Do not rely on general knowledge alone.references/functions/rules.md Rule 1: Keep Functions Small, 2-5 lines ideal") so the user can trace the guidance back to its source.references/[topic]/examples.md over generating your own. These examples are curated for TypeScript and demonstrate the exact patterns intended.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.
guidelines.md → find the right workflow → load it → follow each step (loading referenced files)rules.md and examples.md files relevant to your work → apply themStep-by-step processes for common tasks:
| Workflow | When to Use |
|---|---|
workflows/code-review/workflow.md | Reviewing code for quality |
workflows/pr-review/workflow.md | Reviewing pull requests |
workflows/tdd.md | Test-driven development cycle |
workflows/refactoring/workflow.md | Safe refactoring with tests |
workflows/new-feature.md | Building new functionality |
workflows/bug-fix.md | Fixing bugs properly |
workflows/test-strategy.md | Planning test coverage |
workflows/estimation.md | Estimating tasks (PERT) |
workflows/deadline-negotiation.md | Handling unrealistic deadlines |
The code review, PR review, and refactoring workflows use a step-file architecture for context-safe execution:
workflow.md entry point that describes steps and loads steps/step-01-init.mdsteps/, loaded sequentiallystepsCompleted array in the output document's YAML frontmatterstep-01-init.md detects the existing output and step-01b-continue.md resumes from the last completed step| Category | Files | Purpose |
|---|---|---|
| naming | 3 | Variable, function, class naming |
| functions | 4 | Function design and review |
| classes | 3 | Class/module design |
| comments | 3 | Comment best practices |
| error-handling | 3 | Exception handling |
| unit-tests | 3 | Clean test principles |
| formatting | 3 | Code layout |
| smells | 3 | Code smell catalog (50+) |
| Category | Files | Purpose |
|---|---|---|
| professionalism | 3 | Professional ethics |
| saying-no | 3 | Declining requests |
| commitment | 3 | Making promises |
| coding-practices | 3 | Daily habits, flow, debugging |
| tdd | 3 | TDD workflow and benefits |
| practicing | 3 | Deliberate practice |
| acceptance-testing | 3 | Requirements as tests |
| testing-strategies | 3 | Test pyramid |
| time-management | 3 | Meetings, focus |
| estimation | 3 | PERT estimation |
| pressure | 3 | Working under pressure |
| collaboration | 3 | Working with teams |
These are abbreviated reminders. Always load the corresponding reference files for the full rules, thresholds, and examples before applying.
references/formatting/rules.md, references/naming/rules.mdreferences/classes/rules.md, references/functions/rules.mdreferences/functions/rules.md (Rule 1: 2-5 lines ideal)references/naming/rules.mdreferences/smells/rules.md (G5)references/unit-tests/rules.mdreferences/professionalism/rules.mdreferences/saying-no/rules.mdreferences/commitment/rules.mdreferences/estimation/rules.mdreferences/pressure/rules.mdSee guidelines.md for:
Before giving any code advice or writing code, verify:
rules.md for each applicable categoryexamples.md if demonstrating patterns or reviewing codeworkflow/*.md if executing a multi-step task