Agent skill · wondelai

architecture-optimization

Guided journey from a working codebase grown slow and tangled to one measurably fast, cleanly bounded, and readable. Orchestrates eight skills phase by phase - working-with-legacy-code, clean-architecture, software-design-philosophy, refactoring-patterns, system-design, ddia-systems, release-it, pragmatic-programmer - every phase carries its method inline so it runs standalone, asking the user questions at every decision point and recording results in the project docs/ folder (PERFORMANCE.md, ARCHITECTURE.md, ARCHITECTURE-OPTIMIZATION-PLAN.md) so the journey resumes across sessions. Use when the user wants to make an app faster, untangle drifted boundaries, fix slow endpoints and queries, or says ''it works but it is slow and getting worse''. For an untested prototype, improve-code-quality; for an aged codebase you fear to touch, remove-technical-debt; for greenfield structure, design-code-architecture; for marketing-site page speed, improve-website. For one framework in isolation, invoke that skill directly.

What it needs

About 12k tokens when loaded.

What this skill does

Architecture Optimization Optimize a working codebase on three axes at once — architecture, code quality, and performance — without breaking what works. This is an interactive, resumable journey of eight phases: the agent asks before every decision and records the outcome in your project's docs/ folder, so you can stop after any phase and pick up later. It is for a system that ships and earns but has grown slow and tangled; the structure phases make the code safe and cheap to change, the performance phases make it measurably fast, and the closing phases keep it that way. Core Principle Measure before optimizing, pin before restructuring — the profiler and the safety net decide, not intuition. Premature optimization is the root of much evil not because optimization is bad, but because unmeasured optimization targets the wrong 97% of the code; and a restructure without pinned behavior is a gamble, not an improvement. This skill sequences the phases, asks the decision questions, and records every choice in docs/. The constituent skills carry the method — invoke them rather than improvising their frameworks. Journey Map Phase Skill Question it answers Artifact --- --- --- --- 1 working-with-legacy-code Is behavior pinned and performance measured, so every change is provable? Creates docs/PERFORMANCE.md + docs/TECH-DEBT.md; extends docs/TESTING.md — GATE 2 clean-architecture Do dependencies still point inward, or has the boundary drifted as the code grew? Extends docs/ARCHITECTURE.md 3 software-design-philosophy Are modules deep, or has the structure itself become the complexity? Extends docs/TECH-DEBT.md 4 refactoring-patterns Can we reshape the hot paths in named, behavior-preserving steps? Extends docs/TECH-DEBT.md + docs/TESTING.md 5 system-design What does the measured load say the bottleneck is, and what is the cheapest fix? Extends docs/PERFORMANCE.md + docs/ARCHITECTURE.md 6 ddia-systems Is the data layer the bottleneck — queries, indexes, isolation, derived data …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills wondelai/architecture-optimization--2d096c

View the source on GitHub

Browse the @skills marketplace