/enterprise-software-playbook:typescriptfrom enterprise-software-playbook
Write, review, and refactor TypeScript for readability, type safety, and runtime correctness. Use when creating TS modules, modeling domain types, handling errors (Result/Either), validating inputs (Zod/io-ts), or preventing cyclic dependencies.
Ships in enterprise-software-playbook. 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.
Produce TypeScript that is easy to read, easy to change, and safe at runtime—by treating the codebase as a system: explicit boundaries, explicit dependencies, explicit errors, and explicit lifetimes.
Most of the principles here translate to other languages; the TypeScript-specific parts are mainly about how to enforce them with TS tooling and types.
Default objectives:
A note on scope: these guidelines are optimized for systemic TypeScript (long‑lived apps/services/libraries where ownership, I/O boundaries, and runtime behavior matter). For short‑lived scripts, you can relax some constraints (e.g. more throw, fewer abstractions) as long as the blast radius stays small.
Definitions:
throw is usually fine.design); designing shared platform libraries (use platform).Inputs: TypeScript source files to create, review, or refactor. Outputs: Modified/created TypeScript source files following style guide principles. Applied inline during implementation; no downstream skill consumes output directly.
unknown.throw for unknown/unrecoverable; catch and convert at boundaries.import type for type-only imports.resilience) and keep telemetry consistent (observability); if 2+ services need the same boundary primitive, extract it (see platform).When context or time is constrained, these are the load-bearing steps:
unknown, validate at edges, make known failures explicit in types.import type for type-only.Steps that can be cut under pressure: explicit lifetime modeling (step 8), agent patterns for long-running work (step 9), full composition root wiring (step 6).
For the full set of guidelines, see references/guidelines.md. Key highlights:
throw is untyped, serialization is not bijective, no deterministic destructors, cyclic deps break systems.Result / tagged unions; reserve throw for unknown/unrecoverable; catch at boundaries.unknown; validate/parse once at the edge; keep "wire" shapes separate from domain types.AbortSignal for cancellation.unknown once at boundaries, then trust typed values internally.index.ts) across layer boundaries: they hide cyclic dependencies and bloat bundles.close/dispose.any as a shortcut: prefer unknown + narrowing at boundaries, or generics for reusable code.GLOSSARY.mdspecresilienceobservabilityplatformUse this list when reviewing/refactoring TypeScript:
any; unknown is narrowed/decoded before use.as casts from JSON/env/network input.Result); no sentinel returns; internal code is effectively “throwless”.AbortSignal.When asked to apply this guide, respond with:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
17 skills in this plugin
/architectureDesign or refactor multi-service system architecture (domain boundaries, service decomposition, event-driven vs request/response, CQRS, sagas, API gateways, data ownership). Use when work spans multiple processes/services, needs eventual consistency, or requires clearer integration seams. NOT for in-process code structure like GoF patterns (use design); NOT for applying timeouts/retries/breakers to a single call (use resilience)./archobsRun architecture observability analysis on a git repository to measure coupling, boundary health, risk hotspots, and temporal drift. Use when you need empirical data about code structure before making architecture or refactoring decisions, or to validate that changes improved boundary discipline. NOT for choosing architecture patterns (use architecture); NOT for choosing code patterns (use design); NOT for adversarial code review (use review); NOT for trajectory prediction or trend forecasting from cluster activity (use forecast)./debugTriage and diagnose production or local issues by following logs → traces → metrics (HTTP/gRPC/async). Use when investigating errors, latency spikes, 5xx responses, SLO violations, or regressions in an instrumented app. NOT for adding new instrumentation (use observability); NOT for applying resilience patterns (use resilience).npx claudepluginhub bricerising/enterprise-software-playbook --plugin enterprise-software-playbook