Skip to content
Search prompts, tools, agents…

Type safety hardening

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.

Free Intermediate 0 views 0 copies 0 downloads
Download skill

Skill file

SKILL.md
---
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

  1. Download the skill.
  2. Put its folder (with SKILL.md inside) in .claude/skills/type-safety-hardening/ for just this project, or in ~/.claude/skills/ for every project.
  3. 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.

Join the conversation

Your email address will not be published. Required fields are marked *