principle-redesign-from-first-principles

principle-redesign-from-first-principles is a skill for Claude Code, OpenCode from painhardcore/pstack. It costs 43 tokens per session (181 once invoked), scanned A, a copy of principle-redesign-from-first-principles, MIT.

A design method for adding a new requirement to an existing system as though it had been part of the original design. It calls for examining the whole affected design and updating all related types, documentation, examples, and reasoning.

In plain words
What is it for?
Use it when changing an existing design, feature, interface, or requirement that affects several connected parts of a codebase.
Why use it?
It avoids awkward patches that satisfy the new requirement but leave the rest of the system inconsistent.

Skill for Claude CodeOpenCode

Written for Claude Code and OpenCode: shipped in a Claude Code plugin, but also installed under .opencode/.

Part of the pstack plugin — 41 skills, 2 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/painhardcore/pstack/principle-redesign-from-first-principles
Any agent
npx skills add painhardcore/pstack --skill principle-redesign-from-first-principles
Clone the repo
git clone --depth 1 https://github.com/painhardcore/pstack

Made for: Claude Code, OpenCode.

Or install pstack, the plugin that ships this one along with the rest of its 41 skills, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for principle-redesign-from-first-principles

README.md
[![agentmods](https://agentmods.dev/badge/skills/painhardcore/pstack/principle-redesign-from-first-principles.svg)](https://agentmods.dev/skills/painhardcore/pstack/principle-redesign-from-first-principles)
Your own site
<a href="https://agentmods.dev/skills/painhardcore/pstack/principle-redesign-from-first-principles"><img src="https://agentmods.dev/badge/skills/painhardcore/pstack/principle-redesign-from-first-principles.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 181 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 92% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.00181
Opus 5 $0.00022 $0.00090
Sonnet 5 $0.00009 $0.00036
Haiku 4.5 $0.00004 $0.00018

Measured 6d ago against content hash bd51e67f78ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

principle-redesign-from-first-principles scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

92% identical to principle-redesign-from-first-principles — 1 line differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.opencode/skills/principle-redesign-from-first-principles/SKILL.md · 16 lines

What it actually says

Redesign From First Principles

When integrating a change, don't bolt it onto the existing design. Redesign as if the requirement had been there from the start. The result should look like what we would have built if we'd known on day one.

  • Read all affected files and understand the current design holistically
  • Ask: "if we were writing this from scratch with this new requirement, what would we build?"
  • Propagate the change through every reference: types, docs, examples, rationale sections
  • Think about the redesign holistically, then deliver it incrementally

This is the method for preserving option value when integrating changes into an existing design.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 16 lines · 43 tokens per session scan A bd51e67f78ee

Subscribe to this mod's changes

principle-redesign-from-first-principles is a skill published in the GitHub repository painhardcore/pstack (1 stars, last pushed 10d ago), licensed MIT. It adds 43 tokens to every session and 181 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to principle-redesign-from-first-principles, differing in 1 line, and is treated as a copy.

Related

Other skills, from other repositories

design-system-architect

Expert guide for designing, building, and maintaining scalable UI design systems with design tokens, headless primitives, Material Design 3 (M3), Tailwind v4 @theme, and WCAG 2.2 accessibility.

roedyrustam/vibes-plug · 50 tokens

ui-ux-pro-max

Comprehensive design guide & BM25 search engine for web and mobile applications across 11 tech stacks / Panduan desain komprehensif & mesin pencari BM25 untuk aplikasi web dan mobile di 11 tech stack.

roedyrustam/vibes-plug · 50 tokens

hig

Applies Human Interface Guidelines (HIG) principles — Hierarchy, Harmony, and Consistency — to UI/UX designs to ensure intuitive and cohesive interfaces / Menerapkan prinsip Human Interface Guidelines (HIG) — Hierarchy, Harmony, dan Consistency — pada desain UI/UX untuk memastikan antarmuka yang intuitif dan kohesif.

roedyrustam/vibes-plug · 74 tokens

website-design-cloner

Analyzes and reverse-engineers website designs directly from a target URL, extracting layout structures, design tokens (colors, typography, spacing), component hierarchies, visual assets, and responsive behaviors to enable full 1:1 duplication into modern code (Tailwind CSS v4, React/Next.js, HTML/CSS). / Mempelajari…

roedyrustam/vibes-plug · 129 tokens

data-visualization-expert

Expert guide for data visualization, charts, and dashboards using D3.js, Recharts, Chart.js, Nivo, and Tremor / Panduan ahli visualisasi data, chart, dan dashboard menggunakan D3.js, Recharts, Chart.js, Nivo, dan Tremor.

roedyrustam/vibes-plug · 64 tokens

svg-animation-motion-expert

Expert guide for web animations: SVG manipulation, Framer Motion 12+, GSAP 3, CSS Scroll-Driven Animations, and View Transitions API / Panduan ahli animasi web.

roedyrustam/vibes-plug · 46 tokens