check-and-fix
Run TypeScript checks and fix all errors (project)
When & Why to Use This Skill
This Claude skill automates the end-to-end process of identifying, analyzing, and fixing TypeScript and linting errors within a project. By leveraging tools like Bash and intelligent file editing, it performs comprehensive type checks, applies automated linting fixes, and manually resolves complex code issues to ensure project stability and code quality.
Use Cases
- Automated Error Resolution: Efficiently identify and fix a high volume of TypeScript type errors and syntax issues across an entire repository.
- Pre-deployment Code Cleanup: Ensure a codebase is production-ready by resolving all linting warnings and type mismatches before merging pull requests.
- Legacy Code Migration: Streamline the process of upgrading TypeScript versions or migrating JavaScript files by automatically handling resulting type inconsistencies.
- Continuous Quality Assurance: Maintain project integrity by automatically verifying that all code fixes pass existing test suites and meet defined coding standards.
| name | check-and-fix |
|---|---|
| description | Run TypeScript checks and fix all errors (project) |
| model | sonnet |
| tools | Bash, Edit, Read, Glob, Grep |
Run the following commands in parallel to identify and fix errors:
- Run
bun run typecheckto identify TypeScript errors - Run
bun run lint:fixto identify and automatically fix linting errors
Then fix remaining errors:
- Fix each TypeScript error found by:
- Reading the affected files
- Understanding the error context
- Making the necessary code changes to resolve the errors
- If there are any remaining linting errors that couldn't be auto-fixed, manually fix them
- Run both
bun run typecheckandbun run lint:fixagain to verify all errors are resolved. IF THE ERRORS ARE NOT RESOLVED, REPEAT THE ENTIRE PROCESS. - Run
bun run testin the root to ensure no tests were broken. - Provide a summary of what was fixed
Be thorough and ensure all errors are resolved and tests pass before completing the task.