---
name: perf-audit
description: >
  Entry-point slash command for the Performance Auditor plugin. Routes to the
  appropriate skill(s) based on the scope argument. Without a scope, runs a quick
  CWV audit. With --full, invokes all skills in sequence via the perf-reviewer agent.
---

# /perf-audit — Performance Audit Entry Point

Quick entry point for performance auditing. Routes to the right skill based on the
scope you provide.

## Usage

```
/perf-audit <URL> [--scope cwv|render-blocking|assets|caching|budget|backlog|full]
            [--platform sitecore|optimizely|umbraco|headless]
            [--device mobile|desktop|both]
            [--format ado|jira|markdown]
```

## Routing

| Scope flag | Invokes | Description |
|---|---|---|
| (none) or `--scope cwv` | `perf-cwv-audit` | Lighthouse + Core Web Vitals audit |
| `--scope render-blocking` | `perf-render-blocking-analysis` | CSS/JS/font critical path analysis |
| `--scope assets` | `perf-asset-optimisation` | Image/video/font delivery review |
| `--scope caching` | `perf-caching-review` | Cache-header and CDN audit |
| `--scope budget` | `perf-budget-enforcement` | Generate CI budget config files |
| `--scope backlog` | `perf-backlog-builder` | Convert an audit report to sprint stories |
| `--scope full` | `perf-reviewer` agent | All skills in sequence, consolidated report |

## Examples

```bash
# Quick CWV baseline
/perf-audit https://staging.client.com

# Full audit with platform context
/perf-audit https://staging.client.com --scope full --platform sitecore

# Caching-only audit for production
/perf-audit https://www.client.com --scope caching --platform optimizely

# Turn yesterday's audit into ADO stories
/perf-audit ./cwv-report.md --scope backlog --format ado --sprints 2

# Wire up CI performance budget
/perf-audit . --scope budget --ci github
```

## Scope selection guide

- **New project / first audit:** use `--scope full` to get the complete picture
- **After a specific change (e.g. image refactor):** use `--scope assets`
- **After a CDN config change:** use `--scope caching`
- **Sprint planning:** use `--scope backlog` against an existing audit report
- **Setting up a new project's CI:** use `--scope budget`
