typescript-any-eliminator

Replace unsafe any usages in TypeScript code with precise types.

1|1|Updated May 3, 2026
One-click install
npx skills add https://github.com/matt-riley/agent-skills --skill typescript-any-eliminator-matt-riley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-any-eliminator
Source: https://github.com/matt-riley/agent-skills/tree/main/skills/typescript-any-eliminator
Command: npx skills add https://github.com/matt-riley/agent-skills --skill typescript-any-eliminator-matt-riley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

TypeScript projects often rely on any to bypass strict typing, risking runtime errors and maintenance debt. This skill identifies and safely reduces or replaces such any usages, aiming for precise, verifiable types without altering program behavior.

Core Features & Use Cases

  • Discovers explicit any sites across sources, tests, and shared types.
  • Recommends precise type replacements using existing domain types or guarded unknowns.
  • Use Case: tighten a large codebase by progressively replacing any with safer types while preserving runtime semantics.

Quick Start

Run a targeted scan of your TS project to replace unsafe any instances with precise types while preserving runtime semantics.

Frequently Asked Questions about typescript-any-eliminator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I eliminate unsafe any usages in TypeScript code?

You can eliminate unsafe any usages by running a targeted scan of your TypeScript project, which recommends precise type replacements using existing domain types while preserving runtime semantics.

What is the best way to replace any with safer types in a large codebase?

The best way to replace any with safer types in a large codebase is to progressively substitute them by recommending existing domain types and guarding unknown boundaries, ensuring runtime behavior remains unaltered.

Does this approach preserve runtime behavior when tightening TypeScript type safety?

Yes, tightening TypeScript type safety through this method preserves runtime behavior by isolating targeted any sites and guiding exact type replacements that do not alter program execution.

Can I apply static analysis to replace any across shared helpers and API layers?

Yes, you can apply this static analysis across application code, shared helpers, DTOs, and API layers where any is used and type safety needs strengthening without changing runtime outcomes.

When do I need to guard unknown boundaries in TypeScript?

You need to guard unknown boundaries in TypeScript when exact domain types are unavailable, allowing you to safely replace any by isolating targeted sites and applying minimal, verifiable type guards.