"Analyze repository test failures, identify root causes, and apply safe automatic fixes when possible."
Resources
24Install
npx skillscat add aegistechmx/professional-icc-calculator Install via the SkillsCat registry.
SKILL.md
Run Tests and Fix
This skill packages a repeatable workflow for test-driven debugging in this repository.
Skill Goal
Help the user run project tests, interpret failures, classify root causes, and apply targeted fixes without changing production behavior unnecessarily.
Workflow
Verify prerequisites:
- Node.js is installed.
- Project dependencies are installed (
npm install). package.jsontest scripts exist infrontend/andbackend/.
Run the relevant test suite:
cd frontend && npm test 2>&1cd backend && npm test 2>&1
If tests are not configured, recommend installing test dependencies and setting up the test runner.
Parse test output to identify:
- failed test files
- failing cases
- error messages and stack traces
- assertion failures
Categorize failures:
- syntax/runtime errors
- assertion failures
- async timeouts
- dependency or mock issues
- environment problems
Analyze the root cause:
- check import statements and module resolution
- verify function signatures and parameters
- review mock setup and test fixtures
- inspect setup/teardown logic
- validate environment variables and port configuration
Apply automatic fixes when clearly safe:
- fix missing imports or declarations
- correct syntax mistakes
- update expected values only if logic changed intentionally
- add proper async/await handling
- increase timeouts when justified
- update mock return values and test dependencies
- create missing config files or environment entries
Re-run tests after applying fixes:
- start with the failing subset
- if they pass, run the full suite again
Report results:
- tests fixed automatically
- tests requiring manual intervention
- remaining issues and recommendations
Decision Points
- If a failure is caused by unclear logic changes, do not rewrite production logic without confirmation.
- If multiple tests fail from the same root cause, fix the root cause rather than patching individual assertions.
- If the repository uses separate frontend/backend runners, preserve the backend-first principle for heavy calculations.
Completion Criteria
- All available tests pass, or
- no automatic fix is possible and a clear manual action plan is provided.
Safety
- create backups of modified files before editing
- review all automatic changes before committing
- avoid changing production code logic without verification
- skip fixes that require broad architectural changes