typescript-write — Claude Code skill: strict TypeScript with types
Skill for writing and editing TypeScript and JavaScript code to Metabase standards. Enforces strict typing without any and requires type checking before completion.
npx skills add metabase/metabase --skill typescript-write -a claude-codeWhat typescript-write does
typescript-write guides edits to TS/TSX/JS/JSX files in Metabase projects, enforcing internal coding standards. Before any frontend changes—including test-only edits—the skill directs you to read frontend/CLAUDE.md and related docs.
The core rule: no any in new or modified code. The skill requires capturing untyped values as unknown, narrowing types before use. After each TS/TSX change, run bun run type-check-pure to verify types are sound. It favors TypeScript utilities (Partial, Pick, Record, generics) over type casts and models data with precise types—optional fields marked ?, distinguishing absence from undefined.
This is guidance for developers, not automatic refactoring. The skill steers you toward reusing types from metabase-types, using discriminated unions for variant state, and justifying unavoidable casts with comments. Test authoring follows separate rules.
What it helps with
- Remove implicit
anytypes from TypeScript code - Normalize types for API responses and external data
- Model optionality and absence correctly in type signatures
- Reduce type casts by fixing function signatures
- Write typed tests following project standards
Example prompts for the agent
- Help me write a React component with proper types and no `any`, using types from `metabase-types`
- Refactor this function to handle `unknown` from JSON instead of `any`
- Write a typed test for this hook with correct fixtures and assertions
How to install typescript-write
1Skills CLI (Vercel)
npx skills add metabase/metabase --skill typescript-write -a claude-code2Manually: put the files in place
~/.claude/skills/typescript-write/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/typescript-write/
1Skills CLI (Vercel)
npx skills add metabase/metabase --skill typescript-write -a codex2Manually: put the files in place
.agents/skills/typescript-write/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add metabase/metabase --skill typescript-write -a cursor2Manually: put the files in place
.cursor/skills/typescript-write/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install metabase/metabase typescript-write2Manually: put the files in place
.github/skills/typescript-write/SKILL.md1Skills CLI (Vercel)
npx skills add metabase/metabase --skill typescript-write -a gemini-cli2Platform CLI
gemini skills install https://github.com/metabase/metabase --path .claude/skills/typescript-writeManually: put the files in place
.devin/skills/typescript-write/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add metabase/metabase --skill typescript-write -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set3
The whole set →Similar
Questions about typescript-write
How do I install typescript-write in Claude Code?
Run npx skills add metabase/metabase --skill typescript-write -a claude-code. The skill installs to ~/.claude/skills/typescript-write/SKILL.md.
What does typescript-write do?
The skill guides TypeScript editing in Metabase projects: enforces strict typing, forbids any, teaches proper type modeling, and verifies types via bun run type-check-pure.
Why is type checking required before finishing?
Running bun run type-check-pure catches type errors and ensures any has not leaked into new code. This requirement upholds Metabase's typing standards.