[ PACK LIBRARY / SOFTWARE DEVELOPMENT ]

TASKFREE SAMPLETESTED

Run a full performance audit: Lighthouse, bundle, images

STAFF TORQUE · V0.2.1
bopen-tools:perf-auditbopen-tools:frontend-performance

REQUIRES

  • claude plugin install bopen-tools@b-open-io

WHEN TO REACH FOR THIS

Your site "feels slow" and you want a scored, prioritized fix list backed by numbers. This is a single sitting: Torque runs the deterministic local audits, layers a Lighthouse pass on top, and hands back a ranked list of what actually costs you — blocking scripts, oversized bundles, unoptimized images, and render-blocking CSS — with the biggest wins first. It saves you the afternoon of manually diffing bundle stats and guessing which image is the problem.

REQUIRES

  • claude plugin install bopen-tools@b-open-io (provides bopen-tools:perf-audit and bopen-tools:frontend-performance)
  • A local checkout of the project with dependencies installed
  • Node/Bun and a production build command that works (bun run build or equivalent)
  • For the Lighthouse pass: the app runnable locally (bun dev or a served production build) and Chrome available for headless runs

CONTEXT INPUTS

{{PROJECT_PATH}}       # absolute path to the repo to audit
{{BUILD_COMMAND}}      # e.g. bun run build ; the perf scripts need build output to exist
{{LOCAL_URL}}          # URL the app serves on locally, e.g. http://localhost:3000
{{TARGET_ROUTES}}      # 1-3 routes that matter most (home, dashboard, checkout)

THE PROMPT

PASTE INTO YOUR AGENT
You are running a full, single-session performance audit on {{PROJECT_PATH}}. You produce a scored, prioritized fix list. You do NOT change product behavior or design in this pass.

Setup:
1. Load the bopen-tools:perf-audit skill and follow it. Confirm a production build exists; if not, run {{BUILD_COMMAND}} first, because the bundle audit needs build output.

Do:
2. Run the full audit script from the perf-audit skill against {{PROJECT_PATH}} to get the baseline health score (0-100) plus the image, bundle, and dependency sub-reports.
3. For {{TARGET_ROUTES}} served at {{LOCAL_URL}}, load the bopen-tools:frontend-performance skill and run its Lighthouse pass. Capture score, LCP, TBT, and CLS per route, plus the bootup-time and main-thread breakdown for the slowest route.
4. Merge the two data sources into one ranked list. Rank by estimated user impact, not by how easy each fix is. For every item record: the metric it hurts, the evidence (file, size, or audit value), and the concrete fix.

Verify:
5. Re-read your list and drop anything you cannot back with a number from the audit output. Every line must cite a real measurement.

Negative prompts:
- Do NOT apply fixes in this run. This is a read-and-report pass; a separate playbook ships the changes.
- Do NOT change the design, framework, or dependencies.
- Do NOT invent metrics. If a script could not run (no build, Chrome missing), say so and mark that section incomplete rather than guessing.

Deliverable:
6. Return the baseline health score, per-route Lighthouse metrics, and the ranked fix list with evidence and same-day-actionable next steps.

EXPECTED OUTPUT

A single report: the baseline health score, per-route Lighthouse numbers (LCP/TBT/CLS), and a ranked, evidence-backed fix list you can act on the same day — no code changed yet.

FOLLOW-UP CHAIN

  • sd-image-bundle-opt — Cut page weight with an image and bundle optimization pass (execute the top fixes)
  • sd-ship-safely-chain — Ship-a-feature-safely chain: build to perf audit to test to deploy
  • sd-e2e-ci-gate — Add an e2e suite and a merge-blocking coverage gate (lock the wins in)

← PACK CONTENTS