benchmark — Claude Code skill: measure project performance
This skill measures page, API, and build performance, then compares results before and after a change. Use it to check a release or investigate reports that a page feels slow.
npx skills add affaan-m/ECC --skill benchmark -a claude-codeWhat benchmark does
For pages, it collects Core Web Vitals, resource weight, and network request counts through browser MCP. For APIs, it measures p50, p95, and p99 latency, response size, and status codes. The build mode records build, HMR, test, TypeScript check, lint, and Docker build times.
Run /benchmark baseline to save current metrics, then /benchmark compare to compare them with new results. Baselines are stored as JSON in .ecc/benchmarks/ and tracked in Git. The description also suggests running comparisons in CI for each PR.
Install it when you need to measure the impact of a change or establish project baselines. Page measurements require browser MCP.
What it helps with
- measure Core Web Vitals and page weight
- compare API latency before and after a change
- find what slowed down builds or tests
- store performance baselines in Git
Example prompts for the agent
- Save the current project metrics with `/benchmark baseline`.
- Compare performance before and after my changes using `/benchmark compare`.
- Check Core Web Vitals and resource weight for the target pages.
How to install benchmark
1Skills CLI (Vercel)
npx skills add affaan-m/ECC --skill benchmark -a claude-code2Manually: put the files in place
~/.claude/skills/benchmark/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/benchmark/
1Skills CLI (Vercel)
npx skills add affaan-m/ECC --skill benchmark -a codex2Manually: put the files in place
.agents/skills/benchmark/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add affaan-m/ECC --skill benchmark -a cursor2Manually: put the files in place
.cursor/skills/benchmark/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install affaan-m/ECC benchmark2Manually: put the files in place
.github/skills/benchmark/SKILL.md1Skills CLI (Vercel)
npx skills add affaan-m/ECC --skill benchmark -a gemini-cli2Platform CLI
gemini skills install https://github.com/affaan-m/ECC --path skills/benchmarkManually: put the files in place
.devin/skills/benchmark/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add affaan-m/ECC --skill benchmark -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set146
The whole set →Similar
Questions about benchmark
How do I install benchmark in Claude Code?
Run npx skills add affaan-m/ECC --skill benchmark -a claude-code. The skill file is at ~/.claude/skills/benchmark/SKILL.md.
What does the benchmark skill do?
It measures page, API, and build performance, then compares results before and after changes. Baselines are saved as JSON in .ecc/benchmarks/.
Does benchmark need browser MCP?
The page performance mode uses browser MCP. The skill also has API and build measurement modes.
Source text
SKILL.md · MIT
--- name: benchmark description: Measure performance baselines and detect regressions across browser Core Web Vitals (LCP, INP, CLS, page weight), API endpoint latency percentiles, and build/test feedback times, with before/after comparison stored in git-tracked .ecc/benchmarks JSON. Use when checking page speed, responding to 'it feels slow' reports, verifying launch performance targets, or comparing stack alternatives. license: MIT 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 compare` on every PR - Pair with `/canary-watch` for post-deploy monitoring - Pair with `/browser-qa` for full pre-ship checklist
© affaan-m · MIT · affaan-m/ECC