- Home
- Skills
- Code Quality & Review
- TypeScript Strict Ship — Types Without any
TypeScript Strict Ship — Types Without any
Ship TypeScript under strict settings: kill any, fix tsc errors, confirm before broad refactors.
$24
Works with the AI Agents you already use
TypeScript Strict Ship — Types Without any
Example session with this skill installed
Run typescript-strict-ship on the src/services folder to resolve implicit any errors and move toward strict mode.
- Read your context and instructions
- Compiled the typescript strict ship
I have completed the baseline audit and initial refactor for the src/services directory. I identified 14 noImplicitAny errors and 4 nullability issues. I have replaced 8 instances of any with specific interfaces and narrowed 3 others using unknown.
TypeScript Strictness Report: src/services
| File | Errors Fixed | Residual Debt | Status |
|---|---|---|---|
src/services/api.ts | 6 | 1 any (External API) | Fixed |
src/services/auth.ts | 5 | 0 | Fixed |
src/services/logger.ts | 7 | 2 TODO | Fixed |
Proposed tsconfig.json Changes
{
"compilerOptions": {
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"noImplicitThis": true,
"useUnknownInCatchVariables": true
}
}
Refactor Example: src/services/api.ts
// Before
async function fetchData(url: any) {
const res = await fetch(url);
return res.json();
}
// After
async function fetchData(url: string): Promise<unknown> {
const res = await fetch(url);
if (!res.ok) throw new Error("Network error");
return res.json();
}
Next steps
- Confirm the proposed
tsconfig.jsonupdates to lock in strict mode for this directory. - Review the
TODOcomments inlogger.tswhere external types are still missing. - Run
tsc --noEmiton the full project to check for regression in dependent modules.
Connects securely to your tools. The creator never sees your data.
About this skill
Refactoring a legacy TypeScript project into a strict-mode codebase often results in a flood of errors that developers simply ignore or suppress with any. This skill systematically cleans up type definitions and enforces strict compiler settings without breaking the build. It moves projects toward a green tsc status through structured, batched refactors.
What it does
- Error baselining runs
tsc --noEmitto identify and categorize existing type violations. - Incremental refactoring fixes local types and function signatures before moving to API boundaries.
- Flag migration manages the transition to stricter
tsconfigsettings likestrictNullChecksornoImplicitAny. - Debt auditing tracks residual
anyusage and marks them with actionable TODOs. - Type narrowing replaces unsafe
anycasts withunknownand proper type guards.
How it works
- Audit phase executes a baseline check to count errors and inspect the current
tsconfig. - Strategy phase produces a plan that prioritizes internal logic before touching public interfaces.
- Execution phase applies fixes in small batches, requiring confirmation before broad refactors.
- Validation phase confirms the build is clean and provides a final report on type coverage.
Frameworks & tools
Works with any project using typescript and a tsconfig.json. Compatible with tsc CLI and modern IDE agents like Cursor or Claude Code.
Why this beats prompting it yourself
Generic prompts often suggest any to make errors disappear or attempt to fix the entire repo at once, causing massive merge conflicts. This skill enforces a specific order of operations that ensures type safety and project stability.
Use cases
- Migrating a JavaScript or loose TypeScript repo to strict mode.
- Reducing "type debt" in a large, messy codebase.
- Preparing a project for a major TypeScript version upgrade.
- Standardizing type safety across a multi-package monorepo.
Known limitations
Requires an existing tsconfig.json or permission to create one. Does not support silent as any casts unless explicitly approved for technical debt.
Requires an existing tsconfig.json or explicit permission to create one. Will not silently apply broad refactors or strictness flags without user confirmation.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 24 days ago