/fable5-methodology:performance-optimizationfrom fable5-methodology
Make code measurably faster or leaner without breaking it: define a target, measure a baseline, profile to find the actual bottleneck, apply optimizations in order of leverage, and re-verify correctness.
Ships in fable5-methodology. 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.
Optimization without measurement is guessing with extra steps. Intuition about bottlenecks is wrong often enough that acting on it unmeasured wastes the time it was meant to save. The number rules everything: define it, baseline it, move it, prove it.
/search under 300 ms at 50 rps", "import of the
1M-row file under 2 min", "RSS under 512 MB". No target = no definition of done = optimization
that never ends. If the user gave none, propose one and get a nod.Measure the current number, three runs (warm), record median and spread in your notes. Every later claim of improvement is relative to this recorded baseline — "feels faster" is not a result.
Use the stack's profiler, not code reading:
cargo flamegraph / perf; --release always — debug-build numbers are fiction.node --prof or 0x/clinic flame; console.time brackets for coarse cuts.py-spy record (no code change) or cProfile + snakeviz.EXPLAIN (ANALYZE, BUFFERS) on the real query with real data volume.Read the profile for the top consumer. Rule: no optimization is applied to code the profile didn't indict. If the profile surprises you (it usually does), that surprise just saved you a week of optimizing the wrong thing.
Try each level; only descend when the level above is exhausted for the indicted hotspot:
--release.For EACH optimization: apply it alone → re-run the metric → re-run the correctness suite. Keep a running table in your notes:
| Change | p95 before | p95 after | Tests |
|---|---|---|---|
Add index on orders(user_id, created_at) | 1400 ms | 310 ms | green |
| Batch the price lookups | 310 ms | 180 ms | green |
A change that doesn't move the number gets REVERTED, even if it "should" help — dead optimizations are complexity with no dividend. A change that breaks a test is a bug, not a trade-off, unless the user explicitly accepts the trade.
When the target from Step 1 is met: stop. Further optimization is scope creep with a performance costume. Report the table, the final number vs. target, and any identified-but- unneeded next levers ("materialized view would take it to ~80 ms if ever needed").
"The dashboard takes 8 s to load; get it under 2 s."
The target metric from Step 1 is met and demonstrated by recorded before/after measurements on the realistic workload; every applied change is in the table with its own measured delta; the full correctness suite is green after the final state; ineffective changes were reverted; and no code the profiler didn't indict was "optimized".
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub unpaidattention/fable5-methodology --plugin fable5-methodology26 skills in this plugin
/architecture-decisionsChoose between competing technical approaches and make design decisions with an explicit trade-off order. Trigger this when a task requires selecting among 2+ viable designs — "should we use X or Y", designing a schema, shaping a public API, choosing a storage/queue/cache mechanism, deciding whether to add a dependency, or deciding whether to introduce an abstraction. Do NOT trigger for initial request parsing (use task-planning), for line-level style questions (use implementation-standards), or when the codebase already has an established pattern for this exact problem — in that case, follow the existing pattern without deliberation./codebase-explorationMap an unfamiliar repository before changing anything in it — structure sweep, entry points, configs, test baseline, targeted tracing, and mental-model confirmation. Trigger this the FIRST time you work in a repo (or an unfamiliar subsystem of a known repo) in a session, before your first edit there — whenever the user says "fix/add/change X" in code you have not yet mapped. Do NOT trigger for repos or areas you already mapped this session, for single-file scripts with no surrounding project, or for parsing the request itself (use task-planning) — this skill is about understanding the code, not the ask./code-reviewReview a diff or pull request — including your own before delivery — in a fixed pass order (correctness, then safety/security, then design, then style) and report findings ranked by severity. Trigger this when asked to review a PR or diff, when checking over a change before committing or handing it off, and as the design-and-correctness half of your own pre-delivery review. Do NOT trigger for the mechanical did-it-run gate (use verification-and-review) or for a dedicated vulnerability sweep (use security-review, which this skill's safety pass defers to) — this skill is holistic human-style review of a change set./context-economyProtect the context window as a scarce resource — read at the right altitude, delegate bulk reconnaissance to subagents so only conclusions enter the main thread, externalize durable facts to disk, and respond to your own degradation signals. Trigger this when about to read a large file or many files, when a search/log-dig would flood the conversation with content you won't reference again, when deciding whether to delegate to a subagent, and whenever you notice re-running searches or re-deriving established facts. Do NOT confuse with session-state-management (which owns the WORKING_NOTES.md file and resume protocol — this skill decides what enters context at all) or incremental-delivery (which chunks the deliverable — this skill budgets the reading around it)./course-correctionRecognize mid-task that the current APPROACH is wrong and execute a disciplined stop-revert-replan instead of accumulating patches. Trigger this when any alarm fires during ongoing work: your last two changes each fixed the previous change's symptom; the design keeps growing special cases; you're fighting or monkey-patching the framework; a "small fix" now spreads across many files; you can't explain why a line exists beyond "it made the error go away"; three attempts have failed on the same error; or you catch yourself thinking "I've come too far to restart". Do NOT trigger for a single reproducible bug with a working approach (use debugging-methodology) — this skill is for when the plan itself is the bug./debugging-methodologyStep-by-step procedure for diagnosing and fixing failures — reproduce, read, hypothesize, bisect, fix, regression-test. Trigger this whenever something does not work as expected — a bug report, a failing or flaky test, a crash, an error message, wrong output, "it worked yesterday", or unexpected behavior during your own implementation. Trigger BEFORE proposing any fix. Do NOT trigger for building new features (use task-planning) or for the moment you realize your overall approach is wrong rather than the code (use course-correction).Other plugins' skills for the same job