From codeapps-toolkit
Validate TypeScript compilation and ESLint compliance before code delivery. Use after implementation to ensure production-ready code quality.
How this skill is triggered — by the user, by Claude, or both
Slash command
/codeapps-toolkit:build-lint-validatorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Systematically validate that implemented code compiles successfully and passes ESLint rules before delivery. This skill acts as the final quality gate to catch compilation errors, type issues, and linting violations that would otherwise be discovered by the user during their own build process.
Systematically validate that implemented code compiles successfully and passes ESLint rules before delivery. This skill acts as the final quality gate to catch compilation errors, type issues, and linting violations that would otherwise be discovered by the user during their own build process.
ALWAYS use after:
Use to validate:
This skill performs 3 critical checks:
Ensures all TypeScript code compiles without errors.
Verifies code passes all ESLint rules and style guidelines.
Attempts to automatically fix common linting issues when possible.
Execute the build command to check for compilation errors:
npm run build
What to check:
Common TypeScript errors:
Type 'string' is not assignable to type 'number')Cannot find module '@/components/Button')Property 'foo' does not exist on type 'Bar')Type 'X' does not satisfy the constraint 'Y')Execute the lint command to check for style violations:
npm run lint
What to check:
Common ESLint errors:
'foo' is defined but never used)React Hook useEffect has a missing dependency)React Hook "useState" is called conditionally)Unexpected console statement)If ESLint reports fixable issues, attempt automatic fixes:
npm run lint -- --fix
Auto-fixable issues include:
Non-fixable issues require manual intervention:
Provide structured feedback on validation results.
# Build & Lint Validation Report
**Date**: [current date]
**Status**: ✅ PASS | ⚠️ WARNINGS | ❌ FAIL
## Summary
- **TypeScript Compilation**: ✅ PASS | ❌ FAIL (X errors)
- **ESLint Check**: ✅ PASS | ❌ FAIL (X errors, Y warnings)
- **Auto-Fix Applied**: Yes | No | N/A
## TypeScript Compilation Results
### Errors (X found)
1. [File path:line:column]: [Error message]
- **Type**: Type error | Import error | Syntax error
- **Fix**: [Suggested fix]
2. [File path:line:column]: [Error message]
- **Type**: Type error | Import error | Syntax error
- **Fix**: [Suggested fix]
### Build Output
[Relevant build output]
## ESLint Results
### Errors (X found)
1. [File path:line:column]: [Rule name] - [Error message]
- **Auto-fixable**: Yes | No
- **Fix**: [Suggested fix or "Auto-fixed"]
2. [File path:line:column]: [Rule name] - [Error message]
- **Auto-fixable**: Yes | No
- **Fix**: [Suggested fix or "Auto-fixed"]
### Warnings (Y found)
1. [File path:line:column]: [Rule name] - [Warning message]
- **Recommendation**: [Suggested action]
### Lint Output
[Relevant lint output]
## Recommendations
### Immediate Actions (Blockers)
1. [Action to fix critical issues]
2. [Action to fix critical issues]
### Suggested Improvements
1. [Recommended code quality improvements]
2. [Recommended code quality improvements]
## Next Steps
- [ ] Fix all TypeScript compilation errors
- [ ] Fix all ESLint errors
- [ ] Address ESLint warnings (if applicable)
- [ ] Re-run validation
- [ ] Proceed to delivery/commit phase
Typical workflow:
1. Developer/Agent: Implements feature code
2. Developer/Agent: Invokes build-lint-validator skill
3. Validator: Runs TypeScript compilation check
4. Validator: Runs ESLint check
5. If issues found: Attempts auto-fix with eslint --fix
6. Validator: Generates validation report
7. If failed: Developer/Agent fixes issues and re-validates
8. If passed: Proceed to commit/PR creation
Manual invocation:
User: "Validate the build and lint status"
System: Runs build-lint-validator skill
Proactive invocation (recommended):
Agent: [Completes feature implementation]
Agent: [Automatically invokes build-lint-validator]
Agent: [Reports validation results to user]
Agent: [Fixes issues if found, or marks task complete if passed]
This skill integrates at two key points:
Type errors:
// Error: Type 'string | undefined' is not assignable to type 'string'
const name: string = user?.name;
// Fix: Add type guard or default value
const name: string = user?.name ?? 'Unknown';
Import errors:
// Error: Cannot find module '@/components/Button'
import { Button } from '@/components/Button';
// Fix: Verify path and component export
import { Button } from '@/components/Button/Button';
// OR
import Button from '@/components/Button';
Unused variables:
// Error: 'data' is assigned a value but never used
const [data, setData] = useState();
// Fix: Remove if truly unused, or prefix with underscore if intentionally unused
const [_data, setData] = useState();
React Hook dependency warnings:
// Warning: React Hook useEffect has a missing dependency: 'fetchData'
useEffect(() => {
fetchData();
}, []);
// Fix: Add dependency or wrap in useCallback
useEffect(() => {
fetchData();
}, [fetchData]);
See references/common-fixes.md for detailed fix patterns for frequent errors.
Validation passes when:
npm run build exits with code 0npm run lint exits with code 0Validation fails when:
Optimization tips:
This skill uses standard exit codes:
Usage: Invoke this skill after implementing features to ensure production-ready code quality. Automatically invoked by implementation agents during Phase 3 (post-implementation) and Phase 5 (pre-delivery) validation gates.
npx claudepluginhub ramakrishnan24689/codeapps-toolkit --plugin codeapps-toolkitSets up strict ESLint config for TypeScript projects and systematically fixes all linting issues via auto-fix and manual remediation.
Fixes build, lint, and TypeScript errors in npm-based projects. Runs npm build/lint/tsc checks, categorizes issues by priority, applies minimal batch fixes, and verifies.
Runs lint and type-check tools (ESLint, tsc, Ruff, MyPy, Bandit) after every code change. Forces passing audits before commit.