Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add backnotprop/pstack --skill principle-foundational-thinking -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/principle-foundational-thinking/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/principle-foundational-thinking/

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

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set44

tdd This skill makes the agent write a failing regression test for a bug before touching production code. It only kicks in when a cheap test path exists. CX Codex +1 5,100installs principle-experience-first A principle skill that shifts priority toward the user when product, UX, or feature-scope tradeoffs come up. Useful when deciding what to cut. CX Codex +1 5,100installs principle-separate-before-serializing-shared-state Architectural guideline for concurrent actors: eliminate shared mutable state across files or keys first, resorting to locks only when a single writer is strictly required. CX Codex +1 5,100installs principle-attack-the-premise This skill tests the shared premise behind repeated failed fixes. Use it before writing another fix that hits the same gate. CX Codex +1 5,100installs correct Finds repeated mistakes made by coding agents and makes them impossible through architecture, types, linters, or tests. Useful when agents keep making the same wrong edits. CX Codex +1 4,200installs benchmark-checklist A skill that makes the agent answer seven questions with evidence from a run before it reports a speedup or a regression. CX Codex +1 4,100installs principle-explain-the-number A skill for the moment before you trust a measured number: name what caps it, then rule out that the test measured something other than your work. CX Codex +1 4,100installs poteto-help Answers questions about pstack: how to set it up, how to run /poteto-mode, which skill fits a task. It hands you a prompt instead of starting work. CX Codex +1 3,700installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor