Đang tải…
Đang tải…
Profiles and optimizes the app pass after pass until it consistently meets a defined performance budget.
npx claude-code-templates@latest --loop engineering/perf-budget-loopLoop Engineering — hold the agent to a concrete, measurable budget and let it optimize until the number is real and stable.
Drive a target metric (page load, bundle size, p95 latency, etc.) under its budget by profiling, fixing the biggest bottleneck each pass, and re-measuring — without breaking functionality.
Suggested interval: 20m.
/loop 20m "Profile the app against the performance budget. Find the single biggest bottleneck, fix it, and re-measure. Verify no tests break. Continue until the metric meets the budget across three consecutive runs."
/performance-audit and capture the current metric.performance-engineer agent identifies the top bottleneck./optimize-bundle-size).Metric ≤ budget across consecutive runs, with no functional regression.
agent:performance-testing/performance-engineer — diagnoses bottlenecks.command:performance/performance-audit — measures each pass.command:performance/optimize-bundle-size — one of the optimization levers.Targeting a 200 KB JS budget, the loop lazy-loads a chart library, trims a moment.js import, and de-dupes a dependency until the bundle stabilizes under budget.