/engsys-typescript:typescript-conventionsfrom engsys-typescript
TypeScript conventions for this repo (TS 5.x targeting ES2022, Node 22, pnpm workspaces). Use when writing or reviewing any *.ts file. Covers naming, type-system expectations, async/error handling, the pnpm-monorepo @smithy hoisting gotcha, and lib-DOM-for-fetch.
Ships in engsys-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.
None: SKILL.md is the whole skill.
Applies to: *.ts across the repo's TypeScript packages. Target: TS 5.x → ES2022. Runtime: Node 22. Build: esbuild (or the project's bundler). Test: Vitest.
Naturalize: confirm the exact package paths, bundler, and test runner in
CLAUDE.md. The defaults below assume a pnpm workspace shipping to a Node 22 runtime.
require / module.exports / CJS helpers.user-session.ts, data-service.ts).I-prefix on interfaces.any (implicit or explicit). Prefer unknown + narrowing.shared/common package rather than duplicating across packages.Readonly, Partial, Record, etc.) to express intent.async/await with try/catch and structured errors.If the repo uses pnpm workspaces, two patterns repeatedly bite:
@smithy/* hoisting for the AWS SDK v3pnpm's virtual store (.pnpm/) is not traversed by TypeScript's module resolution. @smithy/smithy-client is the base class that provides Client.send() on every AWS SDK v3 client. Without hoisting you get:
Property 'send' does not exist on type 'SQSClient'
Property 'send' does not exist on type 'SecretsManagerClient'
Fix: root .npmrc must contain:
public-hoist-pattern[]=@smithy*
Then pnpm install. (The same class of fix applies to any SDK that ships a base client via a separate hoisted package.)
DOM lib for fetch / Response / HeadersAny handler that uses fetch(), Response, or Headers needs "DOM" in tsconfig lib:
{ "compilerOptions": { "lib": ["ES2022", "DOM"] } }
Without it: Property 'ok' does not exist on type 'Response'.
frontend-testing.pnpm typecheck at the root runs tsc --noEmit across packages.pnpm lint, pnpm test, pnpm build work per-package via pnpm -r.esbuild bundles for the deploy target; uses the default export condition.zod-style schema layer in the shared package).pnpm overrides in root package.json.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub eric-sabe/engsys --plugin engsys-typescript