pstack-principle-type-system-discipline

pstack-principle-type-system-discipline is a skill for Claude Code from dmae97/omk. It costs 56 tokens per session (317 once invoked), scanned A, original, MIT.

A way to use a programming language's type checker to prevent invalid data and mismatched values before the program runs.

In plain words
What is it for?
It helps design function inputs, parse outside data at system boundaries, handle every allowed case, and derive types from schemas such as OpenAPI or database definitions.
Why use it?
It reduces bugs caused by treating different concepts as the same primitive value, or trusting unvalidated data from files, databases, and services.

Skill for Claude Code

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

Good fit It helps design function inputs, parse outside data at system boundaries, handle every allowed case, and derive types from schemas such as OpenAPI or database definitions.

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

Made for: Claude Code.

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 pstack-principle-type-system-discipline

README.md
[![agentmods](https://agentmods.dev/badge/skills/dmae97/omk/principle-type-system-discipline/github.svg)](https://agentmods.dev/skills/dmae97/omk/principle-type-system-discipline)
Your own site
<a href="https://agentmods.dev/skills/dmae97/omk/principle-type-system-discipline"><img src="https://agentmods.dev/badge/skills/dmae97/omk/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 pstack-principle-type-system-discipline

Your own site · 80×15
<a href="https://agentmods.dev/skills/dmae97/omk/principle-type-system-discipline"><img src="https://agentmods.dev/badge/skills/dmae97/omk/principle-type-system-discipline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 317 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.00056 $0.00317
Opus 5.5 $0.00022 $0.00127
Sonnet 5.5 $0.00011 $0.00063
Haiku 4.5 $0.00006 $0.00032

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

Security

Grade A, and why

pstack-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 today.

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

Copies of this mod

1 near-identical copy found in the catalogue:

packages/coding-agent/resources/pstack/skills/principle-type-system-discipline/SKILL.md · 14 lines

What it actually says

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.
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. today First seen · 14 lines · 56 tokens per session scan A ee8398c51c77

Subscribe to this mod's changes

pstack-principle-type-system-discipline is a skill published in the GitHub repository dmae97/omk (149 stars, last pushed today), licensed MIT. It adds 56 tokens to every session and 317 once invoked, about $0.0002 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-10-27.

Related

Other skills, from other repositories

rust-check

Run cargo check on the current Rust project to find compile errors.

Hmbown/CodeWhale · 15 tokens

angular

Use when building, refactoring, or debugging Angular (v20/21+): standalone components, signals, zoneless change detection, @if/@for/@defer control flow, inject() DI, resource()/httpResource(), RxJS interop, NgRx SignalStore, ng CLI. NOT React (that is react), NOT Next.js (that is nextjs), NOT a TypeScript language…

ericrisco/rsc-harness · 89 tokens

pi-loop-forensics

Diagnose pi-go agent loops and degenerate turns — "agent loop aborted", runaway thinking with no tool calls, repeated phrases. Discriminates genuine model repetition collapse from a race, a tool-parse failure, or a too-low guard, and A/B replays a seed session across providers.

dimetron/pi-go · 65 tokens

nightly-session-watch

Nightly sweep of the last 24h of pi-go sessions — anomalous runs, loop aborts, tool error rates, token waste, real prompt-token spend, and whether the observation and palace pipelines are still recording. Triages each finding to the specialist skill that diagnoses it. Use for an unattended daily health check, or on…

dimetron/pi-go · 78 tokens

agent-inspect

Local evidence debugger and trajectory-test toolkit for TypeScript AI agents. Use when capturing framework-faithful traces, asserting TraceContract/TraceFacts, packaging Evidence v2, or inspecting local runs over read-only MCP (gettracefacts).

rajudandigam/agent-inspect · 52 tokens

pi-observability-local-dev

Use when developing or reviewing packages/pi-observability dashboard/server changes locally, especially rebuilding dist, restarting the 43190 server, validating UI behavior, or keeping the local dashboard in sync with source edits.

spences10/my-pi · 48 tokens