agentleFS
jscraikjscraik/Agent-Skills/Skills/agent-ops/typescript/SKILL.md

typescript

Skill9 starsChanged 46 days agoApache-2.0View on GitHub

Use when authoring or reviewing TypeScript code that requires strict type safety, explicit module contracts, and predictable runtime boundaries.

66 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use msw, rust and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • thongdn-itSkill

    msw

    MSW (Mock Service Worker) best practices for API mocking in tests (formerly test-msw). This skill should be used when setting up MSW, writing request handlers, or mocking HTTP APIs. This skill does NOT cover general testing patterns (use test-vitest or test-tdd skills) or test methodology.

    Also in 3 projects that use this

  • MicrosoftSkill

    rust

    Use this guide when working on Rust changes in the FAST monorepo.

    Also in 9 projects that use this

  • SupabaseSkill

    react-hook-form

    Correct React Hook Form usage anywhere in the monorepo — data flow, subscriptions,

    Also in 3 projects that use this

  • VercelSkill

    react

    React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.

    Also in 10 projects that use this

  • leonaaardobSkill

    drizzle

    Complete Drizzle ORM documentation in markdown format. Use when working with Drizzle ORM - covers schema definition, queries, migrations, database connections (PostgreSQL, MySQL, SQLite), integrations (Neon, Supabase, PlanetScale, Cloudflare D1, Turso), column types, relations, transactions, and framework usage (Next.js, SvelteKit, Astro).

    Also in 3 projects that use this

  • thongdn-itSkill

    tailwind

    Tailwind CSS v4 performance optimization and best practices guidelines (formerly tailwindcss-v4-style). This skill should be used when writing, reviewing, or refactoring Tailwind CSS v4 code to ensure optimal build performance, minimal CSS output, and correct usage of v4 features. Triggers on tasks involving Tailwind configuration, @theme directive, utility classes, responsive design, dark mode, container queries, or CSS generation optimization.

    Also in 5 projects that use this

  • +1 more from thongdn-it

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 11 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 52 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use for TypeScript code authoring or review.

    line 21
  2. Distinctive:

    Use when strict typing and API contracts need hardening.

    line 22
  3. Very specific:

    Avoid any; model unknown values with guards and narrow types.

    line 38
  4. Distinctive:

    Prefer explicit return types on exported functions.

    line 39
  5. Distinctive:

    Use discriminated unions for stateful workflows.

    line 40
  6. Distinctive:

    Prefer named exports over default exports in shared modules.

    line 46
  7. Distinctive:

    Keep runtime validation close to IO boundaries.

    line 47
  8. Distinctive:

    Avoid barrel files when they obscure ownership.

    line 48
  9. Distinctive:

    If domain types are unclear, pause and request schema clarification.

    line 62
  10. Distinctive:

    Keep guidance deterministic so repeated runs produce consistent decisions.

    line 81
  11. Distinctive:

    Run the relevant local checks for touched files and workflow contracts.

    line 91
  12. Distinctive:

    Read when: the task needs advanced edge cases, migration-safe patterns, or runtime-specific nuance beyond the core checklist.

    line 104

“Common” is measured: kept by at least 6 in 10 of the 52 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Table of Contents

  • When to use
  • Required inputs
  • Deliverables
  • Type Safety
  • Module Boundaries
  • Examples
  • Failure mode
  • Gotchas

When to use

  • Use for TypeScript code authoring or review.
  • Use when strict typing and API contracts need hardening.

Required inputs

  • Target files or module scope.
  • Runtime constraints (Node/browser/edge).
  • Existing type errors or contract requirements.

Deliverables

  • Type-safe implementation changes.
  • Explicitly typed exported surfaces.
  • Notes for any unavoidable tradeoffs.

Type Safety

  • Avoid any; model unknown values with guards and narrow types.
  • Prefer explicit return types on exported functions.
  • Use discriminated unions for stateful workflows.
  • Redact secrets, tokens, credentials, and sensitive data by default.

Module Boundaries

  • Prefer named exports over default exports in shared modules.
  • Keep runtime validation close to IO boundaries.
  • Avoid barrel files when they obscure ownership.

Examples

export function parsePort(value: string): number {
  const parsed = Number.parseInt(value, 10)
  if (Number.isNaN(parsed)) throw new Error(`Invalid port: ${value}`)
  return parsed
}

Failure mode

  • If domain types are unclear, pause and request schema clarification.

Gotchas

  • Casting with as unknown as hides real typing defects.

See Also

SkillWhen to use
[[javascript-pro]]Base JavaScript patterns when runtime compatibility and async flow need attention
[[biome-linting]]Enforce TypeScript lint and format rules with Biome

Topic map: [[agent-ops]]

Philosophy

  • Optimize for clear, verifiable outcomes with the minimum necessary changes.
  • Keep guidance deterministic so repeated runs produce consistent decisions.

Procedure

  1. Confirm scope, constraints, and required inputs before edits.
  2. Apply focused changes tied directly to the requested outcome.
  3. Re-run the highest-signal validations and capture concrete evidence.

Validation

  • Run the relevant local checks for touched files and workflow contracts.
  • Fail fast: stop at the first blocking validation failure and report exact evidence.
  • Re-run checks after fixes and record residual risk if any remains.

Anti-patterns

  • Skipping validation after making changes.
  • Applying broad refactors to solve narrow issues.
  • Assuming behavior without evidence from current checks.

References and assets

  • Open deep guidance: Infrastructure/references/deep-guidance.md
  • Read when: the task needs advanced edge cases, migration-safe patterns, or runtime-specific nuance beyond the core checklist.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.