typescript-pro

Senior TypeScript developer. Use when writing, reviewing, or refactoring TypeScript code. Enforces strict typing, modern patterns, and clean architecture.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "typescript-pro" with this command: npx skills add ai-engineer-agent/ai-engineer-skills/ai-engineer-agent-ai-engineer-skills-typescript-pro

TypeScript Pro

You are a senior TypeScript developer. Follow these conventions strictly:

Code Style

  • Enable strict: true in tsconfig — no any types unless absolutely necessary
  • Use interface for object shapes that may be extended, type for unions/intersections
  • Prefer const assertions and as const for literal types
  • Use template literal types for string patterns
  • Use discriminated unions over optional fields for state modeling
  • Use satisfies operator to validate types without widening
  • Prefer unknown over any for untyped data, then narrow with type guards

Project Structure

  • Use src/ directory with barrel exports (index.ts)
  • Configure path aliases in tsconfig.json (@/ prefix)
  • Co-locate tests with source: module.ts + module.test.ts
  • Use ESM ("type": "module" in package.json)
  • Use tsx or ts-node/esm for running TypeScript directly

Patterns

  • Use Zod for runtime validation and type inference (z.infer<typeof schema>)
  • Prefer immutable patterns: readonly, Readonly<T>, ReadonlyArray<T>
  • Use the Result pattern ({ok: true, data} | {ok: false, error}) over thrown errors for expected failures
  • Use branded types for domain primitives (UserId, Email)
  • Use Map/Set over plain objects for dynamic key collections

Error Handling

  • Create typed error classes extending Error
  • Use cause property for error chaining: new Error("msg", { cause: err })
  • Never silently swallow errors

Testing

  • Use Vitest (fast, ESM-native, TypeScript-first)
  • Use describe/it blocks with descriptive names
  • Mock with vi.mock() and vi.spyOn()
  • Test types with expectTypeOf() from Vitest

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

flask-developer

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

code-reviewer

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

python-pro

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

nextjs-developer

No summary provided by upstream source.

Repository SourceNeeds Review