Writes and hardens TypeScript in strict mode. Covers advanced types, discriminated unions, runtime validation at trust boundaries, generics, and removing any from existing codebases.
Ships in languages. 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.
Use the type system to make invalid states unrepresentable. This skill covers strict-mode TypeScript, the advanced type features worth reaching for, and the discipline of validating untrusted data exactly once — at the boundary.
tsconfig.json.any and unchecked casts from an existing codebase.satisfies.Result-style unions.tsconfig.json.strict: true with zero any.tsconfig.json reflecting the target runtime.strict, noUncheckedIndexedAccess, and exactOptionalPropertyTypes. Everything else follows from the compiler's complaints.tsc --noEmit and lint with @typescript-eslint, no-explicit-any set to error.as to silence the compiler. It is an assertion, not a check; it lies at runtime.unknown over any at every boundary, then narrow.z.infer), never maintain both by hand.satisfies to validate an object literal against a type while preserving its narrow inferred type.never) to every union switch — it turns a future missing case into a compile error.Boundary validation with derived types:
import { z } from "zod";
const Config = z.object({
port: z.coerce.number().int().positive(),
databaseUrl: z.string().url(),
logLevel: z.enum(["debug", "info", "warn", "error"]).default("info"),
});
export type Config = z.infer<typeof Config>;
export function loadConfig(env: NodeJS.ProcessEnv): Config {
const parsed = Config.safeParse({
port: env.PORT,
databaseUrl: env.DATABASE_URL,
logLevel: env.LOG_LEVEL,
});
if (!parsed.success) {
throw new Error(`Invalid configuration:\n${parsed.error.message}`);
}
return parsed.data;
}
Exhaustive discriminated union:
type Job =
| { status: "queued"; queuedAt: Date }
| { status: "running"; startedAt: Date; workerId: string }
| { status: "failed"; error: string; attempts: number };
function describe(job: Job): string {
switch (job.status) {
case "queued":
return `Queued at ${job.queuedAt.toISOString()}`;
case "running":
return `Running on ${job.workerId}`;
case "failed":
return `Failed after ${job.attempts} attempts: ${job.error}`;
default: {
const unreachable: never = job;
throw new Error(`Unhandled job status: ${JSON.stringify(unreachable)}`);
}
}
}
noUncheckedIndexedAccess is the single highest-value flag most codebases are missing: it makes arr[i] return T | undefined, which is the truth..d.ts) from DefinitelyTyped are frequently wrong. Verify against runtime behavior before trusting them.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
12 skills in this plugin
/cppUse when writing modern C++ (17/20/23). Covers RAII, smart-pointer ownership, move semantics, ranges, concepts, and eliminating undefined behavior with sanitizers. Trigger on "segfault in my c++ code", "should this be a unique_ptr or shared_ptr", "get rid of the raw new and delete", "asan reports heap-use-after-free"./csharp-dotnetUse when building on .NET 8+ with C# 12. Covers nullable reference types, records, async/await correctness, minimal APIs, dependency injection, and EF Core query performance. Trigger on "async deadlock in my asp.net app", "turn on nullable reference types", "ef core is doing n+1 queries", "set up a minimal api in .net 8". Do not use for tuning the database itself — see the database-performance skill./goUse when writing Go services, CLIs, or libraries. Covers idiomatic error wrapping, goroutine and context discipline, interface design, table-driven tests, and the race detector. Trigger on "goroutine leak", "how should i wrap this error in go", "race detector is flagging this", "write table-driven tests for this". Do not use for designing a CLI's flags and exit codes — see the cli-development skill./languages:typescriptfrom languages
npx claudepluginhub nimadorostkar/claude-skills-collection --plugin languagesOther plugins' skills for the same job