/praxis:performance-reasoningfrom praxis
Enforces a measurement-first optimization protocol: baseline capture, bottleneck identification, and premature-optimization check before any code change.
Ships in praxis. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
EXTREMELY_IMPORTANT: This is a MANDATORY protocol, not a suggestion. Follow every step. Do not skip steps. Do not combine steps. Do not summarize. Work through each gate in order.
Something works but needs to be better. Do NOT start optimizing. An unmeasured optimization is a guess wearing a lab coat. Follow this protocol.
Before changing anything, produce a baseline measurement:
Do NOT proceed on intuition ("it's probably the DB"). "It's structural, I don't need a profile" is the same intuition in better clothes — an N+1 pattern, a nested loop, a chatty API are hypotheses about cost until a measurement says they dominate. If you cannot run a profiler or benchmark, add measurement instrumentation FIRST — that is the first task, not optional. Sequencing is the discipline: do NOT present rewritten code before this step is complete. When measurement is impossible in your context, the deliverable is the measurement plan first, then a fix labeled HYPOTHESIS — measurement bolted on after the rewrite as "verification" is this step skipped.
Apply Theory of Constraints. From the baseline profile, name exactly ONE binding constraint — the resource or step that limits the whole system. Not a list of "things that could be slow." One.
State it as: "The constraint is [X], consuming [N]% of [metric]. Improving anything else changes the end-to-end number by at most [100−N]%."
If no single item dominates (nothing above ~30%), say so explicitly — that is a finding, and it means broad rewrites, not spot fixes, and the user must confirm scope.
Before designing a fix, answer each:
If the honest answer is "this doesn't matter yet," STOP and report that back with the baseline numbers as evidence. Recommending no change is a valid, complete outcome.
Design the smallest change that attacks the named constraint (Pareto: the 20% of code causing 80% of the cost). Do not bundle unrelated "while I'm here" improvements — they contaminate the measurement. One constraint, one change, one measurement.
Re-run the EXACT method recorded in STEP 1 — same command, same load, same environment, same run count. Do not substitute a different benchmark that flatters the change.
Confirm: the metric improved AND the profile shows the old bottleneck no longer dominates (the constraint moved). If the number improved but the profile is unchanged, you measured noise — investigate before claiming success.
OPTIMIZATION RESULT: [what changed]
├── Baseline: [value] measured by [method]
├── After: [value] measured by [same method]
├── Constraint: [old bottleneck] → [new bottleneck, there is always one]
├── Trade-off: [what got worse — memory, complexity, cold-start, cost. "None" is suspect]
├── Regression check: [tests/behavior verified unchanged]
└── Confidence: [HIGH / MEDIUM / LOW]
Confidence: HIGH = same-method before/after with stable variance and moved constraint. MEDIUM = improvement measured but variance overlaps or environment differed. LOW = could not reproduce baseline conditions — say what measurement would raise it.
Do NOT claim a performance fix is done until: - A baseline exists from STEP 1 naming the bottleneck via a recorded method - The after-measurement uses the SAME method, environment, and load as the baseline - The trade-off (what got worse) is stated explicitly — every optimization spends somethingRed flags that this skill catches:
After the constraint is identified and the fix is designed (end of STEP 4):
If Superpowers is installed → invoke Skill(superpowers:test-driven-development) to
implement the change. Pass the baseline numbers, the named constraint, and the exact
measurement method — the before/after verification in STEP 5 still belongs to this
protocol. PRAXIS measures and targets. Superpowers implements.
If Superpowers is NOT installed → implement the change yourself, then return to STEP 5.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub xd4o/praxis --plugin praxis19 skills in this plugin
/architecture-reasoningMANDATORY architecture analysis. You MUST invoke this skill before making module boundary decisions, build-vs-buy choices, technology selections, data model designs, API contracts, or any structural decision that is expensive to reverse. Do NOT propose architecture without running reversibility classification, boundary analysis, and bottleneck identification. Invoke BEFORE writing implementation plans for non-trivial systems.
/codebase-comprehensionMANDATORY comprehension protocol. You MUST invoke this skill before changing code you did not write or do not already understand — modifying, fixing, extending, or refactoring an existing file, function, or module whose behavior you have not traced. Do NOT edit from pattern-matching. Do NOT claim "nothing else is affected" without checking. Invoke BEFORE proposing the edit. Does NOT apply to greenfield code you are writing from scratch, or to diagnosing a runtime failure (use diagnostic-reasoning).
/code-quality-analysisMANDATORY code review protocol. You MUST invoke this skill when writing significant code (not one-liners), reviewing PRs or diffs, refactoring modules, or when code quality is requested. Runs 15 structural checks across readability, structure, safety, purity, and design. Complements TDD — tests verify behavior, this verifies design quality. Do NOT ship code with 3+ safety failures without remediation.
/decision-analysisMANDATORY trade-off evaluation. You MUST invoke this skill when the user faces a choice between alternatives — build-vs-buy, rewrite-vs-patch, technology selection, resource allocation, priority decisions. Do NOT default to the first reasonable option. Do NOT skip evaluating "do nothing" as a valid alternative. Invoke this to run weighted criteria analysis with second-order consequences before recommending.
/diagnostic-reasoningMANDATORY debugging protocol. You MUST invoke this skill when debugging complex issues, investigating failures, diagnosing intermittent problems, or performing root cause analysis. Do NOT start changing code before collecting observations. Do NOT guess at causes — generate 5 competing hypotheses and design a discriminating test. Invoke this BEFORE touching any code when something is broken.
/domain-modelingMANDATORY modeling protocol. You MUST invoke this skill when designing a data model, domain model, database schema, or the core entities and relationships of a system — "design the schema", "model this domain", "what tables/entities do we need". Do NOT jump to tables or classes before the invariants are named. Do NOT leave illegal states representable. Invoke BEFORE writing migrations, ORM models, or type definitions for the domain. Does NOT apply to choosing a database engine (use architecture-reasoning).
Other plugins' skills for the same job