Testability Review Skill
Review code (a diff or the entire codebase) with a focus on testability, simplicity, technical-debt management, and sustainable software development.
Review Target
- If there are uncommitted changes or staged diffs, review those.
- If the user specifies files or a PR, review those.
- Otherwise, ask the user what to review.
Review Perspectives
Evaluate the code against the following principles:
1. Testability
- Is the code easy to test? Can each unit be tested in isolation?
- Are dependencies injectable rather than hard-coded?
- Are side effects separated from pure logic?
- Would a test for this code be testing behavior (good) or implementation details (fragile)?
2. Test Quality
- Do existing tests cover the meaningful behaviors?
- Are tests written at the right level of abstraction?
- Do test failure messages provide enough information to diagnose the problem? (Would power-assert style assertions help?)
- Are there tests that would break on harmless refactoring? (over-mocking, asserting on internal state, etc.)
3. Simplicity & YAGNI
- Is there unnecessary abstraction, indirection, or generalization?
- Is there code written for hypothetical future requirements rather than actual current needs?
- Could the same goal be achieved with less code or fewer concepts?
- Are there premature optimizations that sacrifice readability?
4. Quality and Speed
- Does the change support the principle that quality and speed reinforce each other?
- Will this code be easy to change next week? Next month?
- Are there shortcuts that will slow the team down later?
5. Technical Debt
- Does the change introduce new technical debt? If so, is it intentional and documented?
- Are there opportunities to pay down existing debt nearby?
- Is the debt/shortcut ratio appropriate for the context?
6. Refactoring Opportunities
- Are there structural improvements that can be made without changing behavior?
- Is there duplication that should be consolidated?
- Are names (variables, functions, classes) clear and intention-revealing?
- Is the code organized so that related things are together and unrelated things are apart?
Output Format
## Testability Review
### Summary
<Overall assessment in 2-3 sentences — would this code pass a rigorous testability-focused review?>
### Findings
#### [Severity] Finding title
- **Where**: file:line
- **What**: Description of the issue
- **Why it matters**: Impact on testability, maintainability, or development speed
- **Suggestion**: Concrete improvement
...
### Positive Points
- <What the code does well from these perspectives>
### Key Takeaway
<The single most important thing to address, framed as actionable advice>
Severity levels:
- Critical: Actively harmful — will cause bugs, block testing, or create significant debt
- Warning: Not ideal — reduces testability, readability, or maintainability
- Note: Minor improvement opportunity or style suggestion
Guidelines
- Be direct and specific. Reference actual code, not abstract principles.
- Praise good design decisions — don't only point out problems.
- Prioritize findings by impact. A few important findings are better than an exhaustive list of nitpicks.
- Frame suggestions in terms of concrete benefit (easier to test, safer to refactor, clearer intent), not dogma.
- Do NOT make changes. This skill only produces the review.
1---2name: review-testability3description: Review code or diffs with a focus on testability, simplicity, managing technical debt, and sustainable design.4---56## Testability Review Skill78Review code (a diff or the entire codebase) with a focus on testability, simplicity, technical-debt management, and sustainable software development.910### Review Target11121. If there are uncommitted changes or staged diffs, review those.132. If the user specifies files or a PR, review those.143. Otherwise, ask the user what to review.1516### Review Perspectives1718Evaluate the code against the following principles:1920#### 1. Testability2122- Is the code easy to test? Can each unit be tested in isolation?23- Are dependencies injectable rather than hard-coded?24- Are side effects separated from pure logic?25- Would a test for this code be testing **behavior** (good) or **implementation details** (fragile)?2627#### 2. Test Quality2829- Do existing tests cover the meaningful behaviors?30- Are tests written at the right level of abstraction?31- Do test failure messages provide enough information to diagnose the problem? (Would power-assert style assertions help?)32- Are there tests that would break on harmless refactoring? (over-mocking, asserting on internal state, etc.)3334#### 3. Simplicity & YAGNI3536- Is there unnecessary abstraction, indirection, or generalization?37- Is there code written for hypothetical future requirements rather than actual current needs?38- Could the same goal be achieved with less code or fewer concepts?39- Are there premature optimizations that sacrifice readability?4041#### 4. Quality and Speed4243- Does the change support the principle that quality and speed reinforce each other?44- Will this code be easy to change next week? Next month?45- Are there shortcuts that will slow the team down later?4647#### 5. Technical Debt4849- Does the change introduce new technical debt? If so, is it intentional and documented?50- Are there opportunities to pay down existing debt nearby?51- Is the debt/shortcut ratio appropriate for the context?5253#### 6. Refactoring Opportunities5455- Are there structural improvements that can be made without changing behavior?56- Is there duplication that should be consolidated?57- Are names (variables, functions, classes) clear and intention-revealing?58- Is the code organized so that related things are together and unrelated things are apart?5960### Output Format6162```63## Testability Review6465### Summary66<Overall assessment in 2-3 sentences — would this code pass a rigorous testability-focused review?>6768### Findings6970#### [Severity] Finding title71- **Where**: file:line72- **What**: Description of the issue73- **Why it matters**: Impact on testability, maintainability, or development speed74- **Suggestion**: Concrete improvement7576...7778### Positive Points79- <What the code does well from these perspectives>8081### Key Takeaway82<The single most important thing to address, framed as actionable advice>83```8485Severity levels:86- **Critical**: Actively harmful — will cause bugs, block testing, or create significant debt87- **Warning**: Not ideal — reduces testability, readability, or maintainability88- **Note**: Minor improvement opportunity or style suggestion8990### Guidelines9192- Be direct and specific. Reference actual code, not abstract principles.93- Praise good design decisions — don't only point out problems.94- Prioritize findings by impact. A few important findings are better than an exhaustive list of nitpicks.95- Frame suggestions in terms of **concrete benefit** (easier to test, safer to refactor, clearer intent), not dogma.96- Do NOT make changes. This skill only produces the review.