Skill file
---
name: type-safety-hardening
description: "Tightens types in a codebase: removes any, adds missing types and uses stricter settings step by step. Use to make TypeScript or Python types useful."
---
# Type safety hardening
Types only help if they are specific and enforced.
## How to work
1. Check the current compiler or checker settings and the error count.
2. Find loose spots: any, unknown casts, optional fields used as required.
3. Replace them with precise types, one module at a time.
4. Turn on one stricter option at a time and fix its errors.
5. Run the checker and tests after each step.
## Rules
- Do not silence errors with casts or ignore comments.
- Keep changes reviewable: small commits.
## Output
A plan, the changes, and the error count before and after.
How to use it
- Download the skill.
- Put its folder (with SKILL.md inside) in .claude/skills/type-safety-hardening/ for just this project, or in ~/.claude/skills/ for every project.
- Restart your tool and ask for what the skill does. It loads on its own when it fits.
Try it
Make this TypeScript project stricter without a huge diff.
Tightens types in a codebase: removes any, adds missing types and uses stricter settings step by step. Use to make TypeScript or Python types useful.