Claude Cursor Skill

typescript-conventions

TypeScript code conventions covering strict tsconfig, ESM imports, discriminated unions, formatting/linting, Vitest testing, lockfile-based packaging, Node.js, and security. Load when writing or reviewing TypeScript code.

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download goldziher-ai-rulez-internal_builtins_languages_typescript_skills_typescript-conventions-ca967ad.zip · 0 KB
Part of goldziher/ai-rulez — 151 skills

Install

skills CLI npx skills add https://github.com/Goldziher/ai-rulez/tree/main/internal/builtins/languages/typescript/skills/typescript-conventions
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install goldziher-ai-rulez@llmmart
Git git clone https://github.com/Goldziher/ai-rulez.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole goldziher/ai-rulez collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

  • strict: true + noUncheckedIndexedAccess in tsconfig, never any — use unknown with type guards.
  • ESM imports only, const over let, as const for literals, interface over type for objects.
  • import type for type-only imports to avoid runtime overhead. Discriminated unions for type-safe state.
  • Formatting/linting: a formatter + linter (e.g., Prettier + ESLint, or Biome). Type checking: tsc --noEmit in CI.
  • Testing: a fast test runner (e.g., Vitest or Jest), 80%+ coverage. Runtime validation at system boundaries with a schema validator (e.g., Zod).
  • Error handling: discriminated unions for expected errors, throw only for unexpected.
  • Package manager: a lockfile-based package manager (npm, pnpm, or yarn) with the lockfile committed, build: a bundler (e.g., tsup or esbuild).
  • Monorepo: workspace protocol (workspace:*), shared tsconfig base, a workspace manifest (e.g., pnpm-workspace.yaml).
  • Node.js: node: prefix for core modules, fetch over axios.
  • Security: npm audit/pnpm audit for dependency CVE scanning. Zero tolerance for critical/high vulnerabilities.
  • Anti-patterns: non-null assertions (!), type assertions (as), enum (use unions), @ts-ignore.
Files (ai-rulez)
  • SKILL.md 1.5 KB
    ---
    name: typescript-conventions
    description: TypeScript code conventions covering strict tsconfig, ESM imports, discriminated unions, formatting/linting, Vitest testing, lockfile-based packaging, Node.js, and security. Load when writing or reviewing TypeScript code.
    ---
    
    - `strict: true` + `noUncheckedIndexedAccess` in tsconfig, never `any` — use `unknown` with type guards.
    - ESM imports only, `const` over `let`, `as const` for literals, `interface` over `type` for objects.
    - `import type` for type-only imports to avoid runtime overhead. Discriminated unions for type-safe state.
    - Formatting/linting: a formatter + linter (e.g., Prettier + ESLint, or Biome). Type checking: `tsc --noEmit` in CI.
    - Testing: a fast test runner (e.g., Vitest or Jest), 80%+ coverage. Runtime validation at system boundaries with a schema validator (e.g., Zod).
    - Error handling: discriminated unions for expected errors, throw only for unexpected.
    - Package manager: a lockfile-based package manager (npm, pnpm, or yarn) with the lockfile committed, build: a bundler (e.g., tsup or esbuild).
    - Monorepo: workspace protocol (`workspace:*`), shared tsconfig base, a workspace manifest (e.g., `pnpm-workspace.yaml`).
    - Node.js: `node:` prefix for core modules, `fetch` over `axios`.
    - Security: `npm audit`/`pnpm audit` for dependency CVE scanning. Zero tolerance for critical/high vulnerabilities.
    - Anti-patterns: non-null assertions (`!`), type assertions (`as`), `enum` (use unions), `@ts-ignore`.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related