From workflow-tools
This skill should be used when the user asks to "clean up tests", "clean up code", "tidy up tests", "remove dead tests", "organize test files", "fix test structure", or mentions test hygiene, test bloat, removing temporary tests, or following test best practices. Unlike the code-review skill (which reviews a diff for quality), this skill performs batch cleanup across entire files or directories. Reports issues first, then applies fixes after confirmation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/workflow-tools:cleanupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Review and clean up tests and code. Focused on removing bloat, enforcing structure, and following language best practices.
Review and clean up tests and code. Focused on removing bloat, enforcing structure, and following language best practices.
Based on the user's request, determine what to review:
git diff --name-only and git diff --cached --name-only to get changed files.**/*_test.go**/*.test.{ts,tsx,js}, **/*.spec.{ts,tsx,js}, **/__tests__/****/test_*.py, **/*_test.pyRead each file in scope. Apply the checklist from checklist.md. For each issue found, record:
Present findings grouped by category. Use this format:
## Cleanup Report
### Tests to Remove
- **user_test.go:42** - Trivial test asserting getter returns field value
- **api.test.ts:88** - Empty test body, likely temporary
### Tests to Restructure
- **utils_test.go:15** - Test for `ParseConfig` belongs in `config_test.go`
### Comments to Remove
- **handler.py:23** - Stale TODO referencing resolved issue
### Code to Simplify
- **service.ts:67** - Dead code branch, condition is always false
End with a summary count: "Found X issues across Y files."
After the user confirms, apply fixes. For each fix:
npx claudepluginhub denisraison/claude-plugins --plugin workflow-toolsReviews test code for conformance to the test-designing-guide and test-writing-guide, producing a refinement plan.
Audits existing test suite alignment after code changes, identifying stale assertions, tests for deleted code paths, and coincidence tests. Use after any code modification.
Evaluates tests for deletion by checking if removing them would let a real bug reach production. Use on legacy suites, slow CI, or post-refactor sweeps.