bugfix
Fix bugs using Test-Driven Development. Use for bug fixes from Linear tickets or user reports. Emphasizes writing tests FIRST before any implementation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Fix bugs using Test-Driven Development. Use for bug fixes from Linear tickets or user reports. Emphasizes writing tests FIRST before any implementation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Frontend codebase maintenance - dead code detection, linting, dependency updates, and cleanup for TypeScript/React code.
Add a new analytics card to the session summary panel. Covers backend analyzer, database migration, API response, and frontend component with Storybook stories.
Cut a new semver release — tag, write release notes with rigorous DB migration and API change verification, and publish via gh.
Backend codebase maintenance - dead code detection, linting, dependency updates, and cleanup for Go code.
| name | bugfix |
| description | Fix bugs using Test-Driven Development. Use for bug fixes from Linear tickets or user reports. Emphasizes writing tests FIRST before any implementation. |
Fix bugs using strict Test-Driven Development. Always write tests first.
This skill enforces TDD. The workflow is:
Do NOT write implementation code before the test exists and fails.
Do NOT commit or push until code review is complete.
Track with TodoWrite:
Backend (Go):
# Find test file for a source file
# e.g., db.go -> db_test.go
ls backend/internal/*/**_test.go
Frontend (TypeScript):
# Tests are usually co-located
# e.g., Component.tsx -> Component.test.tsx
ls frontend/src/**/*.test.tsx
ls frontend/src/**/*.test.ts
This is the most important phase. Do not skip it.
Track with TodoWrite:
Backend (Go):
func TestFunctionName_BugDescription(t *testing.T) {
// Arrange: Set up the conditions that trigger the bug
// Act: Execute the code path
// Assert: Verify correct behavior (this will FAIL initially)
}
Frontend (TypeScript/Vitest):
describe('ComponentOrFunction', () => {
it('should handle the specific bug case', () => {
// Arrange
// Act
// Assert (this will FAIL initially)
});
});
Backend:
cd backend && go test -v -run TestFunctionName ./path/to/package/...
Frontend:
cd frontend && npm test -- --run -t "test description"
The test MUST fail before proceeding. If it passes, either:
Track with TodoWrite:
Backend:
# Run specific test
cd backend && go test -v -run TestFunctionName ./path/to/package/...
# Run all tests in package
cd backend && go test -v ./path/to/package/...
# Run full test suite (with Docker for integration tests)
cd backend && DOCKER_HOST=unix:///Users/santaclaude/.orbstack/run/docker.sock go test ./...
Frontend:
# Run all tests
cd frontend && npm run build && npm run lint && npm test
Only if the fix introduced code that could be cleaner:
Track with TodoWrite:
Skip this phase if the fix is already clean.
Do NOT commit or push until this phase is complete.
Perform an extremely thorough code review of ALL changes before even considering commit and push. This is a critical gate - bugs that slip through here go to production.
Track with TodoWrite:
Correctness:
Completeness:
Quality:
Safety:
Cleanliness:
git diff to see exactly what changed# View all changes
git diff
# View changes with more context
git diff -U10
# View staged changes
git diff --cached
If you find ANY issues during review, go back and fix them before proceeding.
Only proceed here after Phase 5 (Code Review) is complete and you are confident in the fix.
Track with TodoWrite:
# Backend
cd backend && DOCKER_HOST=unix:///Users/santaclaude/.orbstack/run/docker.sock go test ./...
# Frontend
cd frontend && npm run build && npm run lint && npm test
Add a comment to the ticket with: