Selective use of functional TypeScript patterns and domain-model responsibilities. Use when a task involves a state machine, discriminated union, Option/Result/Either/Effect API, branded or opaque type, typed domain decoding, or deciding which layer should own construction and transformation. Do not use to add a domain model when existing schemas and types already cover the requirement.
Ships in typescript. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Functional patterns solve specific modeling defects. They are not a default architecture or an extra layer to place around working project types.
Follow this order and stop at the first step that satisfies the task:
Do not continue down the list once the existing representation can express the requirement safely.
Static<typeof Schema> and TypeBox composition rather than handwritten mirrors.typeof table.$inferSelect,
typeof table.$inferInsert, or the inference convention already used by the
package.InputItem<typeof Entity>,
FormattedItem<typeof Entity>, and the entity's item schema.Option, Result, Either, and
effect types, constructors, and matching conventions.fromRequest, Drizzle
fromRow/toRow, or DynamoDB fromItem/toItem methods.Keep pure invariant functions pure. Do not impose an import-purity rule on an
entire domain/ directory. A domain model may import request, Drizzle row, or
DynamoDB Toolbox item types when type-only imports prevent duplicate mirror
types. It may also construct an Effect value to represent typed success,
failure, or absence when doing so does not execute the Effect or reach external
state.
Domain models must not import Fastify handlers, database clients, DynamoDB commands, SQL builders, Layers, runtime execution, configuration, or environment access. Those dependencies belong at the application or repository boundary.
Do not place a handwritten tagged, branded, or class-based model between an API schema and a persistence schema merely to rename fields or repeat validation. When no domain model is justified, convert at the active boundary without inventing one.
Different boundaries may legitimately have different types. A TypeBox request, a Drizzle row, and a DynamoDB item do not need a third universal domain type to connect them. Reuse an existing behavior-rich domain entity when the package already has one, but do not create an entity class solely to wrap a row or item.
Add a custom tagged union, brand, opaque type, Option, or Result only when all
of these conditions hold:
If any condition fails, keep the existing representation.
"pending" | "settled" before wrapping each value
in a tagged object.Option or
Result.Validation, nullability, recoverable failure, identifiers, and domain terminology do not by themselves justify a custom type.
Read only the reference needed for the active problem:
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
No slash command · from typescript
npx claudepluginhub martinffx/typescript-skills --plugin typescript8 skills in this plugin
/typescript-api-designREST API design patterns. Use when designing endpoints, error responses, pagination, versioning, or API structure. Framework-agnostic principles for building consistent, maintainable APIs./typescript-build-toolsTypeScript project tooling with Bun or pnpm, TypeScript 7, Vitest, Biome or Oxc (Oxlint and Oxfmt), and Turborepo. Use when setting up package.json scripts, running builds, typechecking, configuring tests, linting, formatting, or orchestrating monorepo development./typescript-drizzle-ormType-safe SQL with Drizzle ORM in TypeScript. Use when defining database schemas, writing queries, setting up relations, running migrations, working with PostgreSQL/MySQL/SQLite/Cloudflare D1/Durable Objects data layers, or integrating drizzle-orm/effect-postgres with @effect/sql-pg and Effect Layers./typescript-dynamodb-toolboxDynamoDB single-table design using dynamodb-toolbox v2. Use when creating entities, defining key patterns, designing GSIs, writing queries, implementing pagination, or working with any DynamoDB data layer in TypeScript projects./typescript-effect-tsBuild, review, or migrate TypeScript applications using Effect v3 or v4. Use whenever code imports from effect or @effect/*, integrates drizzle-orm/effect-postgres with @effect/sql-pg, or works with Effect.gen, typed errors, Result or Either, Context services, Layer dependency injection, Schema validation, fibers, concurrency, Scope, or acquireRelease. Resolve the installed Effect major before suggesting APIs so v3 and v4 syntax are never mixed./typescript-fastifyBuilding REST APIs with Fastify in TypeScript. Use when creating routes, handling requests, implementing validation with TypeBox, structuring applications, or working with HTTP handlers and plugins.