
Performance Engineer
Profile slow APIs or pages, compare against documented latency and web vitals targets, and produce optimization checklists and reports.
Overview
Performance Engineer is an agent skill most often used in Ship (also Operate monitoring) that guides profiling, optimization, and regression-aware performance analysis.
Install
npx skills add https://github.com/charon-fan/agent-playbook --skill performance-engineerWhat is this skill?
- Documented targets: API p50 under 100ms, p95 under 500ms, DB queries under 50ms, FMP under 2s, TTI under 3s
- Performance checklist: baseline metrics, bottlenecks, verified benchmarks, regression tests
- Python scripts profile.py and perf_report.py for profiling and report generation
- Optimization levers: cache hot paths, reduce N+1, minimize payloads, batch network calls
- 5 documented SLO targets (API p50/p95, DB query, FMP, TTI)
- 4-item performance checklist
- 2 helper scripts: profile.py and perf_report.py
Adoption & trust: 563 installs on skills.sh; 58 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your app misses response or page-load expectations and you lack a baseline, bottleneck list, or verified benchmark after changes.
Who is it for?
Solo builders shipping APIs or web apps who want agent-led profiling aligned to p50/p95 and Core Web Vitals-style targets.
Skip if: Teams needing dedicated APM vendor setup only, with no appetite for script-based profiling or checklist-driven iteration.
When should I use this skill?
When you ask to optimize code, explain slowness, or profile an application using performance-engineer triggers.
What do I get? / Deliverables
You record baselines, apply prioritized optimizations against stated SLOs, and leave regression tests or monitoring hooks so slowdowns are caught early.
- Performance report from perf_report.py
- Documented baseline and bottleneck notes
- Checklist completion including regression tests
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Performance work belongs on the shipping gate when latency and load targets must pass before users see the product. Perf subphase covers benchmarking, bottleneck fixes, and regression guardrails called out in the skill’s checklist and monitoring sections.
Where it fits
Tune a user endpoint before launch until p95 stays under 500ms with DB queries under 50ms.
Add regression tests after a cache fix so CI catches throughput drops.
Configure alerts on latency percentiles when production traffic spikes.
Relate slow FMP to drop-off and prioritize payload and batching fixes.
How it compares
Structured performance playbook with SLO table and scripts, not a one-off “make it faster” prompt without measurement.
Common Questions / FAQ
Who is performance-engineer for?
Indie developers on agent-playbook who optimize backends and frontends and want percentiles, DB latency, and FMP/TTI goals in one skill.
When should I use performance-engineer?
In Ship perf before release, during Grow when traffic exposes bottlenecks, and in Operate monitoring when latency or error-rate alerts regress.
Is performance-engineer safe to install?
Profiling scripts may execute local Python and read app code; review the Security Audits panel on this page before running profile.py in sensitive environments.
SKILL.md
READMESKILL.md - Performance Engineer
# Performance Engineer > A Claude Code skill for performance optimization and analysis. ## Installation This skill is part of the [agent-playbook](../../README.md) collection. ## Usage ``` You: Optimize this code You: Why is this slow? You: Profile this application ``` ## Performance Targets | Metric | Target | |--------|--------| | API Response (p50) | < 100ms | | API Response (p95) | < 500ms | | Database Query | < 50ms | | Page Load (FMP) | < 2s | | Time to Interactive | < 3s | ## Scripts Profile application: ```bash python scripts/profile.py ``` Generate performance report: ```bash python scripts/perf_report.py ``` ## Resources - [Web.dev Performance](https://web.dev/performance/) - [Google Performance](https://developer.chrome.com/docs/lighthouse/performance/) # Performance Checklist - [ ] Baseline metrics recorded - [ ] Bottlenecks identified - [ ] Fixes verified with benchmarks - [ ] Regression tests added # Performance Monitoring - Track latency percentiles - Monitor throughput and error rates - Set alerts on regressions # Performance Optimization Guide ## Common Levers - Cache hot paths - Reduce N+1 queries - Minimize payload size - Batch network calls #!/usr/bin/env python3 # Template generator for performance report. from pathlib import Path import argparse import textwrap def write_output(path: Path, content: str, force: bool) -> bool: if path.exists() and not force: print(f"{path} already exists (use --force to overwrite)") return False path.parent.mkdir(parents=True, exist_ok=True) path.write_text(content, encoding="utf-8") return True def main() -> int: parser = argparse.ArgumentParser(description="Generate a performance report.") parser.add_argument("--output", default="perf-report.md", help="Output file path") parser.add_argument("--name", default="example", help="System or endpoint name") parser.add_argument("--owner", default="team", help="Owning team") parser.add_argument("--force", action="store_true", help="Overwrite existing file") args = parser.parse_args() content = textwrap.dedent( f"""\ # Performance Report ## Summary {args.name} ## Ownership - Owner: {args.owner} ## Baseline Metrics - p50 latency: - p95 latency: - error rate: - throughput: ## Findings - Top bottlenecks - Resource saturation ## Recommendations - Short-term fixes - Long-term optimizations ## Validation - Benchmark commands - Regression checks """ ).strip() + "\n" output = Path(args.output) if not write_output(output, content, args.force): return 1 print(f"Wrote {output}") return 0 if __name__ == "__main__": raise SystemExit(main()) #!/usr/bin/env python3 # Template generator for performance profile. from pathlib import Path import argparse import textwrap def write_output(path: Path, content: str, force: bool) -> bool: if path.exists() and not force: print(f"{path} already exists (use --force to overwrite)") return False path.parent.mkdir(parents=True, exist_ok=True) path.write_text(content, encoding="utf-8") return True def main() -> int: parser = argparse.ArgumentParser(description="Generate a performance profile.") parser.add_argument("--output", default="perf-profile.txt", help="Output file path") parser.add_argument("--name", default="example", help="Scenario name") parser.add_argument("--tool", default="perf", help="Profiling tool") parser.add_argument("--command", default="run-benchmark.sh", help="Command profiled") parser.add_argument("--duration", default="60s", help="Profile duration") parser.add_argument("--force", action="store_true", help="Overwrite existing file") args = parser.parse_args() content = textwrap.dedent( f"""\ Profile: {args.n