principle-type-system-discipline
Apply when designing types, reviewing a function signature, or writing code in any statically-typed language.
Skill by matthewyjiang
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/matthewyjiang-principle-type-system-discipline
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, data, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
principle-type-system-discipline- Description
- 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.
- License
- MIT
- Instructions
- 11 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Type System Discipline Read [the workflow contract](../../references/workflow-contract.md). Make the compiler reject impossible states, mismatched primitives, and unhandled variants. Prefer defining errors and special cases out of existence over proliferating handlers. Use language-native tagged unions, exhaustive matching, branded primitives or newtypes where they protect real invariants; avoid type machinery with no practical benefit. - **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 `correct` for structural enforcement of recurring mistakes.
From matthewyjiang/rho-pstack, MIT.
More from matthewyjiang/rho-pstack
- 0.567score
interrogate
matthewyjiang
Optional adversarial cross-model review to challenge a design or find blind spots, using per-call agent models or host delegation.
SkillAFreshness: AClaude Code +9 - 0.567score
architect
matthewyjiang
Sketch caller usage, types, signatures and module ownership before nontrivial implementation.
SkillAFreshness: AClaude Code +9 - 0.567score
how
matthewyjiang
Explain subsystem architecture, runtime flow, placement, ownership, or layering before changing code.
SkillAFreshness: AClaude Code +9 - 0.561score
correct
matthewyjiang
Turn recurring agent mistakes into structural prevention: architecture, types, actionable lint, then behavior tests.
SkillAFreshness: AClaude Code +9 - 0.561score
blast-radius
matthewyjiang
Trace what a change could break beyond its diff and prove the load-bearing safety assumptions through real code.
SkillAFreshness: AClaude Code +9 - 0.536score
principle-build-the-lever
matthewyjiang
Apply to any non-trivial work, not just bulk work: edits, migrations, analyses, checks.
SkillAFreshness: AClaude Code +9 - 0.536score
principle-boundary-discipline
matthewyjiang
Apply when wiring validation, error handling, or framework adapters.
SkillAFreshness: AClaude Code +9 - 0.531score
principle-experience-first
matthewyjiang
Apply when product, UX, or feature-scope tradeoffs come up.
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 17, 2026 (13 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/matthewyjiang/rho-pstack
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.756score
principle-type-system-discipline
backnotprop
Apply when designing types, reviewing a function signature, or writing code in any statically-typed language.
SkillAFreshness: A★ 2.7KClaude Code +9 - 0.396score
principle-type-system-discipline
dsebban
Apply when designing types, reviewing a function signature, or writing code in any statically-typed language.
SkillAFreshness: A★ 68Claude Code +9 - 0.382score
principle-type-system-discipline
jiangkoumo
Apply when designing types, reviewing a function signature, or writing code in any statically-typed language.
SkillAFreshness: A★ 27Claude Code +9 - 0.360score
principle-type-system-discipline
creedants
Apply when designing types, reviewing a function signature, or writing code in any statically-typed language.
SkillAFreshness: A★ 15Claude Code +9 - 0.344score
principle-type-system-discipline
dhruvsaxena1998
Apply when designing types, reviewing a function signature, or writing code in any statically-typed language.
SkillAFreshness: A★ 1Claude Code +9
More from matthewyjiang
- 0.567score
interrogate
matthewyjiang
Optional adversarial cross-model review to challenge a design or find blind spots, using per-call agent models or host delegation.
SkillAFreshness: AClaude Code +9 - 0.567score
architect
matthewyjiang
Sketch caller usage, types, signatures and module ownership before nontrivial implementation.
SkillAFreshness: AClaude Code +9 - 0.567score
how
matthewyjiang
Explain subsystem architecture, runtime flow, placement, ownership, or layering before changing code.
SkillAFreshness: AClaude Code +9 - 0.561score
correct
matthewyjiang
Turn recurring agent mistakes into structural prevention: architecture, types, actionable lint, then behavior tests.
SkillAFreshness: AClaude Code +9 - 0.561score
blast-radius
matthewyjiang
Trace what a change could break beyond its diff and prove the load-bearing safety assumptions through real code.
SkillAFreshness: AClaude Code +9 - 0.536score
principle-build-the-lever
matthewyjiang
Apply to any non-trivial work, not just bulk work: edits, migrations, analyses, checks.
SkillAFreshness: AClaude Code +9
Cite this page
principle-type-system-discipline skill. Agent Mart. https://agentmart.dev/skills/matthewyjiang-principle-type-system-discipline (last updated 2026-10-24)