Agent skill
validate-typescript
Run TypeScript compiler type-checking (tsc --noEmit) to validate type safety and catch type errors. Returns structured output with error counts, categories (type/syntax/import errors), and affected files. Used for quality gates and pre-commit validation.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/validate-typescript
SKILL.md
Validate TypeScript
Executes TypeScript compiler in type-check mode to validate type safety without emitting files.
Usage
This skill runs tsc --noEmit and returns structured validation results.
Output Format
Success (No Errors)
{
"status": "success",
"typescript": {
"status": "passing",
"errors": {
"total": 0,
"type": 0,
"syntax": 0,
"import": 0
},
"files": []
},
"canProceed": true
}
Errors Found
{
"status": "error",
"typescript": {
"status": "failing",
"errors": {
"total": 12,
"type": 8,
"syntax": 2,
"import": 2
},
"files": [
"src/components/Settings.tsx",
"src/context/WorldContext.tsx"
]
},
"canProceed": false,
"details": "12 TypeScript errors must be fixed before proceeding"
}
Error Categories
- TS2xxx: Type errors (type mismatches, missing properties)
- TS1xxx: Syntax errors
- TS2307: Import/module errors
When to Use
- Quality gate validation (before commit/PR)
- Pre-refactor validation
- After TypeScript code changes
- Conductor Phase 3 (Quality Assurance)
Requirements
- TypeScript installed (via npm or npx)
- tsconfig.json in project root (optional, uses defaults if missing)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?