principle-foundational-thinking — Claude Code skill: install
A principle set for the stage before logic: pick core types and data structures, order the scaffold, check what concurrent actors share.
npx skills add backnotprop/pstack --skill principle-foundational-thinking -a claude-codeWhat principle-foundational-thinking does
Foundational Thinking is a set of rules to apply before logic gets written. Start with the data shape: name the core types early, walk every place that touches the data, pick structures that fit the dominant access paths. DRY applies to structure. Three similar statements are cheaper than a premature abstraction, and types should converge with the data models.
Second layer is concurrency and scaffold. When several actors share state, ask what happens if another one changes it at the same time — anything other than "nothing" means isolate it. Scaffold goes first: CI, linting, test infrastructure, shared types. Setup before features, tests before fixes. Dead code gets deleted before a foundation is laid, and commits stay small and single-purpose.
One thing to know up front: the skill file sets disable-model-invocation: true. It will not fire on its own, so you invoke it yourself. That makes it something you reach for while picking types, not after the code is already there.
What it helps with
- pick core types before writing business logic
- settle whether scaffold or the feature lands first
- check if two concurrent actors can share state
- clear dead code before starting a foundation
- keep commits single-purpose
Example prompts for the agent
- Apply principle-foundational-thinking: choose the core types for the billing model before any logic.
- Run principle-foundational-thinking on the two queue workers and tell me what needs isolating.
- Using principle-foundational-thinking, what goes into scaffold before the first feature?
How to install principle-foundational-thinking
1Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-foundational-thinking -a claude-code2Manually: put the files in place
~/.claude/skills/principle-foundational-thinking/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/principle-foundational-thinking/
1Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-foundational-thinking -a codex2Manually: put the files in place
.agents/skills/principle-foundational-thinking/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-foundational-thinking -a cursor2Manually: put the files in place
.cursor/skills/principle-foundational-thinking/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install backnotprop/pstack principle-foundational-thinking2Manually: put the files in place
.github/skills/principle-foundational-thinking/SKILL.md1Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-foundational-thinking -a gemini-cli2Platform CLI
gemini skills install https://github.com/backnotprop/pstack --path skills/principle-foundational-thinkingManually: put the files in place
.devin/skills/principle-foundational-thinking/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-foundational-thinking -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about principle-foundational-thinking
How do I install principle-foundational-thinking in Claude Code?
Run npx skills add backnotprop/pstack --skill principle-foundational-thinking -a claude-code. The skill lands at ~/.claude/skills/principle-foundational-thinking/SKILL.md.
What does principle-foundational-thinking do?
It orders decisions made before logic: data shape and core types first, isolation of shared state between concurrent actors, then scaffold such as CI and test infrastructure ahead of features.
Why doesn't the skill trigger by itself?
Its file carries disable-model-invocation: true, so the model won't call it on its own. You have to invoke it explicitly, before the agent starts writing code.
Source text
SKILL.md · MIT
--- name: principle-foundational-thinking description: "Apply before writing logic: choosing core types and data structures, sequencing scaffold-vs-feature work, asking what concurrent actors share. Get the data structures right so downstream code becomes obvious." disable-model-invocation: true --- # Foundational Thinking **Structural decisions** protect option value. **Code-level decisions** protect simplicity. **Data structures first.** Get the data shape right before writing logic. Define core types early, trace every access pattern, and choose structures that match the dominant paths. At code level, DRY the structure, not every line. Types and data models should converge. Three similar statements still beat a premature abstraction. Prefer explicit over clever. Test behavior and edge cases, not line counts. **Concurrency corollary.** Before sharing state between actors, ask "what happens if another actor modifies this concurrently?" If not "nothing", isolate. **Scaffold first.** If something helps every later phase, do it first. Ask "does every subsequent phase benefit from this existing?" CI, linting, test infrastructure, and shared types are scaffold. Sequence for option value: setup before features, tests before fixes. Keep commits small and single-purpose. Each increment should land a coherent abstraction or deepen one that exists. Do not spread a new capability across callers as special-case coordination. Subtraction comes before scaffolding. Remove dead code first, then lay foundations.
© backnotprop · MIT · backnotprop/pstack