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

Good fit Use it when changing an existing design, feature, interface, or requirement that affects several connected parts of a codebase.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/painhardcore/pstack/principle-redesign-from-first-principles
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.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for principle-redesign-from-first-principles

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
Origin 91% 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.5 $0.00017 $0.00072
Sonnet 5.5 $0.00009 $0.00036
Haiku 4.5 $0.00004 $0.00018

Measured 1mo ago against content hash bd51e67f78ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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

91% identical to principle-redesign-from-first-principles — 9 lines 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. 1mo 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 (12 stars, last pushed 8d ago), licensed MIT. It adds 43 tokens to every session and 181 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 91% identical to principle-redesign-from-first-principles, differing in 9 lines, and is treated as a copy.

Related

Other skills, from other repositories

creating-figures

Creates publication-quality scientific figures for academic papers. Backend is chosen by host paper extension — .tex papers get TikZ figures, .typ papers get CeTZ figures; the two are never mixed. Use when creating block diagrams, system architectures, flowcharts, or technical illustrations for papers and theses.…

ai4paper/apaper-plugin · 86 tokens

ui

Opinionated constraints for building better web interfaces with coding agents. Use this skill whenever the user asks you to build, review, or fix a UI — landing pages, dashboards, components, or any frontend code — and whenever you write Tailwind CSS, motion/react animations, accessible component primitives (Base UI…

svngoku/coding-agents-skills · 120 tokens

logo-designer

Design and iterate on logos using SVG. Use this skill when the user asks to "create a logo", "design a logo", "make me a logo", "iterate on this logo", "logo for my project", or discusses logo design, branding icons, or wordmarks.

sutchan/Agent-Skills-Hub · 61 tokens

wp-patterns

A workflow for creating and updating WordPress block patterns, which are reusable layouts made from the block editor's content blocks. It also reviews their registration, accessibility, translations, and safe use of theme design settings.

sutchan/Agent-Skills-Hub · 84 tokens

ui-first-principles

A method for deciding which information and actions should appear first in a user interface or information architecture.

sd0xdev/sd0x-harness · 113 tokens

form-patterns

A Russian-language reference for designing managed 1C forms. It describes layout patterns, common conventions, user-experience rules, form archetypes, and advanced techniques.

IngvarConsulting/unica · 58 tokens