← ClaudeAtlas

better-typescriptlisted

Apply this skill for any task involving TypeScript: writing new code, refactoring, reviewing, debugging, designing types, structuring modules, or answering questions about TS patterns. Use it whenever the user mentions TypeScript, .ts/.tsx files, types, interfaces, generics, or any TS ecosystem (Node, Deno, Bun, React, Next.js, tRPC, Zod, etc.) — even if the question seems simple.
josbert-m/skills · ★ 0 · Code & Development · score 63
Install: claude install-skill josbert-m/skills
# TypeScript Skill This skill extends the main foundations of how Claude Code approaches TypeScript, providing a more detailed and specific approach for writing high-quality TS code. ## General Philosophy - **Correctness first**: code must be correct before being elegant. - **Types as documentation**: types are explicit contracts, not a formality. If a type says `string`, it must always be `string` — not accidentally `string | undefined`. - **Explicit over implicit**: prefer clarity over brevity when there is ambiguity. - **No `any` without justification**: `any` is technical debt. If used, the reason must be commented. --- ## Default Assumed Configuration Unless the user indicates otherwise, assume: ```json // tsconfig.json (strict mode) { "compilerOptions": { "strict": true, "noUncheckedIndexedAccess": true, "exactOptionalPropertyTypes": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "moduleResolution": "bundler", "target": "ES2024", "module": "ESNext" } } ``` ```json // .prettierrc (for consistent formatting) { "tabWidth": 2, "useTabs": false, "semi": true, "singleQuote": true, "trailingComma": "all", "printWidth": 100 } ``` If the project has a `tsconfig.json` and/or `.prettierrc` visible in context, read it **first** and adjust all suggestions to that real configuration. --- ## Types and Structures See [Type Preferences](./references/types.md) for details. --- ## Code Patterns See [Cod