Skip to content
Skills Library
Programming · Building & coding

typescript-guide

/typescript-guide

Use when editing or reviewing TypeScript in Node.js ESM projects. Triggers on `.ts` files, ESM `package.json`, and prompts about async functions, type inference, strict mode, ESM imports, env handling, template literals, even when the user doesn't say 'TypeScript'.

Repository
platform ↗
Licence
MIT
Last repository change
08.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
12
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 08.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when editing or reviewing TypeScript in Node.js ESM projects. Triggers on `.ts` files, ESM `package.json`, and prompts about async functions, type inference, strict mode, ESM imports, env handling, template literals, even when the user doesn't say 'TypeScript'.

Triggers from the description

t say
Original author description

Use when editing or reviewing TypeScript in Node.js ESM projects. Triggers on `.ts` files, ESM `package.json`, and prompts about async functions, type inference, strict mode, ESM imports, env handling, template literals, even when the user doesn't say 'TypeScript'.

How it works

  1. Requirements
  2. Essentials
  3. Gotchas
  4. Progressive disclosure
Original SKILL.md headings · 42 lines, 348 words
SKILL.md preview
---
name: typescript-guide
description: "Use when editing or reviewing TypeScript in Node.js ESM projects. Triggers on `.ts` files, ESM `package.json`, and prompts about async functions, type inference, strict mode, ESM imports, env handling, template literals, even when the user doesn't say 'TypeScript'."
---

# TypeScript Coding Guidelines

Write strict TypeScript modules with explicit types, direct imports, and checked errors.

## Requirements

- Node.js ESM, TypeScript ≥ 5.8, Vitest ≥ 3, Zod ≥ 4.

## Essentials

- **Strict mode** - Enable strict flags, avoid `@ts-ignore` without comment+issue
- **Type safety** - Explicit public types, `unknown` over `any`, derive from generated types
- **Imports** - Use `import type` for type-only imports
- **Async/await** - Handle errors explicitly, only use `async` with `await`, see [references/async-without-await.md](references/async-without-await.md), [references/unnecessary-async-keywords.md](references/unnecessary-async-keywords.md)
- **Immutability** - Use `const`/`readonly` where possible
- **Validation** - Zod for I/O boundaries, infer types from schemas
- **Linting** - Never suppress with eslint-disable, fix root causes, see [references/avoid-eslint-disable.md](references/avoid-eslint-disable.md)
- **Template literals** - Convert numbers with `String(value)`, see [references/template-literals-require-string-conversion.md](references/template-literals-require-string-conversion.md)
- **Numeric literals** - Use underscores in large numbers (`30_000`), see [references/numeric-separator-enforcement.md](references/numeric-separator-enforcement.md)
- **Method references** - Keep object references to maintain `this` binding, see [references/unbound-method-references.md](references/unbound-method-references.md)
- **Environment** - Use dot notation for `process.env` access, see [references/env-access-bracket-notation.md](references/env-access-bracket-notation.md)
- **Paradigm** - Functional style → **fp-guide**; class/OO design → **oop-guide**

## Gotchas

- Structural typing means `{ a: string }` accepts `{ a: string, b: number }` silently: explicit `satisfies` is the way to catch unintended extras
- `as` casts bypass the type system without check: prefer narrowing functions (type predicates) over casts
- `type` vs `interface`: interfaces merge across declarations, types don't. `declare global { interface Window { ... } }` works, `type Window = ...` doesn't
- `unknown` is the safer `any`, but it doesn't propagate; narrowing once doesn't carry across assignments
- Module resolution depends on `tsconfig` `moduleResolution` (`bundler` vs `node16` vs `nodenext`): wrong choice silently breaks deep imports

## Progressive disclosure

- Read [references/async-without-await.md](references/async-without-await.md) - Load when seeing async functions that don't use await
- Read [references/unnecessary-async-keywords.md](references/unnecessary-async-keywords.md) - Load when simplifying synchronous controller functions
- Read [references/avoid-eslint-disable.md](references/avoid-eslint-disable.md) - Load when tempted to suppress linting warnings
- Read [references/template-literals-require-string-conversion.md](references/template-literals-require-string-conversion.md) - Load when inserting numbers in template literals
- Read [references/numeric-separator-enforcement.md](references/numeric-separator-enforcement.md) - Load when writing large numeric literals
- Read [references/unbound-method-references.md](references/unbound-method-references.md) - Load when passing methods as callbacks or references
- Read [references/env-access-bracket-notation.md](references/env-access-bracket-notation.md) - Load when accessing process.env variables
Files in this package (12)
  • SKILL.md 4 KB
  • SOURCES.md 1 KB
  • eval-queries.json 4 KB
  • evals.json 2 KB
  • moon.yml 1 KB
  • references/async-without-await.md 1 KB
  • references/avoid-eslint-disable.md 1 KB
  • references/env-access-bracket-notation.md 1 KB
  • references/numeric-separator-enforcement.md 1 KB
  • references/template-literals-require-string-conversion.md 1 KB
  • references/unbound-method-references.md 1 KB
  • references/unnecessary-async-keywords.md 1 KB

Versions

RepositoryScoreLicence
This page · xonovex/platform90MIT
ar4mirez/samuel100MIT

Database snapshot: 13.11.2026 · package version b537b495c719 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90conventions-typescript
    TypeScript and Node.js default conventions — strict config, runtime validation at boundaries, unions over flags, error handling, ESM, exports, async. Use when writing TS/JS code, configuring tsconfig or package.json, or debugging type errors.
  • 100node
    Guide for the Node.js runtime in TypeScript projects. Use when working with async/await and Promises, reading or writing streams, choosing between ESM and CommonJS, configuring package.json exports, picking npm/pnpm/bun, managing Node versions with mise, or wiring Node CI/CD.
  • 100typescript-node-conventions
    Use when writing, reviewing, or setting conventions for TypeScript code that runs on Node.js or Bun — strict typing discipline (strict mode, unknown over any, no implicit any), the ESM/CJS module interop boundary (moduleResolution, verbatimModuleSyntax, package.json exports…
  • 100typescript-node-stinger
    Review TypeScript and Node code. Use for SvelteKit types, tsconfig, ESM, Zod boundaries, testing, or npm package builds. Read README.md for the guide map.
  • 100typescript
    You MUST use this when working on TypeScript-specific problems - compiler errors, tsconfig, strict typing, type inference, generics, complex type definitions, module resolution, ESM/CJS interoperability, type-checking performance, migration, or monorepo configuration. Also…
  • 100typescript-patterns
    TypeScript type system patterns, generics, utility types, and strict mode best practices. Use when writing or reviewing TypeScript code.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.