From harness-engineering
Fix bugs by writing a failing test first, then making it pass (Red-Green-Refactor). Use when QA reports a bug, a customer reports an issue, or a regression is found. Do NOT use when root cause is unclear (use bug-investigation first), not for TDD feature development.
npx claudepluginhub toru-oizumi/claude-harness-engineering --plugin harness-engineeringThis skill uses the workspace's default tool permissions.
Fix bugs with confidence using Test-Driven Development. Based on the principle: "The longest way round is the shortest way home."
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Fix bugs with confidence using Test-Driven Development. Based on the principle: "The longest way round is the shortest way home."
When a defect is reported, what's the first thing to do? Write the smallest failing test, run it, then fix it. — "Test-Driven Development: By Example" (Kent Beck)
Do NOT rush. Hasty fixes often create 3 new bugs while fixing 1.
Before starting:
Current branch: [branch]
- [ ] Continue on this branch
- [ ] Create fresh branch from main (fix/xxx)
If this fix might be interrupted:
Example (TypeScript):
// Bug where user age calculation is off by 1
test('calculates age correctly for users born on leap day', () => {
const user = new User({ birthDate: new Date('2000-02-29') });
const today = new Date('2024-02-28');
expect(user.calculateAge(today)).toBe(23); // Currently returns 24
});
Critical: Run the test and confirm it fails. If it passes:
# Run your new test — should pass now
# Run ALL tests — ensure no regressions
# Bug Fix: [Brief Description]
## Bug Report
- **Source**: QA / Customer / Production
- **Severity**: Critical / High / Medium / Low
- **Reproduction Steps**: [Steps to reproduce]
## Root Cause Analysis
- **Location**: `file_path:line_number`
- **Cause**: [Why this bug occurred]
- **Minimum Unit**: [The smallest code unit responsible]
## Test First
[Failing test code]
**Test Result (Before Fix)**: FAIL
## Fix Applied
[Minimal code change]
## Verification
- **New Test**: PASS
- **All Tests**: PASS (X passed, 0 failed)
- **Static Analysis**: No new warnings
## Similar Issue Check
- [ ] Searched for similar patterns: [results]
## Lessons Learned
- [What test should have existed initially?]
- [What blind spot did this reveal?]
| Step | Status |
|---|---|
| Root cause identified | [ ] |
| Failing test written | [ ] |
| Test confirmed to fail | [ ] |
| Fix implemented | [ ] |
| New test passes | [ ] |
| All tests pass | [ ] |
| Lint/format clean | [ ] |
| Similar issues checked | [ ] |
Do NOT mark as complete until all boxes are checked.
When committing bug fixes, use the fix: prefix:
fix: prevent age calculation off-by-one for leap day births
fix(auth): resolve token refresh race condition
detroit-school-lint: Validate test qualitypre-task-diagnostic: Risk assessment before fixbug-investigation: When root cause is unclearSee gotchas.md in this directory for known pitfalls and recurring mistakes when using this skill.