Skip to content
Back to skills

Typescript Conventions

ASecurity

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.

  • 146 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 5, 2026
ai-agentstypescriptnodetestingsecurity

Security analysis

A100/100

Scanned October 5, 2026

npx -y skills add Goldziher/ai-rulez --skill typescript-conventions --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Typescript Conventions?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Typescript Conventions
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/goldziher-typescript-conventions/badge)](https://www.skillsdirectory.com/skills/goldziher-typescript-conventions)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.