benchmark
affaan-m/everything-claude-code
Measure performance baselines, detect regressions, and compare stack alternatives before/after changes.
What is benchmark?
Benchmark measures real browser metrics, API latency, and build performance to establish baselines and detect regressions. Use it before/after PRs, when setting performance targets, or when investigating slowness reports.
- Measure Core Web Vitals (LCP, CLS, INP, FCP, TTFB) and resource sizes via real browser metrics
- Benchmark API endpoints with p50/p95/p99 latency under load and concurrent request testing
- Profile build performance including cold builds, hot reload time, test suite duration, and TypeScript checks
- Compare before/after metrics with delta calculations and regression warnings
- Store baselines in Git-tracked JSON for team-wide performance tracking
How to install benchmark
npx skills add https://github.com/affaan-m/everything-claude-code --skill benchmarkHow to use benchmark
- 1.Run `/benchmark baseline` to capture current performance metrics and save as baseline
- 2.Make your changes (code updates, dependency upgrades, etc.)
- 3.Run `/benchmark compare` to measure impact and see before/after deltas with warnings
- 4.Review the output table showing metrics, deltas, and verdicts
- 5.Integrate into CI by running `/benchmark compare` on every PR to catch regressions early
Use cases
- Measure performance impact of a PR before and after merging
- Establish and monitor performance baselines for a project launch
- Investigate user reports of slowness by comparing current metrics against known baselines
- Compare performance of different tech stacks or architectural approaches
- Detect regressions in CI by running baseline comparisons on every PR
- Backend engineers optimizing API performance
- Frontend engineers tracking Core Web Vitals and bundle size
- DevOps engineers monitoring build times and CI feedback loops
- Tech leads establishing performance targets before launch
- Teams doing pre-ship performance validation
benchmark FAQ
Core Web Vitals targets: LCP < 2.5s, CLS < 0.1, INP < 200ms, FCP < 1.8s, TTFB < 800ms. Bundle targets: total page < 1MB, JS < 200KB gzipped. API benchmarks measure p50/p95/p99 latency under 10 concurrent requests.
Baselines are stored in `.ecc/benchmarks/` as JSON files and are Git-tracked so your team shares the same performance targets.
Yes. Run `/benchmark compare` on every PR to automatically detect performance regressions before merge.
API mode hits each endpoint 100 times and measures p50, p95, p99 latency, response size, status codes, and performance under 10 concurrent requests.
Run `/benchmark baseline` to save current metrics, make your changes, then run `/benchmark compare` to see deltas and regression warnings in a table format.
Full instructions (SKILL.md)
Source of truth, from affaan-m/everything-claude-code.
name: benchmark description: Use this skill to measure performance baselines, detect regressions before/after PRs, and compare stack alternatives. metadata: origin: ECC
Benchmark — Performance Baseline & Regression Detection
When to Use
- Before and after a PR to measure performance impact
- Setting up performance baselines for a project
- When users report "it feels slow"
- Before a launch — ensure you meet performance targets
- Comparing your stack against alternatives
How It Works
Mode 1: Page Performance
Measures real browser metrics via browser MCP:
1. Navigate to each target URL
2. Measure Core Web Vitals:
- LCP (Largest Contentful Paint) — target < 2.5s
- CLS (Cumulative Layout Shift) — target < 0.1
- INP (Interaction to Next Paint) — target < 200ms
- FCP (First Contentful Paint) — target < 1.8s
- TTFB (Time to First Byte) — target < 800ms
3. Measure resource sizes:
- Total page weight (target < 1MB)
- JS bundle size (target < 200KB gzipped)
- CSS size
- Image weight
- Third-party script weight
4. Count network requests
5. Check for render-blocking resources
Mode 2: API Performance
Benchmarks API endpoints:
1. Hit each endpoint 100 times
2. Measure: p50, p95, p99 latency
3. Track: response size, status codes
4. Test under load: 10 concurrent requests
5. Compare against SLA targets
Mode 3: Build Performance
Measures development feedback loop:
1. Cold build time
2. Hot reload time (HMR)
3. Test suite duration
4. TypeScript check time
5. Lint time
6. Docker build time
Mode 4: Before/After Comparison
Run before and after a change to measure impact:
/benchmark baseline # saves current metrics
# ... make changes ...
/benchmark compare # compares against baseline
Output:
| Metric | Before | After | Delta | Verdict |
|--------|--------|-------|-------|---------|
| LCP | 1.2s | 1.4s | +200ms | WARNING: WARN |
| Bundle | 180KB | 175KB | -5KB | ✓ BETTER |
| Build | 12s | 14s | +2s | WARNING: WARN |
Output
Stores baselines in .ecc/benchmarks/ as JSON. Git-tracked so the team shares baselines.
Integration
- CI: run
/benchmark compareon every PR - Pair with
/canary-watchfor post-deploy monitoring - Pair with
/browser-qafor full pre-ship checklist
Related skills
More from affaan-m/everything-claude-code and the wider catalog.
security-review
Security checklist and patterns for authentication, input validation, secrets, and sensitive features.
golang-patterns
Idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable applications.
coding-standards
Baseline coding conventions for naming, readability, immutability, and quality across projects.
frontend-patterns
React and Next.js patterns for components, state management, performance, and modern frontend practices.
backend-patterns
REST/GraphQL API design, database optimization, and server-side patterns for Node.js, Express, and Next.js.
golang-testing
Go testing patterns: table-driven tests, subtests, benchmarks, fuzzing, and TDD methodology.