/pstack:principle-type-system-disciplinefrom pstack
Applies type-level design patterns to statically-typed languages: make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, and exhaust variants. Useful when designing types or reviewing function signatures.
Ships in pstack. 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.
The type checker is a proof assistant. Use it to eliminate impossible states, mismatched primitives, and unhandled variants at compile time. A case the types let you ignore becomes a runtime failure the compiler could have stopped. Prefer defining errors and special cases out of existence over proliferating handlers. Unrepresentable states, total functions, and interface redesign (the patterns below) are the tools.
Applies to any typed language. Skills like typescript-best-practices ground it in specific syntax.
The patterns:
{ completed: boolean; completedAt?: Date } admits completed: true; completedAt: undefined, which is meaningless. Derive the boolean from a single source like completedAt !== null, or model the variants explicitly as { kind: 'open' } | { kind: 'done'; at: Date }. If a bug forces the question "wait, can this combination actually happen?", the type is too loose.UserId and OrderId are strings underneath but should not be interchangeable. Newtypes in Rust, opaque types in Swift, value classes in Kotlin, phantom types in Haskell, branded intersections in TypeScript. Validate once at creation, trust the type downstream.never-typed binding in TypeScript, unannotated match in Rust, -Wincomplete-patterns in Haskell, sealed-class match exhaustiveness in Kotlin.sum of an empty list is 0, so it takes the plain list. head of an empty list has no answer, so it demands the non-empty one.The tests:
any, this as, this assertNotNull come from?" Trace it to the boundary and validate there instead.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub raka334/pstack-for-everyone --plugin pstack4 plugins ship this exact skill · first indexed Sep 16, 2026
50 skills in this plugin
/architectSettle types, signatures, and module structure before code crosses a function boundary. Use for `architect`, design-this requests, or non-trivial changes where implementation would lock in the wrong shape./arenaRun parallel agent attempts at the same task, choose a base, graft the strongest ideas from the others, and verify the synthesis. Use when the host supports delegation and the artifact has competing approaches./automate-meCreate or improve a personal work-style skill from preferences and evidence in the current conversation or records the user supplies. Use for automate-me and requests to capture how the user works.Other plugins' skills for the same job