principle-type-system-discipline

principle-type-system-discipline is a skill for Claude Code from chhoumann/t3-pstack. It costs 53 tokens per session (208 once invoked), scanned A, a copy of principle-type-system-discipline, MIT.

A programming principle for using types to prevent invalid data and incomplete cases. It recommends representing meaningful alternatives directly, checking outside data at system boundaries, and letting the compiler catch mismatches.

In plain words
What is it for?
Use it when designing data models, reviewing function inputs and outputs, handling variants, or converting external data into trusted internal values.
Why use it?
It reduces runtime checks and contradictory combinations that the program should never accept. It also makes changes safer in languages with static type checking, such as TypeScript, Java, or C#.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the t3-pstack plugin — 67 skills, 4 agents, 1 hook shipped together

Good fit Use it when designing data models, reviewing function inputs and outputs, handling variants, or converting external data into trusted internal values.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chhoumann/t3-pstack/principle-type-system-discipline
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add chhoumann/t3-pstack --skill principle-type-system-discipline
Clone the repo
git clone --depth 1 https://github.com/chhoumann/t3-pstack

Made for: Claude Code.

Or install t3-pstack, the plugin that ships this one along with the rest of its 67 skills, 4 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for principle-type-system-discipline

README.md
[![agentmods](https://agentmods.dev/badge/skills/chhoumann/t3-pstack/principle-type-system-discipline/github.svg)](https://agentmods.dev/skills/chhoumann/t3-pstack/principle-type-system-discipline)
Your own site
<a href="https://agentmods.dev/skills/chhoumann/t3-pstack/principle-type-system-discipline"><img src="https://agentmods.dev/badge/skills/chhoumann/t3-pstack/principle-type-system-discipline/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for principle-type-system-discipline

Your own site · 80×15
<a href="https://agentmods.dev/skills/chhoumann/t3-pstack/principle-type-system-discipline"><img src="https://agentmods.dev/badge/skills/chhoumann/t3-pstack/principle-type-system-discipline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 208 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 86% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.00208
Opus 5.5 $0.00021 $0.00083
Sonnet 5.5 $0.00011 $0.00042
Haiku 4.5 $0.00005 $0.00021

Measured 10d ago against content hash 9cd1ce345bc9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

principle-type-system-discipline scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

86% identical to principle-type-system-discipline — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/pstack/skills/principle-type-system-discipline/SKILL.md · 16 lines

What it actually says

Type System Discipline

Make the compiler reject impossible states, mismatched primitives, and unhandled variants.

  • Brand semantic primitives. If two arguments share a primitive type but mean different things, give each its own type. Validate once at creation.
  • External data is untyped until parsed. JSON, RPC payloads, CLI args, config, environment variables, and database rows go through a parse function at the boundary that returns the typed model.
  • Derive types from authoritative schemas. When a schema file owns a shape, derive the type from it instead of hand-rolling a parallel one.

For TypeScript syntax, see the typescript-best-practices skill.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago Changed · +2 lines 9cd1ce345bc9
  2. 1mo ago Changed · -5 lines · -7 tokens per session 5cdaf79785e3
  3. 1mo ago Changed 2e492cef34bb
  4. 1mo ago First seen · 19 lines · 60 tokens per session scan A 388d8966513f

Subscribe to this mod's changes

principle-type-system-discipline is a skill published in the GitHub repository chhoumann/t3-pstack (347 stars, last pushed today), licensed MIT. It adds 53 tokens to every session and 208 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 86% identical to principle-type-system-discipline, differing in 0 lines, and is treated as a copy.

Related

principle-type-system-discipline compared with skills from other repositories

principle-type-system-discipline next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
principle-type-system-disciplinechhoumann/t3-pstackSkill347todayMITA53Claude Code
omh-rustrlaope/oh-my-hermesSkill6.2ktodayMITA19Claude Code
erlang-otp-behaviorsbenchflow-ai/skillsbenchSkill1.9k6d agoApache-2.0A52Claude Code, Codex
axiom-concurrencyCharlesWiltgen/AxiomSkill1.3k21d agoMITA49Claude Code
tddcodewithmukesh/dotnet-claude-kitSkill85325d agoMITA81Claude Code
splitting-oversized-modulesPostHog/posthogSkill41ktodaynoneA197Claude Code, Codex
haskell-prormyndharis/antigravity-skillsSkill2.1k22d agoMITA37Claude Code, Codex