| name | typescript-typecheck-fallback |
| description | Reliably run TypeScript type-checking (npx tsc --noEmit) by using shell_agent as a fallback when run_shell fails due to environment or timeout issues. |
TypeScript Type-Check with shell_agent Fallback
When verifying TypeScript compilation as part of a build or validation workflow, run_shell may fail with unknown errors due to shell environment issues, missing PATH entries, timeout constraints, or other transient problems. This skill describes a two-step pattern: attempt the check with run_shell first, then fall back to shell_agent if it fails.
When to Use
- After creating or modifying TypeScript source files and you need to confirm there are no type errors.
- As part of a CI-like verification step inside an autonomous workflow.
- Any time
run_shell returns an unexpected or unclear error for a tsc invocation.
Step-by-Step Pattern
Step 1 — Attempt with run_shell (fast path)
Try the direct command first. This is fast and gives immediate output when the environment is well-configured.
run_shell: npx tsc --noEmit
Evaluate the result:
- ✅ Exit code 0, no errors → Type-check passed. Done.
- ❌ Exit code non-zero with TypeScript diagnostics → Real type errors exist; surface them and fix.
- ⚠️ Unknown error, timeout, or no useful output → Proceed to Step 2.
Step 2 — Fall back to shell_agent (reliable path)
When run_shell fails in an ambiguous or environmental way, delegate to shell_agent with a natural-language task. shell_agent can autonomously: