Skip to content
Back to skills

Convert To Typescript

ASecurity

Converts a JavaScript file to TypeScript with real types and no any shortcuts, and keeps the build and tests passing.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 15, 2026
ai-agentsjavascripttypescriptrustjavagit

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add workspace-templates/ai-agent-templates --skill convert-to-typescript --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Convert To Typescript?

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

Security grade badge for Convert To Typescript
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/workspace-templates-convert-to-typescript-ai-agent-templates/badge)](https://www.skillsdirectory.com/skills/workspace-templates-convert-to-typescript-ai-agent-templates)

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: convert-to-typescript
description: Converts a JavaScript file to TypeScript with real types and no any shortcuts, and keeps the build and tests passing.
disable-model-invocation: true
---

Convert to TypeScript: $ARGUMENTS

1. Read the target file and everything that imports it. Check `tsconfig.json` for `strict`, `allowJs` and path aliases, and follow the strictness already set.
2. Rename with `git mv` so history follows (`.js` to `.ts`, `.jsx` to `.tsx`).
3. Derive types from real usage: read call sites, tests and JSON shapes. Prefer `interface` or `type` for domain objects, union types for fixed options, generics for containers, and `unknown` plus narrowing for untrusted input.
4. Never write `any`, `as any` or `@ts-ignore`. Use `@ts-expect-error` with a reason only where a library type is wrong, and report each one.
5. Add types for dependencies from `@types/*` when missing, but ask before installing.
6. Fix real bugs the compiler exposes in a separate list, not silently.

Run `tsc --noEmit` and the tests. Report the new types, the remaining suppressions, and any bug found. Do not convert other files unless asked.

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.