Perf

From drn/dots · View interactive version

Perf is an AI agent skill from the GitHub repository drn/dots. Before/after performance benchmarking comparing current branch against base, with statistical analysis. Use for benchmarking, profiling, or measuring performance impact.

How to use this skill

Skill file

Performance Benchmark

Run a command multiple times on the current branch and the base branch, then compare with statistical analysis.

Arguments

Context

Your task

Run before/after benchmarks comparing the current branch against the base branch.

Step 1: Parse arguments and run the benchmark script

Extract the benchmark command and optional flags (--runs N, --base <ref>) from $ARGUMENTS.

IF no command is provided, ask: "What command should I benchmark?"

Resolve the script path — use the first that exists:

  1. ~/.claude/skills/perf/scripts/perf.sh (deployed via symlink)
  2. agents/skills/perf/scripts/perf.sh (repo-relative, for development/workspaces)
bash <script-path> "<command>" [--runs N] [--base <ref>]

Handle the exit code:

Step 2: Format the report

Parse the script's structured output and present it as:

## Benchmark Results

**Command:** `<command>`
**Runs:** <N> (+ 1 warmup)

### Timing

| Metric | Base (<ref>) | Current (<branch>) | Delta |
|--------|-------------|-------------------|-------|
| Min | <X>s | <Y>s | <diff> |
| Max | <X>s | <Y>s | <diff> |
| Mean | <X>s | <Y>s | <diff> |
| Median | <X>s | <Y>s | <diff> |
| Stddev | <X>s | <Y>s | — |

### Raw Data

**Base:** <comma-separated times>
**Current:** <comma-separated times>

### Verdict: <REGRESSION / IMPROVEMENT / NEUTRAL>

<1-2 sentence explanation>

If the script output includes a high-variance warning, append it after the verdict.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.