Principle Type System Discipline
Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, exhaust variants, derive from authoritative schemas.
Install
npx skills add Dimon94/skills --skill principle-type-system-disciplinegit clone --depth 1 https://github.com/Dimon94/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/principle-type-system-discipline ~/.claude/skills/principle-type-system-disciplinePersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Type System Discipline Make the compiler reject impossible states, mismatched primitives, and unhandled variants. Prefer defining errors and special cases out of existence over proliferating handlers. For TypeScript syntax, see the `typescript-best-practices` skill. - **Brand semantic primitives.** `UserId` and `OrderId` are strings underneath but should not be interchangeable. Give each its own type, such as a branded intersection in TypeScript or a newtype elsewhere. Validate once at creation, trust the type downstream. If two arguments share a primitive type but mean different things, brand them. - **External data is untyped until parsed.** RPC payloads, JSON, IPC messages, CLI args, config files, environment variables, database rows. Have a parse function at every boundary that turns unstructured input into the typed model. The **boundary-discipline** principle skill says where to put validation. - **Derive types from authoritative schemas.** When a protocol buffer, OpenAPI spec, GraphQL schema, database migration, design-token file, or another file owns a shape, derive from it instead of hand-rolling a parallel type. See the **encode-lessons-in-structure** principle skill.
Details
- Skill name
principle-type-system-discipline- Repository
- Dimon94/skills
- Path
skills/principle-type-system-discipline/SKILL.md- Repo updated
- 18 November 2026
- Copies
- Found in 3 GitHub repos
FAQ
What does the Principle Type System Discipline skill do?
Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, exhaust variants, derive from authoritative schemas.
How do I install the Principle Type System Discipline skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add Dimon94/skills --skill principle-type-system-discipline. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Principle Type System Discipline popular?
It lives in Dimon94/skills, which has 107 GitHub stars and 21 forks, and is included in 2 curated skill lists.
Related skills
Maintain Verification Skill
107Dimon94/skills
Periodic pass that keeps a project's verification skill and feature map honest: parallel source readers per feature, one live session driving every feature, at most one PR of proven corrections. Use for /maintain-verification-skill or "audit the verify skill".
Create Verification Skill
107Dimon94/skills
Generate a project-local verification skill that drives your app the way a user does — any language, framework, or platform. Use for /create-verification-skill, "make a control skill for this repo", or when a project has no scripted way to prove UI/CLI/service behavior.
How
107Dimon94/skills
Use for "how does X work", code walkthroughs before changing something, and placement / ownership / layering questions ("where should this live", "which package owns this", "is this the right layer"). Explains subsystem architecture, runtime flow, onboarding mental models. Use why for motivation.
Brand Kit
114cognyai/claude-code-marketing-skills
Build a portable brand-kit.json for the user's product — colors, typography, voice — that other skills (video, ad creative, landing page) can consume. Multiple discovery paths so it works whether the user has access to their site's source code or only a public URL or just a logo image.
Principle Experience First
107Dimon94/skills
Apply when product, UX, or feature-scope tradeoffs come up. Choose user delight over implementation convenience; ship fewer polished features over more rough ones.
Community Pulse
114cognyai/claude-code-marketing-skills
Weekly read on community health — Discord joins, active channels, top contributors, themes and unanswered questions, plus Crisp support conversations and YouTube comments when connected
Browse the most popular Claude skills, all frontend & design skills, or write your own with the skills generator.