Workspace Performance Audit
Authorized Scope
Apply this engine only within the user's requested task and existing explicit
authorization. Loading or delegating to it grants no additional authority.
Preserve report-only restrictions and the caller's target, host, provider, and
cost limits. Existing approval satisfies a gate only for the same actions and
scope; obtain approval before expanding them. Forward these limits to delegates.
Contract
Inputs:
- Monorepo root path (defaults to current working directory)
- Optional: target domain(s) to focus on (frontend, backend, database, extension)
- Optional: audit mode (quick or full)
Outputs:
- Consolidated performance audit report
- Prioritized recommendations with severity ratings
Creates/Modifies:
.agents/memory/performance-audit-YYYY-MM-DD.md — writes the audit report
External Side Effects:
- None. Read-only analysis only; does not deploy, modify, or install anything.
Confirmation Required:
- Before writing the output report if the target path is outside the current workspace
Delegates To:
performance-expert for metrics and optimization
design-consistency-auditor for UI/UX consistency
qa-reviewer for validation and prioritization
Skills Orchestrated
| Skill |
Focus Area |
Phase |
performance-expert |
Performance metrics & optimization |
1-4 |
design-consistency-auditor |
UI/UX consistency & design debt |
1 |
accessibility |
WCAG 2.1 AA compliance |
1 |
security-expert |
Security validation |
2 |
qa-reviewer |
Validation & prioritization |
5 |
Orchestration Flow
Phase 0: Workspace Discovery
→ Identify apps, packages, tech stacks
Phase 1: Frontend Audit (Next.js)
→ Core Web Vitals, Bundle Analysis, Design, A11y
Phase 2: Backend Audit (NestJS)
→ API Response Times, N+1 Queries, Security
Phase 3: Database Audit (MongoDB)
→ Query Performance, Index Analysis
Phase 4: Extension & Packages
→ Bundle Sizes, Memory, Dependencies
Phase 5: Consolidation
→ Aggregate, Score, Prioritize, Report
Key Metrics by Domain
| Domain |
Key Metrics |
Targets |
| Frontend |
LCP, FID, CLS |
<2.5s, <100ms, <0.1 |
| Backend |
p50, p95 response |
<100ms, <200ms |
| Database |
Query p95, Index hit |
<50ms, >95% |
| Extension |
Content script size |
<50KB |
Usage Modes
Quick Audit: Essential checks only → 1-page summary
Full Audit: All phases → Complete report
Domain-Specific: Single domain focus
For detailed phase execution, metric collection commands, report templates, and example interactions: load ${CLAUDE_SKILL_DIR}/references/full-guide.md when starting a full audit or when a specific phase requires detailed guidance.
1---
2name: workspace-performance-audit
3description: Orchestrates comprehensive performance audits across full-stack monorepos. Coordinates performance-expert, design-consistency-auditor, accessibility, security-expert, and qa-reviewer skills to audit frontend, backend, database, browser extensions, and shared packages. Use when asked for a full workspace performance review, monorepo audit, or to identify bottlenecks across frontend, backend, and extensions.
4metadata:
5 version: "1.1.0"
6 tags: "performance, audit, monorepo"
7---
8
9# Workspace Performance Audit
10
11## Authorized Scope
12
13Apply this engine only within the user's requested task and existing explicit
14authorization. Loading or delegating to it grants no additional authority.
15Preserve report-only restrictions and the caller's target, host, provider, and
16cost limits. Existing approval satisfies a gate only for the same actions and
17scope; obtain approval before expanding them. Forward these limits to delegates.
18
19## Contract
20
21Inputs:
22
23- Monorepo root path (defaults to current working directory)
24- Optional: target domain(s) to focus on (frontend, backend, database, extension)
25- Optional: audit mode (quick or full)
26
27Outputs:
28
29- Consolidated performance audit report
30- Prioritized recommendations with severity ratings
31
32Creates/Modifies:
33
34- `.agents/memory/performance-audit-YYYY-MM-DD.md` — writes the audit report
35
36External Side Effects:
37
38- None. Read-only analysis only; does not deploy, modify, or install anything.
39
40Confirmation Required:
41
42- Before writing the output report if the target path is outside the current workspace
43
44Delegates To:
45
46- `performance-expert` for metrics and optimization
47- `design-consistency-auditor` for UI/UX consistency
48- `qa-reviewer` for validation and prioritization
49
50## Skills Orchestrated
51
52| Skill | Focus Area | Phase |
53|-------|------------|-------|
54| `performance-expert` | Performance metrics & optimization | 1-4 |
55| `design-consistency-auditor` | UI/UX consistency & design debt | 1 |
56| `accessibility` | WCAG 2.1 AA compliance | 1 |
57| `security-expert` | Security validation | 2 |
58| `qa-reviewer` | Validation & prioritization | 5 |
59
60## Orchestration Flow
61
62```
63Phase 0: Workspace Discovery
64 → Identify apps, packages, tech stacks
65
66Phase 1: Frontend Audit (Next.js)
67 → Core Web Vitals, Bundle Analysis, Design, A11y
68
69Phase 2: Backend Audit (NestJS)
70 → API Response Times, N+1 Queries, Security
71
72Phase 3: Database Audit (MongoDB)
73 → Query Performance, Index Analysis
74
75Phase 4: Extension & Packages
76 → Bundle Sizes, Memory, Dependencies
77
78Phase 5: Consolidation
79 → Aggregate, Score, Prioritize, Report
80```
81
82## Key Metrics by Domain
83
84| Domain | Key Metrics | Targets |
85|--------|-------------|---------|
86| Frontend | LCP, FID, CLS | <2.5s, <100ms, <0.1 |
87| Backend | p50, p95 response | <100ms, <200ms |
88| Database | Query p95, Index hit | <50ms, >95% |
89| Extension | Content script size | <50KB |
90
91## Usage Modes
92
93**Quick Audit:** Essential checks only → 1-page summary
94**Full Audit:** All phases → Complete report
95**Domain-Specific:** Single domain focus
96
97---
98
99**For detailed phase execution, metric collection commands, report templates, and example interactions:** load `${CLAUDE_SKILL_DIR}/references/full-guide.md` when starting a full audit or when a specific phase requires detailed guidance.