Agent skill
audit-performance
Audit performance against Core Web Vitals and performance budgets when the user asks to check performance, audit speed, or analyze web vitals
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/audit-performance
SKILL.md
Audit Performance
Overview
Generate a performance budget audit against Core Web Vitals (LCP, INP, CLS), bundle size, and API latency. Defines thresholds, identifies violations, and provides actionable recommendations for image optimization, code splitting, lazy loading, and caching improvements.
Workflow
-
Read engineering context -- Scan
.chalk/docs/engineering/for architecture docs, existing performance budgets, and infrastructure configuration. Check the codebase for build configuration (webpack, vite, next.config) and existing performance tooling. -
Parse the audit target -- Extract from
$ARGUMENTSthe page, feature, or endpoint to audit. If unspecified, audit the most critical user-facing page (typically the landing page or main dashboard). -
Determine the next file number -- Read filenames in
.chalk/docs/engineering/to find the highest numbered file. The next number ishighest + 1. -
Define performance budgets -- Set thresholds (use existing budgets from docs if available, otherwise use industry standards):
Metric Good Needs Improvement Poor LCP < 2.5s 2.5-4.0s > 4.0s INP < 200ms 200-500ms > 500ms CLS < 0.1 0.1-0.25 > 0.25 Bundle size (JS) < 200KB gzipped 200-350KB > 350KB API latency (p95) < 300ms 300-1000ms > 1000ms -
Analyze the codebase for performance issues -- Review:
- Bundle: large dependencies, tree-shaking gaps, missing code splitting
- Images: unoptimized formats, missing lazy loading, no responsive sizes
- Rendering: layout shifts from dynamic content, render-blocking resources
- Data fetching: waterfall requests, missing caching, over-fetching
- API: slow queries, missing indexes, N+1 problems
-
Report violations -- For each budget exceeded or at risk, document: current value (if measurable from code analysis), threshold, root cause, and recommended fix.
-
Prioritize recommendations -- Rank fixes by impact (how much improvement) and effort (how hard to implement). Quick wins first.
-
Write the file -- Save to
.chalk/docs/engineering/<n>_performance_audit.md. -
Confirm -- Share the file path and highlight the top 3 highest-impact fixes.
Output
- File:
.chalk/docs/engineering/<n>_performance_audit.md - Format: Plain markdown with budget table, violations list, and prioritized recommendations
- First line:
# Performance Audit: <Target>
Anti-patterns
- Auditing without budgets -- "The page is slow" is not actionable. Define thresholds first, then measure against them. Without budgets, there is no pass/fail.
- Only measuring lab data -- Lab metrics (Lighthouse) and field metrics (CrUX) can differ significantly. Note which measurements are lab-based and recommend field monitoring.
- Recommendations without priority -- A list of 20 optimizations without ranking overwhelms teams. Prioritize by impact-to-effort ratio and present quick wins first.
- Ignoring bundle composition -- "Bundle is too large" without identifying which dependencies contribute most is not helpful. Break down the bundle and identify the largest contributors.
- Missing API latency -- Frontend performance audits that ignore API response times miss half the picture. Include backend latency in the audit scope.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?