Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
By agent-sh
Rigorous performance investigation workflow with baselines, profiling, and evidence-backed decisions
npx claudepluginhub agent-sh/perf --plugin perfSynthesize perf findings into evidence-backed recommendations and decisions.
Map likely code paths for perf scenarios before profiling.
Append structured investigation notes with exact user quotes and rationale.
Coordinate /perf investigations across all phases, enforcing non-negotiable perf rules.
Generate top performance hypotheses after reviewing git history and current metrics.
Use when synthesizing perf findings into evidence-backed recommendations and decisions.
Use when managing perf baselines, consolidating results, or comparing versions. Ensures one baseline JSON per version.
Use when running performance benchmarks, establishing baselines, or validating regressions with sequential runs. Enforces 60s minimum runs (30s only for binary search) and no parallel benchmarks.
Use when mapping code paths, entrypoints, and likely hot files before profiling.
Use when appending structured perf investigation notes and evidence.
Uses power tools
Uses Bash, Write, or Edit tools
Share bugs, ideas, or general feedback.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Rigorous performance investigation workflow with baselines, profiling, and evidence-backed decisions
Use this agent for comprehensive performance testing, profiling, and optimization recommendations. This agent specializes in measuring speed, identifying bottlenecks, and providing actionable optimization strategies for applications. Examples:\n\n<example>\nContext: Application speed testing
Performance analysis, profiling, and optimization recommendations
Detect and resolve performance bottlenecks
CodSpeed plugin for Claude Code helping with performance measurement and optimization.
AI-powered performance optimization - Interactive performance audit skill and automated agent with comprehensive bottleneck detection and optimization
Deep repository analysis to realign project plans with actual code reality - discovers drift, gaps, and produces prioritized reconstruction plans
Master workflow orchestrator with autonomous task-to-production automation, quality gates, and multi-agent review
Plugin structure and tool use analyzer - validates plugin.json, MCP tools, and security patterns
AI slop cleanup with minimal diffs and behavior preservation
Multi-agent iterative code review until zero issues remain
Structured performance investigation with baselines, profiling, and evidence-backed decisions - run by AI agents inside your editor.
Performance work without structure leads to random micro-optimizations, unmeasured changes, and wasted time. /perf enforces a rigorous 10-phase methodology - derived from recorded real investigation sessions - that ensures every optimization is baselined, isolated, measured, and documented.
Use cases:
agentsys install perf
Requires agentsys to be set up in your project.
/perf --phase setup --scenario "API response time regression" --command "npm run bench" --version v1.2.0
This initializes an investigation, records the scenario, and prepares for baselining. The orchestrator walks you through each phase sequentially, checkpointing progress after every step.
To resume an in-progress investigation:
/perf --resume
Every investigation follows 10 phases in order. The orchestrator enforces strict rules: sequential benchmarks only, 60-second minimum run durations, one change per experiment, and checkpoint commits after each phase.
Setup - Confirm the scenario, success criteria, and benchmark command. The benchmark must emit metrics between PERF_METRICS_START / PERF_METRICS_END markers.
Baseline - Run the benchmark for 60+ seconds with a 10-second warmup. Results are stored as baselines/<version>.json. This is the reference point for all comparisons.
Breaking point - Binary search across a parameterized range to find the threshold where performance degrades. Uses 30-second runs (the only exception to the 60-second rule).
Constraints - Run the benchmark under CPU and memory limits (default: 1 CPU, 1GB RAM). Compare against the unconstrained baseline to identify resource sensitivity.
Hypotheses - Generate up to 5 hypotheses about the root cause, each backed by evidence from git history and code analysis. No guessing - every hypothesis needs a file path or commit reference.
Code paths - Use repo-intel to identify entry points, hot files, and call chains relevant to the scenario. Narrows the search space before profiling.
Profiling - Run language-specific profilers: --cpu-prof for Node.js, JFR for Java, cProfile for Python, pprof for Go. Capture file:line hotspots and flame graphs.
Optimization - Apply one change at a time. Validate with 2+ benchmark runs. Revert between experiments to keep the baseline clean.
Decision - Based on measured improvement, decide whether to continue optimizing or stop. The verdict and rationale are recorded in the investigation log.
Consolidation - Write the final baseline, close the evidence log, and mark the investigation complete.
/perf --phase setup --scenario "startup time" --command "node bench.js" --version v2.0.0
/perf --resume # continue where you left off
/perf --resume --phase profiling # jump to a specific phase
/perf --resume --phase baseline --runs 5 --aggregate median
/perf --resume --phase optimization --change "replaced O(n^2) loop with hash lookup"
/perf --resume --phase decision --verdict continue --rationale "20% improvement"
| Flag | Description |
|---|---|
--resume | Continue the active investigation |
--phase <name> | Target a specific phase |
--command <cmd> | Benchmark command (must emit PERF_METRICS markers) |
--version <ver> | Baseline version label |
--duration <sec> | Override benchmark duration (default 60s) |
--runs <n> | Number of runs for multi-run benchmarks |
--aggregate <method> | median, mean, min, or max (default median) |
--change <summary> | Description of the optimization being tested |
--verdict <v> | continue or stop |
State is persisted under {state-dir}/perf/: investigation.json (active state), investigations/<id>.md (evidence log), and baselines/<version>.json (metrics per version).