agentleFS
MathiasPaulenkoMathiasPaulenko/ai-toolkit/skills/wavexis-performance-audit/SKILL.md

WaveXis Performance Audit

Skill2 starsChanged 4 months agoMITView on GitHub

Performance auditing with wavexis. Core Web Vitals measurement (LCP, CLS, INP), CPU traces, JS/CSS coverage, heap snapshots, Lighthouse audits, CI budgets.

  • Installs packages

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When --assert is used, the command exits with:

    line 209
  2. Distinctive:

    Run Lighthouse audits directly from wavexis.

    line 228

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

WaveXis Performance Audit

Description

Performance auditing with wavexis — measure Core Web Vitals (LCP, CLS, INP), capture CPU traces, analyze JS/CSS coverage, take heap snapshots, run Lighthouse audits, and enforce CI performance budgets.

When to Invoke

  • Measuring Core Web Vitals (LCP, CLS, INP) for a page
  • Running Lighthouse audits (performance, accessibility, best practices, SEO)
  • Capturing CPU performance traces
  • Analyzing JS or CSS code coverage
  • Taking heap snapshots for memory analysis
  • Setting up CI performance gates with budgets
  • Generating performance reports for CI/CD

Prerequisites

  • pip install wavexis[cdp]
  • Chrome or Edge installed
  • Basic familiarity with wavexis CLI (see wavexis-cli-automation skill)

perf Command

The perf command provides subcommands for performance profiling.

Metrics

Collect performance metrics from a page load:

wavexis perf metrics https://example.com

Output includes:

  • First Contentful Paint (FCP)
  • Largest Contentful Paint (LCP)
  • Cumulative Layout Shift (CLS)
  • Interaction to Next Paint (INP)
  • Total Blocking Time (TBT)
  • Time to Interactive (TTI)
  • Speed Index
  • Time to First Byte (TTFB)

Trace

Capture a CPU performance trace:

wavexis perf trace https://example.com --output trace.json

Profile

Capture a CPU profile:

wavexis perf profile https://example.com --output profile.json

JS Coverage

Measure JavaScript code coverage:

wavexis perf coverage https://example.com --output js-coverage.json

Returns:

  • URL of each JS file
  • Total bytes
  • Used bytes
  • Unused bytes
  • Usage percentage

CSS Coverage

Measure CSS code coverage:

wavexis perf css-coverage https://example.com --output css-coverage.json

Heap Snapshot

Take a heap snapshot for memory analysis:

wavexis perf heap-snapshot https://example.com --output heap.heapsnapshot

perf options

OptionTypeDefaultDescription
--outputstrstdoutOutput file path
--timeoutint30000Page load timeout (ms)
--wait-untilstrloadWait condition: load, domcontentloaded, networkidle
--repeatsint1Number of runs to average
--mobileflagoffEmulate mobile device
--throttleflagoffApply CPU/network throttling

cwv Command

Measure Core Web Vitals with 0-100 scoring.

Basic CWV measurement

wavexis cwv https://example.com

CWV with mobile emulation

wavexis cwv https://example.com --mobile

CWV with throttling

wavexis cwv https://example.com --throttle

CWV with multiple runs

wavexis cwv https://example.com --repeats 5

CWV output

{
  "lcp": {
    "value": 2200,
    "unit": "ms",
    "rating": "needs-improvement",
    "score": 75
  },
  "cls": {
    "value": 0.05,
    "unit": "score",
    "rating": "good",
    "score": 100
  },
  "inp": {
    "value": 180,
    "unit": "ms",
    "rating": "good",
    "score": 92
  },
  "overall": {
    "score": 89,
    "rating": "needs-improvement"
  }
}

Rating thresholds

MetricGoodNeeds ImprovementPoor
LCP≤ 2.5s2.5s - 4.0s> 4.0s
CLS≤ 0.10.1 - 0.25> 0.25
INP≤ 200ms200ms - 500ms> 500ms

CWV with budget

wavexis cwv https://example.com --budget budget.json

Exits with code 1 if any metric exceeds the budget.

CWV Budgets

Budget JSON format

{
  "lcp_ms": 2500,
  "cls": 0.1,
  "inp_ms": 200,
  "fcp_ms": 1800,
  "tbt_ms": 200,
  "tti_ms": 3800,
  "speed_index_ms": 3400
}

Budget with CI assert

wavexis cwv https://example.com \
    --budget budget.json \
    --assert

When --assert is used, the command exits with:

  • 0 — all metrics within budget
  • 1 — one or more metrics exceeded budget

Budget keys

KeyUnitDescription
lcp_msmsLargest Contentful Paint
clsscoreCumulative Layout Shift
inp_msmsInteraction to Next Paint
fcp_msmsFirst Contentful Paint
tbt_msmsTotal Blocking Time
tti_msmsTime to Interactive
speed_index_msmsSpeed Index
ttfb_msmsTime to First Byte

lighthouse Command

Run Lighthouse audits directly from wavexis.

