Analyze session performance — duration, phase breakdown, token usage, bottlenecks, efficiency trends, and concrete improvement suggestions. Use for "/perf-analysis", "performance analysis", "Performance-Analyse", "warum ist das so langsam", "wie lange dauert ein Testlauf", "Token-Verbrauch analysieren", "Performance verbessern", "Kosten optimieren". Not for test quality metrics (/qa-report) or skill usage (/skill-review).
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Perf Analysis?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/sn4kygit-perf-analysis)
---
name: perf-analysis
description: Analyze session performance — duration, phase breakdown, token usage, bottlenecks, efficiency trends, and concrete improvement suggestions. Use for "/perf-analysis", "performance analysis", "Performance-Analyse", "warum ist das so langsam", "wie lange dauert ein Testlauf", "Token-Verbrauch analysieren", "Performance verbessern", "Kosten optimieren". Not for test quality metrics (/qa-report) or skill usage (/skill-review).
license: Apache-2.0
---
# /perf-analysis — how long does it take, what does it cost, and what should change
The blueprint writes timing and usage data for every run — and never reads it
back. This turns that data into the numbers that answer "why is this slow?"
and "what should we fix?" — with concrete, actionable suggestions.
## Steps
1. Run the analysis:
```bash
python3 .claude/skills/perf-analysis/perf-analysis.py --since 30 --suggest
# --project SHOP one project only
# --ticket SHOP-123 one specific run
# --json machine-readable output
```
2. Read the report. The summary table shows where you stand against targets;
the phase breakdown shows where time goes; the suggestions section names
bottlenecks with specific fixes.
3. Interpret against the project's gates (`PROJECT.md` → "Pipelines / quality
gates") — if the project declares tighter targets, those win.
4. Turn red/yellow items into actions. Each suggestion maps to a concrete
skill or workflow change (see `references/improvement-patterns.md` for
the full pattern library).
5. **Audit numeric provenance before reporting.** Every reported measurement
must map to supplied source values, a formula, and its coverage (`n/N`).
Field presence, log-entry counts, targets, thresholds, and example report
rows are not measurements. If source values or a required denominator are
absent, report `not computable`; never simulate script output or fill a
table with plausible values. Remove any numeric claim that cannot pass this
audit.
6. Report the findings. For a team: use `report-to-jira` or the project's
reporting format. For a quick look: just print the report.
## What this skill never does
- **Never estimates** — if a metric can't be computed from the data, it says
"not computable" rather than guessing.
- **Never mutates** — this is read-only. It doesn't change configs, tests, or
project files. Improvement suggestions are proposals, not automatic fixes.
- **Never duplicates `/qa-report` numbers** — pass rate, flake rate, and
findings belong to qa-report. This skill focuses on *time and cost*.
- **Never reads transcripts** — token usage and model affinity come from
`session-perf.log` (Stop-hook-extracted metadata), never content.
## Data sources
| Source | What it provides |
|---|---|
| `execution_summary.json` | verdict, duration_s, phases, session, test_cases |
| `run.json` | duration_s, result counts |
| `evidence/.audit/session-perf.log` | token usage per session + measured model affinity (`model=`, `model_switches=`) |
| `evidence/.audit/compression.log` | measured compression bytes per seal (run, mode, original/compressed) |
| `evals/results/history.log` | pass-rate trend |
Fields not yet in older summaries are simply absent — the analysis reports
what's available and notes what's missing.
## Command surface
`/perf-analysis [--since DAYS] [--project KEY] [--ticket KEY]`