first-principles-thinking-skill
First principles thinking for coding agents. Challenge assumptions, find ground truths, build solutions from bedrock. Works with Claude Code, Cursor, Codex, OpenCode, Gemini CLI.
Install / Use
npx skills add swapnildahiphale/first-principles-thinking-skillInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of first-principles-thinking-skill
first-principles-thinking-skill scores 79/100 on our quality scale, 3594th of 4,614 Development & Engineering skills we index.
Its SKILL.md is 9.0 KB long, well organised into 23 sections with 10 code examples: a thorough specification that gives an agent plenty to work with.
It has 12 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 7 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-10-19 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 91/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
first-principles-thinking-skill compared with similar skills
All 4 of these similar skills score higher than first-principles-thinking-skill; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| first-principles-thinking-skill (this skill)by swapnildahiphale | 79 | 12 | 7mo ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 111.0k | 1d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 70.0k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 46.6k | 3d ago | CLAUDE.md |
| lobehubby lobehub | 100 | 84.2k | today | MCP Server |
Frequently asked questions
- How do I install first-principles-thinking-skill?
- Run
npx skills add swapnildahiphale/first-principles-thinking-skill. The install tabs above show the steps for each supported agent. - Which AI agents does first-principles-thinking-skill work with?
- It is written for Claude Code, Gemini CLI, Cursor and OpenAI Codex, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is first-principles-thinking-skill safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 91/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is first-principles-thinking-skill still maintained?
- The repository was last updated about 7 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubFirst principles thinking is a problem-solving method that breaks engineering decisions into fundamental truths and rebuilds solutions from the ground up -- rather than copying patterns by analogy. This coding agent skill brings that methodology into your daily workflow, automatically challenging assumptions before you commit to an architecture, a technology choice, or a debugging strategy.
What Is First Principles Thinking?
Instead of reasoning by analogy ("Netflix uses microservices, so we should too"), first principles thinking asks: what are the actual constraints, and what solution follows from those constraints alone?
This skill applies that discipline to software engineering. Instead of letting you jump straight to "just use Redis" or "let's do microservices," it forces a structured decomposition:
- Restates the problem and confirms understanding
- Asks Socratic questions to surface hidden assumptions
- Decomposes into ground truths vs inherited conventions
- Rebuilds solutions from verified truths upward
- Produces a structured artifact that guides implementation
The skill auto-detects when you're making architecture, design, or technology decisions and activates proportionally -- quick analysis for medium decisions, deep analysis for system design.
Why First Principles Thinking?
Most engineering mistakes don't come from bad execution. They come from solving the wrong problem, or solving the right problem with inherited assumptions baked in.
- "We need a cache" -- Do you? Or is the query just badly written?
- "Let's use microservices" -- Why? What's the actual scaling constraint?
- "We should use Kafka" -- For 100 messages per second?
First principles thinking catches these assumptions before they become architecture. It's the difference between building the right thing and building the wrong thing efficiently.
Installation
Claude Code
Register the GitHub repo as a marketplace, then install:
/plugin marketplace add swapnildahiphale/first-principles-thinking-skill
/plugin install first-principles-thinking@swapnildahiphale
Claude Code reads .claude-plugin/marketplace.json from the repo to discover the plugin.
Cursor
Clone the repo and add the plugin locally:
git clone https://github.com/swapnildahiphale/first-principles-thinking-skill.git
Then in Cursor Settings > Features > Skills, add the path to the cloned directory. Or copy SKILL.md and references/ into your project's .cursor/skills/ directory.
Codex
Tell Codex:
Fetch and follow instructions from https://raw.githubusercontent.com/swapnildahiphale/first-principles-thinking-skill/refs/heads/main/.codex/INSTALL.md
Or install manually:
git clone https://github.com/swapnildahiphale/first-principles-thinking-skill.git ~/.codex/first-principles-thinking
mkdir -p ~/.agents/skills
ln -s ~/.codex/first-principles-thinking ~/.agents/skills/first-principles-thinking
Restart Codex. The skill is discovered automatically from ~/.agents/skills/.
OpenCode
Add to the plugin array in your opencode.json (global or project-level):
{
"plugin": ["first-principles-thinking@git+https://github.com/swapnildahiphale/first-principles-thinking-skill.git"]
}
Restart OpenCode. The skill auto-registers on launch.
Gemini CLI
gemini extensions install https://github.com/swapnildahiphale/first-principles-thinking-skill
Manual Installation (any platform)
Clone and symlink or copy into your platform's skills directory:
git clone https://github.com/swapnildahiphale/first-principles-thinking-skill.git
Copy SKILL.md and references/ into whichever directory your agent scans for skills.
Verify Installation
Start a new session and try a problem that should trigger the skill, for example: "Should I use Redis or Memcached for caching?" The agent should activate first-principles analysis before recommending a solution.
Usage
The skill triggers automatically when it detects complexity signals in your request:
| Trigger Type | Examples | |-------------|---------| | Architecture | "how should I structure this?", "what pattern should I use?" | | Technology selection | "should I use Redis or Memcached?", "which database?" | | Complex debugging | "can't figure out why this keeps failing" | | Performance | "this endpoint is slow, should I add caching?" | | Explicit | "think from first principles", "FP mode" |
You can also invoke it manually with phrases like "first principles" or "FP mode."
Depth Levels
| Level | When | Time | |-------|------|------| | Quick | Medium decisions, manual invoke | ~1-2 min | | Standard | Architecture, design, tech selection | ~3-5 min | | Deep | System design, hard debugging | ~5-10 min |
Example
You: "Our API is slow. Should we add a Redis cache?"
Skill: Restates problem, then asks:
- "Have you profiled where the time is actually spent?"
- "What's the current latency vs target?"
- "What if the slowness is in the query, not the lack of a cache?"
Decomposes into:
[TRUTH] P99 must be under 200ms (SLA)
[TRUTH] Current: 800ms average
[ASSUMPTION] We need caching -> Maybe fix the query first
[ASSUMPTION] Redis specifically -> Memoization might suffice
Recommends: Fix the N+1 query first (2 hours, trivial to revert).
Measure again. Only add caching if still needed.
Updating
# Claude Code
/plugin update first-principles-thinking
# Codex
cd ~/.codex/first-principles-thinking && git pull
# OpenCode (updates automatically on restart)
# Gemini CLI
gemini extensions update first-principles-thinking
Structure
first-principles-thinking-skill/
├── SKILL.md # Main skill definition
├── references/
│ ├── first-principles-examples.md # 4 worked examples
│ └── first-principles-real-world-examples.md # SpaceX/Tesla examples
├── docs/ # GitHub Pages landing page
│ ├── index.md
│ └── _config.yml
├── assets/
│ └── social-preview.png # Social media preview image
├── .claude-plugin/
│ ├── plugin.json # Claude Code plugin manifest
│ └── marketplace.json # Marketplace catalog
├── .cursor-plugin/
│ └── plugin.json # Cursor plugin manifest
├── .codex/
│ └── INSTALL.md # Codex installation instructions
├── README.md
└── LICENSE
Key Concepts
Ground Truth vs Assumption -- The core distinction. Ground truths are constrained by physics, math, or verified requirements. Assumptions are inherited conventions that can be challenged.
Smart Threshold -- Auto-triggers for complex decisions, stays dormant for simple tasks. You can always say "just do it" to bypass.
Proportional Depth -- Quick/Standard/Deep levels match the analysis effort to the problem's importance.
Common Traps -- Named patterns to watch for: Analogy Trap, Complexity Trap, Legacy Trap, Tool Trap.
Contributing
Contributions welcome. Please open an issue or pull request.
Creator
<table> <tr> <td> <strong>Swapnil Dahiphale</strong> · SRE · Builder<br> <em>"Built by someone who questions everything."</em> </td> <td align="right"> <a href="https://swapnil.one"> <img src="https://img.shields.io/badge/Portfolio-000000?style=for-the-badge&logo=safari&logoColor=white" alt="Portfolio" /> </a> <a href="https://www.linkedin.com/in/swapnil2233/"> <img src="https://img.shields.io/badge/LinkedIn-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white" alt="LinkedIn" /> </a> </td> </tr> </table>License
MIT License -- see LICENSE for details.
Related Skills
taste-skill
111.0kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
70.0kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
46.6kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
lobehub
84.2k🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
