
Principle foundational thinking
Guides the agent to settle data shapes and shared state before writing logic
Principle foundational thinking is an open-source agent skill for developer tools. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 5.1K
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Principle foundational thinking
This skill tells the agent to design the core types and data structures first, then write logic on top of them. It asks the agent to trace how data is accessed across the codebase and pick structures that fit the most common paths, keeping duplication reduction focused on the structure rather than every line of code.
It also covers concurrency: before state is shared between actors, the agent is directed to consider what happens if another actor changes it at the same time, and to isolate that state unless the answer is that nothing goes wrong. For project setup, it advises scaffolding shared foundations such as CI, tests and shared types early, removing dead code first, and keeping commits small and focused on one change.
The skill is plain instructions in a single SKILL.md file with no scripts. It is written for Claude Code as part of the pstack plugin and is not meant to be invoked directly by the user.
When your agent uses it
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.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (841 bytes) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the pstack plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add michael-denyer/pstack-claude
/plugin install pstack@pstack-claudeOr copy only this skill to ~/.claude/skills/principle-foundational-thinking:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/principle-foundational-thinking &&
cp -R "$tmp/plugins/pstack/skills/principle-foundational-thinking" ~/.claude/skills/principle-foundational-thinking &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/principle-foundational-thinking inside it instead.
Copy the skill folder to ~/.agents/skills/principle-foundational-thinking to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/principle-foundational-thinking &&
cp -R "$tmp/plugins/pstack/skills/principle-foundational-thinking" ~/.agents/skills/principle-foundational-thinking &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/principle-foundational-thinking inside it instead.
Copy the skill folder to ~/.cursor/skills/principle-foundational-thinking to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/principle-foundational-thinking &&
cp -R "$tmp/plugins/pstack/skills/principle-foundational-thinking" ~/.cursor/skills/principle-foundational-thinking &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/principle-foundational-thinking inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/michael-denyer/pstack-claude.git --path plugins/pstack/skills/principle-foundational-thinkingOr copy the folder to ~/.gemini/skills/principle-foundational-thinking yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/principle-foundational-thinking:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/principle-foundational-thinking &&
cp -R "$tmp/plugins/pstack/skills/principle-foundational-thinking" ~/.copilot/skills/principle-foundational-thinking &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/principle-foundational-thinking inside it instead.
Get the folder:
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.gitThen copy pstack-claude/plugins/pstack/skills/principle-foundational-thinking into your agent's skills folder as principle-foundational-thinking. Agents that support SKILL.md read one folder per skill.
What it does
- Data shape first
- Directs the agent to define core types and trace access patterns before writing logic.
- Dominant path structures
- Guides choosing data structures that suit the most frequent access paths.
- Concurrency isolation check
- Prompts the agent to ask how concurrent actors could modify shared state and isolate it when needed.
- Scaffold ordering
- Sequences shared foundations like CI, tests and types ahead of feature work.
- Small focused commits
- Encourages removing dead code and keeping each commit single-purpose.
Good for
- Design the types for a new data model before implementing features
- Plan the order of setup work versus feature work in a new project
- Review whether shared state in a service needs isolation from concurrent writers
- Refactor a codebase so its data structures make downstream code simpler
Principle foundational thinking FAQ
When does Principle foundational thinking trigger?
It is meant to apply before writing logic, specifically when choosing core types and data structures, sequencing scaffold versus feature work, and when asking what concurrent actors share.
Does Principle foundational thinking need any scripts or external tools?
No scripts are included. It is a single SKILL.md instruction file with no tool permissions set.
Which clients does Principle foundational thinking work with?
It is distributed as a Claude Code plugin through the pstack-claude marketplace.
How do I install Principle foundational thinking in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/principle-foundational-thinking to use it in all your projects, or to .claude/skills/principle-foundational-thinking in one project. Or install the pstack plugin, which includes it: /plugin marketplace add michael-denyer/pstack-claude, then /plugin install pstack@pstack-claude.
Does Principle foundational thinking run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Principle foundational thinking?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Principle foundational thinking?
The closest alternatives to Principle foundational thinking are Principle separate before serializing shared state, Principle subtract before you add, Principle never block on the human, Principle model the domain and Abstract.
Where this comes from
- Description: from the skill's own SKILL.md.
More from michael-denyer/pstack-claude

Makes the agent read pstack's poteto-mode skill first and follow its routing
- Open source
- 5.1K GitHub stars
- Developer tools

Has the agent restate your goals and the problem you're solving in its own words
- Open source
- 5.1K GitHub stars
- Productivity

Prototype 2-3 competing designs and compare them before committing to one
- Open source
- 5.1K GitHub stars
- Developer tools

Sketches types, signatures and module layout before the agent writes code
- Open source
- 5.1K GitHub stars
- Developer tools

Runs parallel candidate attempts at a task, then merges the best parts into one artifact
- Open source
- 5.1K GitHub stars
- Developer tools

Drafts a personal working-style skill from your past agent conversations
- Open source
- 5.1K GitHub stars
- Developer tools

