Skip to content
Back to skills

Type Fix

ASecurity

Fixes TypeScript type errors in a file or across the project

  • 10 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added May 27, 2026
data-aitypescriptbash

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add berkcangumusisik/claude-code-practices --skill type-fix --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Type Fix?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Type Fix
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/berkcangumusisik-type-fix/badge)](https://www.skillsdirectory.com/skills/berkcangumusisik-type-fix)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: type-fix
description: Fixes TypeScript type errors in a file or across the project
argument-hint: [file-path]
user-invocable: true
allowed-tools: Bash Read Edit Grep
effort: medium
---

## Fix TypeScript Errors

Target: **$1** (or entire project if not specified)

1. Get current errors:
```bash
npx tsc --noEmit 2>&1 | head -50
```

If a specific file was given, filter to that file.

2. Group errors by type:
   - `any` type leaks
   - Missing null checks
   - Incorrect return types
   - Property does not exist
   - Type mismatch

3. For each error:
   - Read the relevant code
   - Understand the actual type
   - Apply the minimal fix that maintains correctness:
     - Prefer proper types over `as any`
     - Use optional chaining `?.` for possible nulls
     - Narrow with type guards when needed

4. Show changes, ask for confirmation, apply.

5. Re-run `tsc --noEmit` to verify zero errors remain.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…