JavaScript and TypeScript Engineering
Use this skill for project-neutral JS/TS implementation and workflow work. Inspect
the repository before assuming a runtime, package manager, framework, formatter,
linter, test runner, or bundler.
Use When
- Editing
.js, .jsx, .ts, .tsx, .mts, .cts, package manifests,
lockfiles, TypeScript configs, lint/format configs, build configs, tests, CLIs,
workspaces, or project scripts.
- Working with Node.js, npm,
npx, pnpm, Yarn, Deno, Bun,
package-manager migration, or one-off package CLIs.
- Reviewing JS/TS correctness, types, async behavior, module boundaries,
dependency changes, formatting/linting, build output, or runtime compatibility.
Do not use this skill for Rust, Python, database-native design, or checked-in
Playwright test design. Use playwright-e2e for
Playwright specs/configs and browser-visible test lanes. Use
css-scss-styling for stylesheet architecture,
CSS/SCSS migration, CSS modules, CSS-in-JS styling choices, utility classes,
responsive layout, and design-token decisions. Use
svelte-sveltekit-engineering for
Svelte component design, runes/reactivity, and SvelteKit routing, load
functions, form actions, and adapters; keep this skill's role to the
underlying package manager, bundler, and generic TypeScript mechanics for
those projects.
Tauri Frontend Routing
For a Tauri application, this skill owns the WebView frontend's JavaScript or
TypeScript source, package manager, bundler, frontend tests, and browser-facing
runtime behavior. Use rust-desktop-gui for the
Rust host, native window lifecycle, IPC integration, and desktop delivery; use
api-design when commands, events, or channels define
a compatibility-sensitive contract. Load security-review
for capabilities, command authorization, plugin permissions, and other WebView
trust boundaries.
MCP SDK Composition
For MCP implementation, load
mcp-server-engineering and its dated
SDK selection record.
The selection record is the canonical source for the selected TypeScript lane's
retrieval-time authority, package/version, tier, core-revision, transport, and
conformance caveats. It is not a target-repository pin or local test result.
MCP TypeScript Mechanics
Use this section only after loading
mcp-server-engineering and its dated
SDK selection record.
They own MCP revision, capability, and transport rules; this section owns v2
package, runtime, type, lifecycle, and test mechanics.
- Discover and resolve the v2 package set: inspect
package.json, the
selected lockfile, workspace dependency boundaries, runtime declaration, and
CI scripts. Resolve compatible @modelcontextprotocol/server and
@modelcontextprotocol/client versions together from the target lockfile;
retain legacy @modelcontextprotocol/sdk only when a deliberate, tested v1
compatibility decision requires it. Do not fetch a package or infer API shape
from the dated record.
- Wire SDK objects at a composition boundary: create the resolved server,
client, registrations, and transport adapter in the executable entry point or
framework bootstrap. Give handlers narrow typed dependencies and delegate to
transport-independent operations. Keep client/connection objects scoped to an
adapter or factory instead of leaking them through application/domain types.
- Use the selected runtime's lifecycle primitives: connect the SDK transport
through its documented adapter, propagate
AbortSignal/request cancellation,
and await every owned close/dispose/shutdown promise in the process or
framework shutdown hook. Do not use unawaited cleanup, process-exit callbacks,
or an SDK connect() call as evidence that transports and background work are
closed. The parent skill, not this section, decides protocol transport policy.
- Pair static and runtime schema checks: model handler data with explicit
TypeScript types and use the resolved SDK's supported Standard Schema or wire
schema adapter. Validate runtime JSON at the boundary and test the derived or
declared input/output schema with representative malformed, optional, and
nested values; a TypeScript type or
as assertion is not validation.
- Test in layers: use the repository's configured runner and runtime. Test
operations independently with fakes, then integration-test the resolved SDK
adapter, schema bridge, abort path, and cleanup with an SDK-supported local or
in-memory transport when available. Run a spawned-process or remote transport
fixture only in an authorized repository lane; obtain protocol test cases from
the parent MCP skill.
Workflow
- Inspect local evidence first:
package.json, lockfiles, bunfig.toml,
deno.json, .npmrc, workspaces, source/test layout, tsconfig*, lint and
formatter config, bundler config, CI, README, and agent instructions.
Use local code navigation, direct reads, and search for symbols, references,
implementations, exact strings, docs, config, logs, fixtures, and generated
assets; use repository commands for tests, builds, and other validation.
- Identify the runtime and package manager actually owned by the repository.
Use Node.js and npm by default when there is no local evidence requiring a
different workflow. Use Bun only when the repo explicitly uses
bun.lock, Bun
scripts, Bun runtime features, or the task is Bun-specific.
- Define the behavior before editing. Use BDD examples for user-visible or CLI
behavior and TDD for focused logic changes and bug fixes.
- Keep boundaries explicit: domain logic, adapters, UI, scripts, generated code,
and external service clients should not blur together. Load
hexagonal-architecture for
ports/adapters and external actors, clean-architecture
for use-case and interface-adapter boundaries, or
onion-architecture for domain/application
rings.
- Verify with the narrowest useful script or direct command first, then broaden
to the repository's lint, type, test, format, and build lanes.
Runtime and Package Manager Rules
- Do not switch package managers silently. Lockfiles are policy evidence:
package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lock, and
deno.lock imply different workflows.
- Use Node.js and npm for install/run/test/add/remove commands by default only
when no repository evidence selects another workflow. Use pnpm, Yarn, Deno,
or Bun when local config, CI, runtime APIs,
deployment target, or workspace policy requires them.
- Do not introduce another lockfile unless the project intentionally supports
multiple package managers.
- Add dependencies when durable project code or a repeatable project workflow
needs them. Prefer locked local executables over fetch-and-run commands.
- Keep package scripts explicit about arguments, environment variables, working
directory, generated files, and exit codes.
Local CPU Parallelism Routing
Compose with parallelism-engineering
when a local CPU-bound JS/TS workload needs data or task decomposition,
partition sizing, bounded worker-pool design, deterministic reduction,
cancellation, or nested-parallelism control. That skill owns the cross-language
parallel design; this skill owns JavaScript/TypeScript worker, runtime, type,
package, and test mechanics.
Do not route ordinary promises, event-loop behavior, async I/O, request fan-out,
or routine concurrency to parallelism-engineering; keep those runtime concerns
in this skill. Use the data-platform owner for Spark/PySpark execution rather
than treating it as local JS/TS parallelism.
WebAssembly Routing
Compose with webassembly-engineering
when JS/TS work includes a general WebAssembly decision: a WAT or .wasm
artifact, WASI or WIT, the Component Model, host/guest contract, runtime or
target selection, capability grants, or Wasm packaging and deployment. That
skill owns those Wasm boundary and compatibility decisions. This skill retains
JS/TS source, package, compiler or binding-tool, browser/framework, host-
integration, and test mechanics; the Wasm skill does not establish JS/TS
toolchain, framework, or binding support.
Package Scripts And One-Off Runners
Use package.json scripts for durable, repository-owned entry points that should
be discoverable and run consistently through the selected package manager. Keep
one short cross-platform command inline. Move quoting-heavy commands, reusable
functions, structured data work, substantial branching, cleanup, or separately
tested behavior into a checked-in script and keep the package script a thin
wrapper. Load script-engineering for that
boundary and script implementation.
Distinguish commands that expose already installed project dependencies from
commands that may fetch code:
- Prefer package scripts or the selected manager's local execution form, such as
npm exec or pnpm exec, for locked project tools. Verify the tool is present
locally when network access or unreviewed fetching is forbidden.
- Treat
npx/npm exec with a missing package, pnpm's pnx/pnpm dlx/pnpx
family, yarn dlx, bunx, and comparable commands as potential
fetch-and-execute operations. Exact aliases, prompts, caches, lifecycle
scripts, and trust controls vary by package-manager version; inspect the
repository's pinned version and current official documentation.
- Use an ephemeral runner only for explicit low-risk exploration or a bounded
maintenance action when the package identity and source are trusted, the
version is exact where practical, network execution is authorized, lifecycle
behavior is understood, and the command receives no secrets or unnecessary
privileges.
- Do not use an ephemeral runner for a recurring project workflow, CI/release or
production execution, offline/reproducible builds, privileged automation, or
untrusted repository input. Add and lock the tool, use an existing trusted
toolchain, or stop and request a supply-chain decision.
- Do not assume a confirmation prompt will protect CI or a non-interactive
agent. Some runners fetch automatically or assume approval without a TTY.
Load
dependency-supply-chain-review
before approving new downloaded executables, package lifecycle scripts,
registry/provenance changes, or fetch-and-run behavior.
Common commands to adapt to the repo:
npm ci
npm run <script>
npx <tool> [args]
pnpm exec <tool> [args]
pnpm dlx <package>@<version> [args]
pnpm install --frozen-lockfile
pnpm run <script>
yarn install --immutable
yarn <script>
bun install --frozen-lockfile
bun run <script>
bunx <package>@<version> [args]
bun test <filter>
deno task <task>
JavaScript and TypeScript Checklist
- Async work is awaited, returned, cancelled, or intentionally detached; promise
rejections are observed and surfaced.
- TypeScript contracts are explicit at module, API, CLI, network, and persistence
boundaries. Avoid
any and broad assertions unless a boundary is genuinely
untyped and checked at runtime.
- Runtime validation exists for untrusted input. Compile-time types do not prove
JSON, form, query, environment, file, plugin, or network data is valid.
- ESM/CJS choices match the repo and runtime. Side effects at import time are
deliberate, cheap, and documented when they affect callers.
- Errors preserve actionable context without logging secrets, tokens, cookies,
credentialed URLs, or private paths.
- Generated types and artifacts are regenerated through the repo's workflow and
not hand-edited.
- Random IDs, tokens, and test data follow
random-data-identifiers.
Pattern Routing
- Load
typescript-javascript-design-patterns
when the change needs JS/TS-specific pattern choices: discriminated unions,
branded types, runtime validation boundaries, functional core/imperative shell,
adapter modules, command or use-case handlers, dependency injection, async
orchestration, or test builders.
- Load
typescript-javascript-antipatterns
when reviewing or refactoring JS/TS smells: any, unsafe assertions, missing
runtime validation, unawaited promises, framework/UI leakage, singleton service
bags, import-time side effects, weak randomness, over-mocked tests, or brittle
E2E tests.
Styling Routing
- Load
css-scss-styling when JS/TS work
touches .css, .scss, .sass, CSS modules, CSS-in-JS, utility-class
conventions, PostCSS/Tailwind/Sass config, design tokens, responsive layout,
or browser-visible cascade behavior.
- Keep this skill focused on package-manager workflow, TypeScript contracts,
bundler integration, component code, tests, and build commands. Let the styling
skill own CSS-vs-SCSS decisions, selector/cascade maintainability,
accessibility-related visual states, and stylesheet migration risks.
API and Observability Routing
- Load
api-design when JS/TS work defines or changes
HTTP/RPC/GraphQL/webhook, SDK, CLI, request/response/error, pagination,
versioning, or generated-client contracts. Keep this skill focused on JS/TS
implementation, types, serializers, package workflow, and tests.
- Load
observability-engineering when
adding or changing structured logs, metrics, traces, correlation IDs, audit
events, frontend/backend diagnostics, or operator-facing telemetry.
- For public API docs, examples, or migration guides, load
api-design first if the contract is still being
shaped; otherwise use
documentation-engineering.
CI, Release, and Container Routing
- Load
ci-release-engineering for hosted
workflow triggers, jobs, matrices, permissions, artifacts, and automated
releases. Keep package scripts and JavaScript/TypeScript build mechanics here.
- Load
container-engineering for
Dockerfile, OCI image, or Compose behavior; keep JS/TS runtime and bundler
behavior here.
Formatting, Linting, Types, and Builds
- Use checked-in scripts when they exist. Otherwise inspect configured tools:
Prettier, ESLint, Biome, TypeScript, tsup, esbuild, Vite, Next.js, Rollup,
Webpack, SWC, Jest, Vitest, Node's test runner, Bun test, or Deno tasks.
- Prettier is formatting only. ESLint/Biome and TypeScript checks cover different
contracts; do not report one as a substitute for the other.
- Run format checks before changing style broadly. Avoid formatting unrelated
files unless the task is explicitly a formatting pass.
- For TypeScript, run the repo's configured typecheck. If none exists, use the
narrowest command that respects local
tsconfig and module resolution.
- For build changes, check bundle/runtime compatibility and generated output only
where the repository expects generated artifacts to be committed.
Testing Guidance
- Unit tests: pure logic, parsers, formatters, validators, state machines,
reducers, and small adapters.
- Integration tests: filesystem, subprocesses, package scripts, API clients,
database adapters, framework wiring, and generated contracts.
- E2E/browser tests: only when browser behavior is the confidence target; use the
Playwright skill for checked-in browser tests.
- Keep tests deterministic: no uncontrolled clocks, ports, network calls, random
seeds, process-global state, shared temp directories, or order dependence.
- Use targeted filters for iteration, then broaden to package/workspace/CI lanes
when the changed surface crosses boundaries.
Security Review Prompts
Load security-review when JS/TS changes touch
auth, sessions, cookies, CSRF/CORS/CSP, cryptography, secrets, .env, command
execution, path handling, uploads/downloads, plugin execution, HTML/Markdown
rendering, SSR, or other implemented trust boundaries. Use
dependency-supply-chain-review
for dependency bumps, lockfile churn, package-manager updates, package scripts,
install/postinstall hooks, one-off CLIs, CI bootstrap, generated clients,
vendored code, provenance, or advisory questions. Use
threat-modeling before or during new auth
middleware, request/API/SSR boundaries, plugins, webhooks, background workers,
external-service integrations, or sensitive data flows. Use
security-review-evidence when
collecting or reporting sensitive security evidence.
Anti-Patterns
- Assuming every JS/TS repo uses React, Next.js, Vite, ESLint, Prettier, Jest,
Vitest, pnpm, Yarn, Bun, or Deno without local evidence.
- Following default
npm/npx instructions after local evidence shows the repo
requires pnpm, Yarn, Bun, or Deno, without translating and verifying them.
- Adding dependencies for trivial standard-library or platform behavior.
- Using
npx, pnpx, pnpm dlx, bunx, or another fetch-and-run command as a
durable substitute for a locked project dependency.
- Letting framework, ORM, SDK, HTTP, UI, or generated-client types leak into core
domain APIs without an intentional adapter boundary.
- Using
Math.random() for secrets, tokens, identifiers, or security-sensitive
test fixtures.
- Reporting a script, typecheck, lint, format, build, or test lane as valid
without checking it exists or running the relevant command.
Successful Use
The final handoff states the source/script/package surface changed, package
manager and lockfile impact, commands run, test/type/lint/format/build evidence,
and any remaining runtime or CI compatibility risk.
Zod Routing
When Zod is selected, load zod-engineering for schema implementation and migration mechanics. This skill retains runtime, package, Standard Schema adapter, and test/tooling mechanics.
1---2name: javascript-typescript-engineering3description: JavaScript and TypeScript engineering guidance. Use when adding, changing, reviewing, testing, linting, formatting, dependency-managing, packaging, or refactoring JS/TS source, package.json scripts, lockfiles, workspaces, CLIs, Node/npm, Bun, Deno, pnpm, or Yarn workflows, or project automation. Do not use for checked-in hosted CI/release-provider or Docker/OCI/Compose configuration except the JS/TS commands they invoke; use ci-release-engineering or container-engineering. Use api-design for public service/SDK/CLI contracts, observability-engineering for telemetry/logging signal design, css-scss-styling for CSS/SCSS/CSS-module/CSS-in-JS/utility styling decisions, and svelte-sveltekit-engineering for Svelte/SvelteKit component, routing, and reactivity decisions. Do not use for checked-in Playwright test design; use playwright-e2e.4---56# JavaScript and TypeScript Engineering78Use this skill for project-neutral JS/TS implementation and workflow work. Inspect9the repository before assuming a runtime, package manager, framework, formatter,10linter, test runner, or bundler.1112## Use When1314- Editing `.js`, `.jsx`, `.ts`, `.tsx`, `.mts`, `.cts`, package manifests,15 lockfiles, TypeScript configs, lint/format configs, build configs, tests, CLIs,16 workspaces, or project scripts.17- Working with Node.js, npm, `npx`, pnpm, Yarn, Deno, Bun,18 package-manager migration, or one-off package CLIs.19- Reviewing JS/TS correctness, types, async behavior, module boundaries,20 dependency changes, formatting/linting, build output, or runtime compatibility.2122Do not use this skill for Rust, Python, database-native design, or checked-in23Playwright test design. Use [`playwright-e2e`](../playwright-e2e/SKILL.md) for24Playwright specs/configs and browser-visible test lanes. Use25[`css-scss-styling`](../css-scss-styling/SKILL.md) for stylesheet architecture,26CSS/SCSS migration, CSS modules, CSS-in-JS styling choices, utility classes,27responsive layout, and design-token decisions. Use28[`svelte-sveltekit-engineering`](../svelte-sveltekit-engineering/SKILL.md) for29Svelte component design, runes/reactivity, and SvelteKit routing, load30functions, form actions, and adapters; keep this skill's role to the31underlying package manager, bundler, and generic TypeScript mechanics for32those projects.3334## Tauri Frontend Routing3536For a Tauri application, this skill owns the WebView frontend's JavaScript or37TypeScript source, package manager, bundler, frontend tests, and browser-facing38runtime behavior. Use [`rust-desktop-gui`](../rust-desktop-gui/SKILL.md) for the39Rust host, native window lifecycle, IPC integration, and desktop delivery; use40[`api-design`](../api-design/SKILL.md) when commands, events, or channels define41a compatibility-sensitive contract. Load [`security-review`](../security-review/SKILL.md)42for capabilities, command authorization, plugin permissions, and other WebView43trust boundaries.4445## MCP SDK Composition4647For MCP implementation, load48[`mcp-server-engineering`](../mcp-server-engineering/SKILL.md) and its dated49[SDK selection record](../mcp-server-engineering/references/sdk-selection.md).50The selection record is the canonical source for the selected TypeScript lane's51retrieval-time authority, package/version, tier, core-revision, transport, and52conformance caveats. It is not a target-repository pin or local test result.5354## MCP TypeScript Mechanics5556Use this section only after loading57[`mcp-server-engineering`](../mcp-server-engineering/SKILL.md) and its dated58[SDK selection record](../mcp-server-engineering/references/sdk-selection.md).59They own MCP revision, capability, and transport rules; this section owns v260package, runtime, type, lifecycle, and test mechanics.6162- **Discover and resolve the v2 package set:** inspect `package.json`, the63 selected lockfile, workspace dependency boundaries, runtime declaration, and64 CI scripts. Resolve compatible `@modelcontextprotocol/server` and65 `@modelcontextprotocol/client` versions together from the target lockfile;66 retain legacy `@modelcontextprotocol/sdk` only when a deliberate, tested v167 compatibility decision requires it. Do not fetch a package or infer API shape68 from the dated record.69- **Wire SDK objects at a composition boundary:** create the resolved server,70 client, registrations, and transport adapter in the executable entry point or71 framework bootstrap. Give handlers narrow typed dependencies and delegate to72 transport-independent operations. Keep client/connection objects scoped to an73 adapter or factory instead of leaking them through application/domain types.74- **Use the selected runtime's lifecycle primitives:** connect the SDK transport75 through its documented adapter, propagate `AbortSignal`/request cancellation,76 and await every owned `close`/`dispose`/shutdown promise in the process or77 framework shutdown hook. Do not use unawaited cleanup, process-exit callbacks,78 or an SDK `connect()` call as evidence that transports and background work are79 closed. The parent skill, not this section, decides protocol transport policy.80- **Pair static and runtime schema checks:** model handler data with explicit81 TypeScript types and use the resolved SDK's supported Standard Schema or wire82 schema adapter. Validate runtime JSON at the boundary and test the derived or83 declared input/output schema with representative malformed, optional, and84 nested values; a TypeScript type or `as` assertion is not validation.85- **Test in layers:** use the repository's configured runner and runtime. Test86 operations independently with fakes, then integration-test the resolved SDK87 adapter, schema bridge, abort path, and cleanup with an SDK-supported local or88 in-memory transport when available. Run a spawned-process or remote transport89 fixture only in an authorized repository lane; obtain protocol test cases from90 the parent MCP skill.9192## Workflow93941. Inspect local evidence first: `package.json`, lockfiles, `bunfig.toml`,95 `deno.json`, `.npmrc`, workspaces, source/test layout, `tsconfig*`, lint and96 formatter config, bundler config, CI, README, and agent instructions.97 Use local code navigation, direct reads, and search for symbols, references,98 implementations, exact strings, docs, config, logs, fixtures, and generated99 assets; use repository commands for tests, builds, and other validation.1002. Identify the runtime and package manager actually owned by the repository.101 Use Node.js and npm by default when there is no local evidence requiring a102 different workflow. Use Bun only when the repo explicitly uses `bun.lock`, Bun103 scripts, Bun runtime features, or the task is Bun-specific.1043. Define the behavior before editing. Use BDD examples for user-visible or CLI105 behavior and TDD for focused logic changes and bug fixes.1064. Keep boundaries explicit: domain logic, adapters, UI, scripts, generated code,107 and external service clients should not blur together. Load108 [`hexagonal-architecture`](../hexagonal-architecture/SKILL.md) for109 ports/adapters and external actors, [`clean-architecture`](../clean-architecture/SKILL.md)110 for use-case and interface-adapter boundaries, or111 [`onion-architecture`](../onion-architecture/SKILL.md) for domain/application112 rings.1135. Verify with the narrowest useful script or direct command first, then broaden114 to the repository's lint, type, test, format, and build lanes.115116## Runtime and Package Manager Rules117118- Do not switch package managers silently. Lockfiles are policy evidence:119 `package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`, `bun.lock`, and120 `deno.lock` imply different workflows.121- Use Node.js and npm for install/run/test/add/remove commands by default only122 when no repository evidence selects another workflow. Use pnpm, Yarn, Deno,123 or Bun when local config, CI, runtime APIs,124 deployment target, or workspace policy requires them.125- Do not introduce another lockfile unless the project intentionally supports126 multiple package managers.127- Add dependencies when durable project code or a repeatable project workflow128 needs them. Prefer locked local executables over fetch-and-run commands.129- Keep package scripts explicit about arguments, environment variables, working130 directory, generated files, and exit codes.131132## Local CPU Parallelism Routing133134Compose with [`parallelism-engineering`](../parallelism-engineering/SKILL.md)135when a local CPU-bound JS/TS workload needs data or task decomposition,136partition sizing, bounded worker-pool design, deterministic reduction,137cancellation, or nested-parallelism control. That skill owns the cross-language138parallel design; this skill owns JavaScript/TypeScript worker, runtime, type,139package, and test mechanics.140141Do not route ordinary promises, event-loop behavior, async I/O, request fan-out,142or routine concurrency to `parallelism-engineering`; keep those runtime concerns143in this skill. Use the data-platform owner for Spark/PySpark execution rather144than treating it as local JS/TS parallelism.145146## WebAssembly Routing147148Compose with [`webassembly-engineering`](../webassembly-engineering/SKILL.md)149when JS/TS work includes a general WebAssembly decision: a WAT or `.wasm`150artifact, WASI or WIT, the Component Model, host/guest contract, runtime or151target selection, capability grants, or Wasm packaging and deployment. That152skill owns those Wasm boundary and compatibility decisions. This skill retains153JS/TS source, package, compiler or binding-tool, browser/framework, host-154integration, and test mechanics; the Wasm skill does not establish JS/TS155toolchain, framework, or binding support.156157## Package Scripts And One-Off Runners158159Use `package.json` scripts for durable, repository-owned entry points that should160be discoverable and run consistently through the selected package manager. Keep161one short cross-platform command inline. Move quoting-heavy commands, reusable162functions, structured data work, substantial branching, cleanup, or separately163tested behavior into a checked-in script and keep the package script a thin164wrapper. Load [`script-engineering`](../script-engineering/SKILL.md) for that165boundary and script implementation.166167Distinguish commands that expose already installed project dependencies from168commands that may fetch code:169170- Prefer package scripts or the selected manager's local execution form, such as171 `npm exec` or `pnpm exec`, for locked project tools. Verify the tool is present172 locally when network access or unreviewed fetching is forbidden.173- Treat `npx`/`npm exec` with a missing package, pnpm's `pnx`/`pnpm dlx`/`pnpx`174 family, `yarn dlx`, `bunx`, and comparable commands as potential175 fetch-and-execute operations. Exact aliases, prompts, caches, lifecycle176 scripts, and trust controls vary by package-manager version; inspect the177 repository's pinned version and current official documentation.178- Use an ephemeral runner only for explicit low-risk exploration or a bounded179 maintenance action when the package identity and source are trusted, the180 version is exact where practical, network execution is authorized, lifecycle181 behavior is understood, and the command receives no secrets or unnecessary182 privileges.183- Do not use an ephemeral runner for a recurring project workflow, CI/release or184 production execution, offline/reproducible builds, privileged automation, or185 untrusted repository input. Add and lock the tool, use an existing trusted186 toolchain, or stop and request a supply-chain decision.187- Do not assume a confirmation prompt will protect CI or a non-interactive188 agent. Some runners fetch automatically or assume approval without a TTY.189190Load191[`dependency-supply-chain-review`](../dependency-supply-chain-review/SKILL.md)192before approving new downloaded executables, package lifecycle scripts,193registry/provenance changes, or fetch-and-run behavior.194195Common commands to adapt to the repo:196197```sh198npm ci199npm run <script>200npx <tool> [args]201pnpm exec <tool> [args]202pnpm dlx <package>@<version> [args]203pnpm install --frozen-lockfile204pnpm run <script>205yarn install --immutable206yarn <script>207bun install --frozen-lockfile208bun run <script>209bunx <package>@<version> [args]210bun test <filter>211deno task <task>212```213214## JavaScript and TypeScript Checklist215216- Async work is awaited, returned, cancelled, or intentionally detached; promise217 rejections are observed and surfaced.218- TypeScript contracts are explicit at module, API, CLI, network, and persistence219 boundaries. Avoid `any` and broad assertions unless a boundary is genuinely220 untyped and checked at runtime.221- Runtime validation exists for untrusted input. Compile-time types do not prove222 JSON, form, query, environment, file, plugin, or network data is valid.223- ESM/CJS choices match the repo and runtime. Side effects at import time are224 deliberate, cheap, and documented when they affect callers.225- Errors preserve actionable context without logging secrets, tokens, cookies,226 credentialed URLs, or private paths.227- Generated types and artifacts are regenerated through the repo's workflow and228 not hand-edited.229- Random IDs, tokens, and test data follow230 [`random-data-identifiers`](../random-data-identifiers/SKILL.md).231232## Pattern Routing233234- Load235 [`typescript-javascript-design-patterns`](../typescript-javascript-design-patterns/SKILL.md)236 when the change needs JS/TS-specific pattern choices: discriminated unions,237 branded types, runtime validation boundaries, functional core/imperative shell,238 adapter modules, command or use-case handlers, dependency injection, async239 orchestration, or test builders.240- Load241 [`typescript-javascript-antipatterns`](../typescript-javascript-antipatterns/SKILL.md)242 when reviewing or refactoring JS/TS smells: `any`, unsafe assertions, missing243 runtime validation, unawaited promises, framework/UI leakage, singleton service244 bags, import-time side effects, weak randomness, over-mocked tests, or brittle245 E2E tests.246247## Styling Routing248249- Load [`css-scss-styling`](../css-scss-styling/SKILL.md) when JS/TS work250 touches `.css`, `.scss`, `.sass`, CSS modules, CSS-in-JS, utility-class251 conventions, PostCSS/Tailwind/Sass config, design tokens, responsive layout,252 or browser-visible cascade behavior.253- Keep this skill focused on package-manager workflow, TypeScript contracts,254 bundler integration, component code, tests, and build commands. Let the styling255 skill own CSS-vs-SCSS decisions, selector/cascade maintainability,256 accessibility-related visual states, and stylesheet migration risks.257258## API and Observability Routing259260- Load [`api-design`](../api-design/SKILL.md) when JS/TS work defines or changes261 HTTP/RPC/GraphQL/webhook, SDK, CLI, request/response/error, pagination,262 versioning, or generated-client contracts. Keep this skill focused on JS/TS263 implementation, types, serializers, package workflow, and tests.264- Load [`observability-engineering`](../observability-engineering/SKILL.md) when265 adding or changing structured logs, metrics, traces, correlation IDs, audit266 events, frontend/backend diagnostics, or operator-facing telemetry.267- For public API docs, examples, or migration guides, load268 [`api-design`](../api-design/SKILL.md) first if the contract is still being269 shaped; otherwise use270 [`documentation-engineering`](../documentation-engineering/SKILL.md).271272## CI, Release, and Container Routing273274- Load [`ci-release-engineering`](../ci-release-engineering/SKILL.md) for hosted275 workflow triggers, jobs, matrices, permissions, artifacts, and automated276 releases. Keep package scripts and JavaScript/TypeScript build mechanics here.277- Load [`container-engineering`](../container-engineering/SKILL.md) for278 Dockerfile, OCI image, or Compose behavior; keep JS/TS runtime and bundler279 behavior here.280281## Formatting, Linting, Types, and Builds282283- Use checked-in scripts when they exist. Otherwise inspect configured tools:284 Prettier, ESLint, Biome, TypeScript, tsup, esbuild, Vite, Next.js, Rollup,285 Webpack, SWC, Jest, Vitest, Node's test runner, Bun test, or Deno tasks.286- Prettier is formatting only. ESLint/Biome and TypeScript checks cover different287 contracts; do not report one as a substitute for the other.288- Run format checks before changing style broadly. Avoid formatting unrelated289 files unless the task is explicitly a formatting pass.290- For TypeScript, run the repo's configured typecheck. If none exists, use the291 narrowest command that respects local `tsconfig` and module resolution.292- For build changes, check bundle/runtime compatibility and generated output only293 where the repository expects generated artifacts to be committed.294295## Testing Guidance296297- Unit tests: pure logic, parsers, formatters, validators, state machines,298 reducers, and small adapters.299- Integration tests: filesystem, subprocesses, package scripts, API clients,300 database adapters, framework wiring, and generated contracts.301- E2E/browser tests: only when browser behavior is the confidence target; use the302 Playwright skill for checked-in browser tests.303- Keep tests deterministic: no uncontrolled clocks, ports, network calls, random304 seeds, process-global state, shared temp directories, or order dependence.305- Use targeted filters for iteration, then broaden to package/workspace/CI lanes306 when the changed surface crosses boundaries.307308## Security Review Prompts309310Load [`security-review`](../security-review/SKILL.md) when JS/TS changes touch311auth, sessions, cookies, CSRF/CORS/CSP, cryptography, secrets, `.env`, command312execution, path handling, uploads/downloads, plugin execution, HTML/Markdown313rendering, SSR, or other implemented trust boundaries. Use314[`dependency-supply-chain-review`](../dependency-supply-chain-review/SKILL.md)315for dependency bumps, lockfile churn, package-manager updates, package scripts,316install/postinstall hooks, one-off CLIs, CI bootstrap, generated clients,317vendored code, provenance, or advisory questions. Use318[`threat-modeling`](../threat-modeling/SKILL.md) before or during new auth319middleware, request/API/SSR boundaries, plugins, webhooks, background workers,320external-service integrations, or sensitive data flows. Use321[`security-review-evidence`](../security-review-evidence/SKILL.md) when322collecting or reporting sensitive security evidence.323324## Anti-Patterns325326- Assuming every JS/TS repo uses React, Next.js, Vite, ESLint, Prettier, Jest,327 Vitest, pnpm, Yarn, Bun, or Deno without local evidence.328- Following default `npm`/`npx` instructions after local evidence shows the repo329 requires pnpm, Yarn, Bun, or Deno, without translating and verifying them.330- Adding dependencies for trivial standard-library or platform behavior.331- Using `npx`, `pnpx`, `pnpm dlx`, `bunx`, or another fetch-and-run command as a332 durable substitute for a locked project dependency.333- Letting framework, ORM, SDK, HTTP, UI, or generated-client types leak into core334 domain APIs without an intentional adapter boundary.335- Using `Math.random()` for secrets, tokens, identifiers, or security-sensitive336 test fixtures.337- Reporting a script, typecheck, lint, format, build, or test lane as valid338 without checking it exists or running the relevant command.339340## Successful Use341342The final handoff states the source/script/package surface changed, package343manager and lockfile impact, commands run, test/type/lint/format/build evidence,344and any remaining runtime or CI compatibility risk.345346## Zod Routing347348When Zod is selected, load [`zod-engineering`](../zod-engineering/SKILL.md) for schema implementation and migration mechanics. This skill retains runtime, package, Standard Schema adapter, and test/tooling mechanics.