principle-type-system-discipline
Skill8 starsChanged 2 days agoMITView on GitHub
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.
71 other projects use a version of this, 29 of them edited.
Adopted by
Most recently taken up by
- BabylonSocial/babylonedited, first seen Nov 30, 2026
- MondayNotAGoodDay/skillsword for word, first seen Nov 29, 2026
- karanmrn/karanagentskillsword for word, first seen Nov 29, 2026
- christopherkarani/rvword for word, first seen Nov 29, 2026
- The-Utopia-Studio/skillsedited, first seen Nov 29, 2026
- karanmrn/kstackword for word, first seen Nov 29, 2026
Used with
Projects with it also use Poteto Mode, control-cli and 5 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
The-Utopia-StudioSkillPoteto Mode
poteto's agent style for concise, detailed responses, deliberate subagents, unslopped prose, simple code, and verified work. Use for poteto, /poteto-mode, or requests to work in this style.
Also in 3 projects that use this
ElyzeSolutionsSkillcontrol-cli
Build or adapt a local harness to drive, inspect, and profile an interactive CLI or TUI without external services. Use for CLI UX checks, startup regressions, memory leaks, hangs, prompt flows, or terminal demos.
Also in 5 projects that use this
rockcookiesSkillpstack-tdd
Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested.
Also in 3 projects that use this
ElyzeSolutionsSkillcontrol-ui
Build or adapt a local browser/CDP harness to drive and inspect a web, IDE, or Electron UI. Use for local UI verification, screenshots, accessibility snapshots, perf profiles, visual diffs, or reproducing UI bugs.
Also in 5 projects that use this
getnaoSkillchief-of-staff
Also in 4 projects that use this
AWSSkillwizard
Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.
Also in 9 projects that use this
Other versions71 projects use a version of this.
Word for word · 13
- backnotprop/pstack★ 5.4k100% same
- jtaroreh/agystack★ 142100% same
- adjohn/pstack★ 12100% same
- karanmrn/karanagentskills★ 11100% same
- karanmrn/kstack★ 11100% same
- christopherkarani/rv★ 8100% same
- fedeya/wisp-ai★ 8100% same
- alexnthnz/keel★ 5100% same
- conscientiousness/herdr-pstack-orchestrator★ 2100% same
- conscientiousness/herdr-rex-pstack-orchestrator★ 2100% same
3 more not listed
Edited · 29
- trpc/trpc★ 41k36% same
- elizaOS/eliza★ 20k36% same
- BabylonSocial/babylon★ 12036% same
- Dimon94/dverity★ 10736% same
- Dimon94/skills★ 10736% same
- dsebban/skills★ 8236% same
- TencentBlueKing/bk-lite★ 7736% same
- stealth-factory/opscope★ 4036% same
- painhardcore/pstack★ 2233% same
- creedants/pstack-t3★ 1997% same
19 more not listed
Wrote their own version · 29
- uzairansaruzi/p3-stack★ 126same name
- TheOnlyFusionCube/potetos-for-everyone★ 21same name
- kkgogogo17/pi-pstack★ 9same name
- 0xrsydn/pstack-pi★ 7same name
- requie/endostack★ 4same name
- bnema/pi-pstack★ 2same name
- dhanji4U/skills★ 2same name
- jmporchet/pstack-hermes★ 2same name
- JoshueOsuna/pstack★ 2same name
- Timmyy3000/skills★ 2same name
19 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository59 other files it gives its agents.
- architectSkill
- arenaSkill
- automate-meSkill
- benchmark-checklistSkill
- blast-radiusSkill
- broSkill
- correctSkill
- create-formal-verification-skillSkill
- create-verification-skillSkill
- figure-it-outSkill
- howSkill
- interrogateSkill
- in-your-own-wordsSkill
- ketchupSkill
- ketchup-videoSkill
- maintain-formal-verification-skillSkill
- maintain-verification-skillSkill
- make-bot-uiSkill
- no-commentsSkill
- poteto-helpSkill
- poteto-modeSkill
- principle-attack-the-premiseSkill
- principle-boundary-disciplineSkill
- principle-build-the-leverSkill
- principle-encode-lessons-in-structureSkill
- principle-exhaust-the-design-spaceSkill
- principle-experience-firstSkill
- principle-explain-the-numberSkill
- principle-fix-root-causesSkill
- principle-foundational-thinkingSkill
- principle-guard-the-context-windowSkill
- principle-laziness-protocolSkill
- principle-make-operations-idempotentSkill
- principle-migrate-callers-then-delete-legacy-apisSkill
- principle-minimize-reader-loadSkill
- principle-model-the-domainSkill
- principle-never-block-on-the-humanSkill
- principle-outcome-oriented-executionSkill
- principle-prove-it-worksSkill
- principle-redesign-from-first-principlesSkill
- principle-separate-before-serializing-shared-stateSkill
- principle-sequence-verifiable-unitsSkill
- principle-subtract-before-you-addSkill
- principle-test-behavior-not-implementationSkill
- recallSkill
- reflectSkill
- reframeSkill
- session-reviewSkill
- setup-pstackSkill
- sharpenSkill
- show-me-your-workSkill
- statechartSkill
- swarmSkill
- tddSkill
- teachSkill
- technical-writingSkill
- typescript-best-practicesSkill
- unslopSkill
- whySkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 56 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Brand semantic primitives: If two arguments share a primitive type but mean different things, give each its own type.
- Distinctive: line 13
Derive types from authoritative schemas: When a schema file owns a shape, derive the type from it instead of hand-rolling a parallel one.
“Common” is measured: kept by at least 6 in 10 of the 56 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

