auto-type-checking
Run TypeScript type checking after file edits and immediately flag type errors before moving on. Uses Cursor hooks for automatic enforcement.
How do I install this agent skill?
npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill auto-type-checkingIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides configuration and workflow guidance for running automated TypeScript type checking following file edits using project-level hooks. It does not introduce dangerous external downloads, network activity, or obfuscation, and operates within safe boundaries using local developer tools.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
- ZeroLeakspass
Score: 93/100 · 2 sections analyzed
What does this agent skill do?
Auto Type Checking
Catch type errors immediately after every edit instead of discovering them at build time.
Manual Workflow
After editing a TypeScript file, run:
npx tsc --noEmit 2>&1 | head -30
If errors appear, fix them before moving on.
Automated with Cursor Hooks
Add to .cursor/hooks.json to run automatically after every file edit:
{
"hooks": [
{
"event": "afterFileEdit",
"script": "check-types.sh",
"pattern": "**/*.{ts,tsx}"
}
]
}
Create .cursor/hooks/check-types.sh:
#!/bin/bash
# Quick type check — only reports errors, doesn't block
npx tsc --noEmit --pretty 2>&1 | head -20
exit 0 # Don't block the agent even if there are errors
chmod +x .cursor/hooks/check-types.sh
What to Check
When type errors appear:
- Missing imports:
Cannot find name 'X'→ add the import - Type mismatches:
Type 'string' is not assignable to type 'number'→ fix the type or the value - Missing properties:
Property 'x' does not exist on type 'Y'→ add the property to the interface or fix the access - Null safety:
Object is possibly 'null'→ add null check or optional chaining - Generic constraints:
Type 'X' does not satisfy the constraint 'Y'→ fix the generic parameter
Tips
- Use
--noEmitto type-check without producing output files - For large projects,
tsccan be slow — consider--incrementalor running only on changed files - If using path aliases, ensure
tsconfig.jsonpaths are configured correctly - For monorepos, run
tscfrom the package root, not the workspace root - Pair with
grinding-until-passfor a full "fix until clean" loop
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/spencerpauly/awesome-cursor-skills/auto-type-checking">View auto-type-checking on skillZs</a>