principle-type-system-discipline

principle-type-system-discipline is a skill for Claude Code from watt-mind/factory. It costs 33 tokens per session (165 once invoked), scanned A, original, Apache-2.0.

A set of guidance for designing types, data formats, and function inputs so invalid combinations are rejected early. It covers TypeScript, Python validation tools, and JSON Schema.

In plain words
What is it for?
Use it when defining schemas, function signatures, tagged variants, or validation at external data boundaries.
Why use it?
It helps prevent values such as the wrong kind of ID or amount from being mixed silently. It also makes code that handles every possible state easier to check.

Skill for Claude Code

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

Part of the core plugin — 38 skills, 22 commands, 5 agents, 1 hook shipped together

Good fit Use it when defining schemas, function signatures, tagged variants, or validation at external data boundaries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/watt-mind/factory/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 watt-mind/factory --skill principle-type-system-discipline
Clone the repo
git clone --depth 1 https://github.com/watt-mind/factory

Made for: Claude Code.

Or install core, the plugin that ships this one along with the rest of its 38 skills, 22 commands, 5 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/watt-mind/factory/principle-type-system-discipline/github.svg)](https://agentmods.dev/skills/watt-mind/factory/principle-type-system-discipline)
Your own site
<a href="https://agentmods.dev/skills/watt-mind/factory/principle-type-system-discipline"><img src="https://agentmods.dev/badge/skills/watt-mind/factory/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/watt-mind/factory/principle-type-system-discipline"><img src="https://agentmods.dev/badge/skills/watt-mind/factory/principle-type-system-discipline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 165 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 original No closer match found 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.00033 $0.00165
Opus 5.5 $0.00013 $0.00066
Sonnet 5.5 $0.00007 $0.00033
Haiku 4.5 $0.00003 $0.00016

Measured 11d ago against content hash 34836129eae9, 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 11d 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.

plugins/core/skills/principle-type-system-discipline/SKILL.md · 14 lines

What it actually says

Type System Discipline

Use the type system (TypeScript, Pydantic/mypy, Django Ninja schemas, JSON Schema) to make illegal states unrepresentable at compile or parse time.

  • Model states as discriminated unions / tagged variants instead of bags of optional booleans.
  • Brand or wrap semantic primitives (IDs, currencies, tax-inclusive vs. net amounts, verified vs. candidate records) so they cannot be mixed silently.
  • Exhaustively match variants so adding a new enum or status produces a type error everywhere it must be handled.
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. 11d ago Changed · -6 tokens per session 34836129eae9
  2. 14d ago First seen · 14 lines · 39 tokens per session scan A 8d72e717d232

Subscribe to this mod's changes

principle-type-system-discipline is a skill published in the GitHub repository watt-mind/factory (24 stars, last pushed yesterday), licensed Apache-2.0. It adds 33 tokens to every session and 165 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-16.

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-disciplinewatt-mind/factorySkill24yesterdayApache-2.0A33Claude Code
goga-lang-dispqarium/gogaSkill468d agoBSD-3-ClauseA9Claude Code, Codex
modern-js-runtimesjxoesneon/CielSkill11mo agoApache-2.0A20Claude Code, Codex
python-developmentjxoesneon/CielSkill11mo agoApache-2.0A17Claude Code, Codex
django-developmentjxoesneon/CielSkill11mo agoApache-2.0B23Claude Code, Codex
build-error-resolverKacper0199/Opencode-UltrathinkerSkill26mo agononeC50Claude Code, Codex
effect-developmentpingdotgg/t3codeSkill85ktodayMITA29Claude Code, Codex