Basic Lighthouse audit

wavexis lighthouse https://example.com

Specific categories

wavexis lighthouse https://example.com \
    --categories performance,accessibility,best-practices,seo

Mobile form factor

wavexis lighthouse https://example.com \
    --form-factor mobile \
    --throttle

Lighthouse with output

wavexis lighthouse https://example.com \
    --output lighthouse-report.html \
    --format html

Output formats

# HTML report
wavexis lighthouse https://example.com --format html --output report.html

# JSON report
wavexis lighthouse https://example.com --format json --output report.json

# Both
wavexis lighthouse https://example.com --format html,json --output report

Lighthouse options

OptionTypeDefaultDescription
--categoriesstrallComma-separated categories
--form-factorstrmobilemobile or desktop
--throttleflagoffApply CPU/network throttling
--outputstrstdoutOutput file path
--formatstrhtmlhtml, json, or both
--budgetstrNonePerformance budget JSON

Report Generation

Combined performance report

wavexis perf metrics https://example.com --output metrics.json
wavexis cwv https://example.com --output cwv.json
wavexis lighthouse https://example.com --output lighthouse.html

Multi-action YAML for full audit

actions:
  - navigate:
      url: https://example.com
      wait_until: networkidle
  - cwv:
      budget:
        LCP_ms: 2500
        CLS: 0.1
        INP_ms: 200
  - lighthouse:
      categories:
        - performance
        - accessibility
      form_factor: mobile
  - perf:
      trace: true
      output: trace.json
  - screenshot:
      full_page: true

CI Integration

Performance gate in CI

# Run CWV with budget assertion
wavexis cwv https://staging.example.com \
    --budget ci-budget.json \
    --assert \
    --mobile \
    --throttle

# Exit code 0 = pass, 1 = fail
echo "Performance gate: $?"

GitHub Actions integration

- name: Performance audit
  run: |
    wavexis cwv https://staging.example.com \
        --budget ci-budget.json \
        --assert \
        --mobile \
        --throttle \
        --output cwv-results.json

- name: Upload results
  if: always()
  uses: actions/upload-artifact@v4
  with:
    name: perf-results
    path: cwv-results.json

Lighthouse CI gate

wavexis lighthouse https://staging.example.com \
    --categories performance \
    --form-factor mobile \
    --throttle \
    --budget lighthouse-budget.json \
    --assert

Budget for Lighthouse

{
  "performance": 80,
  "accessibility": 90,
  "best-practices": 85,
  "seo": 85
}

Interpreting Results

Core Web Vitals ratings

RatingColorMeaning
GoodGreenMeets Google thresholds
Needs ImprovementOrangeClose to thresholds, may affect UX
PoorRedFails thresholds, likely affects UX

Lighthouse scores

Score RangeRatingAction
90-100GoodMaintain
50-89Needs ImprovementOptimize
0-49PoorCritical — fix immediately

Common performance issues

SymptomLikely CauseMetric Affected
Slow first paintRender-blocking resourcesFCP, LCP
Large layout shiftsImages without dimensionsCLS
Slow interactionLong JavaScript tasksINP, TBT
Slow page loadLarge JS bundlesTTI, Speed Index
High unused JSUnoptimized bundlesJS Coverage
High unused CSSUnused stylesheetsCSS Coverage
Memory leaksGrowing heapHeap Snapshot

Best Practices

  • Use --mobile for CWV — Google ranks on mobile-first.
  • Use --throttle — simulate real-world network/CPU conditions.
  • Run multiple times — --repeats 5 gives stable averages.
  • Set budgets — define --budget JSON for CI gates.
  • Use --assert in CI — exit code 1 fails the build.
  • Save reports — --output for artifacts and trend analysis.
  • Test staging, not production — avoid skewing real-user data.
  • Check JS/CSS coverage — high unused % means optimization opportunity.
  • Monitor trends — compare results across builds.
  • Fix poor ratings first — they have the highest UX impact.

Common Pitfalls

  • No throttling — results look good but don't reflect real users.
  • Single run — CWV can vary; use --repeats for stability.
  • Testing localhost — network latency is zero; use --throttle.
  • Ignoring INP — INP replaced FID; it's now a Core Web Vital.
  • Budget too strict — set realistic budgets based on current performance.
  • Not saving results — without --output, results are lost.
  • Wrong form factor — mobile and desktop scores differ significantly.
  • Ignoring coverage — unused JS/CSS is a major performance bottleneck.

References

  • references/cwv-thresholds.md — Official Google CWV thresholds
  • references/perf-metrics-reference.md — Performance metrics reference
  • references/lighthouse-scoring.md — Lighthouse audit categories and scoring
  • assets/templates/perf-audit.yml — Performance audit YAML template
  • assets/templates/cwv-budget.json — CWV budget JSON template
  • assets/templates/ci-perf-gate.yml — CI performance gate template
  • wavexis on GitHub
  • Core Web Vitals
  • Lighthouse

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.