Agent skill · software engineering · metabase
typescript-write
Write TypeScript and JavaScript code following Metabase coding standards and best practices. Use when developing or refactoring TypeScript/JavaScript code.
Why this skill is useful
Provides specific TypeScript coding standards and best practices that enhance type safety and prevent common pitfalls, which the AI may not generate on its own.
What it needs
About 4k tokens when loaded. Last updated 2026-08-07. 48,568 stars on the source repository.
What this skill does
TypeScript/JavaScript Development Skill @./../shared/development-workflow.md @./../shared/typescript-commands.md @./../shared/react-redux-patterns.md No any — hard rule New code must not introduce any, explicit or implicit. No any annotations, no as any / as unknown as, no untyped parameters or returns that infer any, no implicitly-any destructures or array/object literals. Untyped third-party / boundary values must be typed at the boundary (a declared type, unknown + type guard, or a small typed wrapper) — never let any propagate inward. Mandatory type verification. Before finishing a TS/TSX change, run bun run type-check-pure. If TypeScript LSP tools are available, also inspect changed symbols with hover and go-to-definition; otherwise skip LSP check. Type tightening Avoid type casts and loose unknown — fix the signature instead. If a function only needs one field of a wide object, accept that field — not the wide object. The cast often disappears once the signature is right. Reach for Partial<T>, Pick<T, K>, Record<K, V>, and generics before reaching for a cast. Prefer making props/components generic (<T>) when a value flows through unchanged and the caller knows the type. Prefer unknown over loose typing and narrow before use — an unknown value forces a guard at the point of use. satisfies for object literals that must conform without widening (config objects, lookup maps, discriminated literals) — better than : T (widens) or as T (unsafe). Avoid non-null assertions (!). Prefer a guard, early return, or ?.. Use ! only when non-nullness is provably true and localized, with a comment. No redundant runtime coercion — don't wrap already-typed values in Number() / String() / Boolean(). Type guards belong in frontend/src/metabase-types/guards/. Do not redefine them locally. A cast you can't avoid needs a real justification comment. The metabase/no-unjustified-type-casts rule accepts any preceding comment — state the actual reason the cast is safe. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills metabase/typescript-write