技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
plan-perf-audit【数据与研究】Plan-only performance audit across web, mobile, backend, and data; measures first, fixes nothing. Use when "performance audit plan", "perf burndown", "measure before optimize", or "N+1 audit plan". Apply fixes → audit-performance.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Degree of freedom: HIGH — measure, interpret, plan. Stay plan-only. Do not optimize in this pass.
Role: Senior performance engineer (web + mobile + backend/data).
Task: Profile the app, find performance issues across layers, plan fixes. Measure, don't guess. Audit & plan only — do not optimize in this pass.
| Skill | Does |
|---|---|
| plan-perf-audit (this) | Plan with measured baselines |
audit-performance | Audit + may optimize |
audit-bundle-size | JS bundle focus + reduction |
backend-db-performance | Query/index fixes (execution) |
mobile-rn-performance | RN perf fixes (execution) |
Loop: see docs/PLAN-LOOPS.md — after plan-test-coverage, parallel with plan-security-audit, before plan-docs-sync
Propose: split the 412 KB hero chart chunk; add an index on
orders(user_id, created_at)after EXPLAIN. Risk:/dashboardLCP 4.8s (Lighthouse); orders list is a 1.2s sequential N+1. Keep-working:/pricingalready LCP <2s; user lookup is indexed. Phase: Phase 1 — P0 hot-path wins. No fabricated numbers.
Read references/preservation-contract.md. Acknowledge in output #1.
Hardest guardrail: no fix proposed without a measured baseline (or explicit [NEEDS PROFILING]).
| File | Contents |
|---|---|
references/audit-scope.md | Layers, methodology, measurement, research fixes |
references/output-templates.md | Baselines, burndown, phased plan |
1. Fingerprint stack (web/RN/API/Supabase)
2. Measure baselines per layer (no guessing)
3. Trace hot paths
4. Per-layer issue inventory
5. Burndown + phased optimization plan
6. Guardrails (budgets, Lighthouse CI, RUM)
7. Research citations
Optional browser: Lighthouse via playwright-cli. Read protocol-browser-anti-stall first.
Establish baselines before any fix proposal:
| Layer | Tools |
|---|---|
| Web CWV | Lighthouse, web-vitals, RUM/Sentry |
| Bundle | rollup-plugin-visualizer, @next/bundle-analyzer |
| RN | Metro bundle report, cold start profiler |
| API | Sentry transactions, server logs |
| DB | Supabase advisors, EXPLAIN ANALYZE, slow query logs |
Scope detail: references/audit-scope.md
Prioritize highest-traffic screens, endpoints, queries. Tie each issue to path:line or query text.
Root-cause, not symptom. Quantify expected gain where possible.
Template: references/output-templates.md
Phases: (1) P0 hot-path wins → (2) structural → (3) polish.
Prevention: performance budgets in CI, RUM for real users, re-measure after each fix.
[NEEDS PROFILING]audit-bundle-size; apply-now optimize → audit-performance[NEEDS PROFILING] listEnd the turn with a standalone recap in chat: the two or three highest-impact measured issues and the first phase to approve. The plan is the deliverable — write it before the recap.