Correct-by-construction TypeScript rules (errors as values, parse don't validate, illegal states unrepresentable, deep modules) for writing or refactoring TypeScript when the project has not pinned its own standards.
Ships in coding-standards. 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.
Reference, not a workflow. Apply to new and refactored code. When rules pull in different directions: correctness and debuggability first, then these standards, then compatible project conventions; contain incompatible existing patterns at the nearest boundary instead of copying them into new code, and never rewrite unrelated old code without an explicit migration request. The host project's own documented standards always win over this file.
This skill's tool surface covers the whole write-code loop (read, grep, find, ls, code_nav, bash, write, edit) so a solo run can apply the rules it names. When it rides along with another skill, the surfaces merge as a union, so it never narrows the tools the task in flight needs.
/skill coding-standards [<task>]
write, edit, and bash
tools; the standards change what you write, not how you write it.npx tsc --noEmit or
the repo script) with one plain bash call; never use $(...) or
backticks in the command.node -e (or the project's runtime) call. If you must write a smoke
script, put it under .pancode/scratch/ and remove it with plain
rm <file>; rm -f, rm -r, find -delete, and moving files to
/tmp are all refused by the safety net in a headless run, and every
refused attempt is a wasted turn.git status
must show only the files the task asked for.{_tag: "ok"|"err", ...} suffices._tag (as const), a useful message,
structured context fields, optional cause: unknown. Keep error unions
precise at module boundaries; broad AppError types belong only near
entrypoints and rendering.unknown input into domain types before it enters
inner code; inner code never re-checks what a parser proved.parseX(input): Result<X, ParseXError> for untrusted input; makeX for
smart construction from typed pieces; isX for predicates. A function
returning a refined value is a parser; do not name it validateX.UserId vs OrgId),
parsed strings (EmailAddress), units (Milliseconds, Bytes).
Construct branded values only through their parser.{_tag:"Draft"|...} beats {isSent, isPaid, sentAt?, paidAt?}.createUser(input, {emailVerification:"skip"}), never createUser(input, true).undefined checks inside every callee. Partial<T> is not an
application input unless partiality is the domain concept.When a change adds or reshapes a module, service, or adapter, read references/modules.md.
vi.mock/jest.mock). Real seams: injected
interfaces, local DB substitutes, in-memory or fake adapters.strict, noUncheckedIndexedAccess,
exactOptionalPropertyTypes). Immutable by default (readonly,
ReadonlyArray); mutation stays localized behind precise interfaces.any, no !, no as casts (as const is fine). The rare
justified cast carries a // SAFETY: comment explaining why the
invariant holds and why the type system cannot express it.email-address.ts), never utils.ts/helpers.ts.process.env reads
scattered through the app; no import-time side effects outside true
entrypoints. Secrets live in Redacted-style wrappers, unwrapped only
at the adapter that needs the raw value, and never appear in errors,
logs, or traces.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/coding-standards:coding-standardsfrom coding-standards
npx claudepluginhub panstudio/pancode --plugin coding-standards