← ClaudeAtlas

typescriptlisted

Patterns and conventions for all TypeScript code. Use this skill whenever writing or reviewing TypeScript, naming identifiers, typing exports, choosing between type and interface, using Zod schemas, structuring function parameters, or enforcing code patterns like avoiding switch statements and enums.
gaia-react/gaia · ★ 15 · Code & Development · score 83
Install: claude install-skill gaia-react/gaia
# TypeScript Patterns and conventions for all TypeScript code. ## Types - `import type {}` for type-only imports: `import type {FC} from 'react'` ## Naming, camelCase All identifiers use camelCase: Zod fields, form `name`/`id`/`htmlFor`, props, state, params. **Exceptions (snake_case OK):** - `types/database.ts`, mirrors DB column names - Dynamic template literal names where variable part is already lowercase - Environment variable names (`SUPABASE_URL`) Map snake_case ↔ camelCase at API call boundaries, not in schemas or UI code. ## Naming, Descriptive and Self-Documenting Follow Apple's Swift API Design Guidelines: names should be clear at the point of use, reading like prose. Favor long, descriptive names over short or abbreviated ones. Code should be readable without consulting documentation. - **Functions and methods**: imperative verb phrases: `calculateProgressPercentageFromCompletedSets`, `processUserOnboardingProfile` - **Parameters**: role, not type: `totalSeconds` not `n`, `emailAddress` not `s` - **Variables**: what they hold: `restDurationInSeconds`, `submitButton`, `weightInputValue` - **No abbreviations**: spell out unless universally known (`url`, `id`, `api`): `animationDurationInMilliseconds` not `animDur` - **No redundant words**: `availableExercises` not `exerciseArray`, but don't sacrifice clarity for brevity > **Exception, React event handlers** follow `handle{Action}{Element}` from the react-code skill > (e.g. `handleClickSave`, `handleChang