Architecture Optimization Journey
An interactive, resumable eight-phase journey that measures, untangles, and speeds up a working-but-slow codebase while logging every decision in docs/.
Dev & CodingAdvanced★ 2,047⑂ 212AI score 9/10Last updated: Aug 28, 2026
What it does
Improves a shipping codebase on three axes at once — architecture, code quality, and performance — without breaking what works.
- Eight phases: ①pin behavior with characterization tests + capture baselines → ②restore the Dependency Rule → ③deepen shallow modules → ④refactor hot paths → ⑤attack the measured bottleneck → ⑥fix the data layer (N+1s, indexes, isolation) → ⑦timeouts, breakers, bulkheads → ⑧turn budgets into CI gates.
- Core law: never optimize what you haven't measured, never restructure what isn't pinned; any change that doesn't beat its baseline gets reverted, not kept.
- Resumable: state lives in
docs/ARCHITECTURE-OPTIMIZATION-PLAN.md,PERFORMANCE.md,ARCHITECTURE.md,TECH-DEBT.md,RELIABILITY.md. - Asks before deciding: budgets, cache invalidation rules, index trade-offs — each with options and a recommendation.
Who it's for
- Backend/full-stack engineers running a production system that "works but is slow and getting worse"
- Team leads who want p95, slow-query, and infra-cost problems solved with evidence instead of intuition
- Tech leads and architects who must document optimization decisions and deferred debt
Examples
- Slow checkout API: "Get checkout p95 under 500ms" → Phase 1 pins behavior and records a profiler baseline; Phases 5-6 fix an N+1 and a missing index with before/after numbers in the Optimization Ledger.
- Drifted monolith: business logic imports the ORM everywhere → Phase 2 maps the dependency graph, tables every violation, and extracts framework-free use cases on the hot paths.
- One flaky third-party API stalls everything: Phase 7 assigns timeouts inside each flow budget, adds circuit breakers and bulkheads, and designs RED metrics with symptom alerts.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/wondelai/skills/HEAD/architecture-optimization/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the architecture-optimization folder from the GitHub repo wondelai/skills into my ~/.claude/skills/architecture-optimization/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/wondelai/skills.git /tmp/wondelai-skills && mkdir -p ~/.claude/skills && cp -r /tmp/wondelai-skills/architecture-optimization ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/wondelai/skills.git /tmp/wondelai-skills - Create the skills folder:
mkdir -p ~/.claude/skills - Copy this skill:
cp -r /tmp/wondelai-skills/architecture-optimization ~/.claude/skills/ - (Recommended) Copy the eight constituent skills so each phase runs its full method:
cp -r /tmp/wondelai-skills/{working-with-legacy-code,clean-architecture,software-design-philosophy,refactoring-patterns,system-design,ddia-systems,release-it,pragmatic-programmer} ~/.claude/skills/ - Restart Claude Code, open your project folder, and say: "My app is slow — start the architecture optimization journey."
- Answer the intake questions (load numbers, stack, existing tests) to generate
docs/ARCHITECTURE-OPTIMIZATION-PLAN.mdand begin Phase 1.
View source on GitHub ↗License: MIT