AI Agent Hub
Back to skills
Frontend Performance Optimizer icon

Frontend Performance Optimizer

Development Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @user_4d23279b/perf-optimizer according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem

Front-end performance tuning often stalls at the point where the metric is bad but the fix is unclear: a Lighthouse score can drop while LCP, TBT, and CLS still cannot be traced to a specific build config, asset, or code path. This skill turns that uncertainty into a bounded workflow: confirm tooling, capture a baseline, select the Top 3 issues, modify only after user confirmation, and re-verify.

Workflow

It defaults to human-in-the-loop steps, pausing after each Step for approval. The main path is:
- PRECHECK: verify Node/npm, Lighthouse CLI, and Chrome DevTools MCP capabilities without auto-installing missing tools.
- PROFILE / MEASURE: build a project profile, run Lighthouse CLI against target pages to collect Performance and Best Practices JSON, and save raw artifacts.
- ANALYZE / SUGGEST: rank candidates from metrics, Opportunities, Diagnostics, and trace evidence, then present a recommendation table without editing code.
- EXECUTE / VERIFY / RECORD: apply small, evidence-linked changes for build, asset, code, or micro-frontend issues; run project builds; re-measure under matching conditions; update perf-record/.

Boundaries

It fits front-end projects that can be started locally, allow page access, and permit code changes. If pages depend heavily on login, third-party SDKs, backends, or CDN policy, missing data and external constraints should be recorded. The process does not force five rounds; it targets simultaneous Performance and Best Practices thresholds and re-evaluates after round three.

Use Cases

  • Before a release, capture Lighthouse baselines for home, list, and detail pages and rank the top three issues.
  • Use Lighthouse opportunities and source-code evidence to make small changes to build output, images, fonts, or third-party scripts.
  • After fixes, re-test FCP, LCP, TBT, SI, CLS, and Best Practices and record whether metrics met targets or regressed.
  • Diagnose slow micro-frontend loading by locating entry, sub-app, and shared dependency asset issues, then propose verifiable fixes.

Best For

  • Front-end engineer owning Web performance metrics: runs Lighthouse baselines, Top 3 optimizations, and verification for core pages.
  • Front-end platform engineer managing bundle size: applies build-config and asset optimizations, then verifies performance scores.
  • Micro-frontend architecture engineer: locates entry, shared dependency, and route loading issues and makes low-risk verifiable fixes.
  • Tech Lead needing audit evidence: records measurement, analysis, changes, and re-tests in perf-record for review and follow-up.