speedpatrol
/speedpatrol
Konfiguruje i uruchamia zespół agentów mierzących ścieżki krytyczne aplikacji przy każdym commicie i wykrywających regresje.
- Autor
- agent-labs-dev ↗
- Repozytorium
- speedpatrol ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 13.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 7
Brak sygnałów. Repozytorium zmienione 13.11.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
Co robi i kiedy
Konfiguruje i uruchamia zespół agentów mierzących ścieżki krytyczne aplikacji przy każdym commicie i wykrywających regresje.
Oryginalny opis (EN)
Set up and run Speedpatrol, a team of AI agents that measures an app's critical paths (API endpoints, app open, page loads, screen navigation, builds) on every commit, keeps a baseline dataset, catches and explains performance regressions, and proposes verified speed-ups. Use this skill when the user wants to add Speedpatrol to a repo, write or fix .speedpatrol/speedpatrol.yml, add benchmarks, compare a branch or worktree against main for performance, run the patrol, or read Speedpatrol's results.
Jak działa
- 1. What it does
- 2. Set it up
- 3. Use it
- 4. Read the results
- 5. CI
Podgląd SKILL.md
---
name: speedpatrol
description: Set up and run Speedpatrol, a team of AI agents that measures an app's critical paths (API endpoints, app open, page loads, screen navigation, builds) on every commit, keeps a baseline dataset, catches and explains performance regressions, and proposes verified speed-ups. Use this skill when the user wants to add Speedpatrol to a repo, write or fix .speedpatrol/speedpatrol.yml, add benchmarks, compare a branch or worktree against main for performance, run the patrol, or read Speedpatrol's results.
---
# Speedpatrol
Speedpatrol measures the critical paths of an app and tells you, with statistics, what got slower or faster. The CLI is the npm package `speedpatrol`. Run it with `npx speedpatrol@latest <command>`; if the repo lists `speedpatrol` in `package.json`, use `npx speedpatrol <command>`.
Source and full docs: https://github.com/agent-labs-dev/speedpatrol
## 1. What it does
- The **scout** (an agent) finds critical paths and writes benchmarks to `.speedpatrol/benchmarks.json`, each one tried before it is saved.
- The **runner** (code) brings the app up with `app.setup`, measures every benchmark, and records a **baseline** per commit and machine.
- **Statistics** decide every verdict (Mann-Whitney U + bootstrap interval + thresholds). A suspected regression on main is re-measured A/B before it is recorded.
- The **analyst** explains a confirmed regression. The **optimizer** (off by default) tries a speed-up in a worktree, kept only when an A/B run proves it.
- `speedpatrol compare` A/B-measures two checkouts: a branch, a worktree, or the working tree against `origin/main`.
All files live in `.speedpatrol/`: `speedpatrol.yml`, `instructions.md` and `benchmarks.json` are committed; `runs/` is local data (git-ignored).
## 2. Set it up
Ask the user only for what you cannot find in the repo.
### 2.1 Two facts you must have
1. **How to start the app on this machine** (and how to install and build it).
2. **How to reach the critical paths**: the base URL, a test account or token if endpoints need auth, the CDP port for Electron, the bundle id or activity for mobile.
Read `package.json` scripts, the README, `docker-compose.yml`, `.env.example`, the router or route files, and existing E2E tests. Then prove the start command works yourself:
- Server or web app: start it, then `curl -sf <url> >/dev/null && echo up`, then stop it.
- Electron: start it with `--remote-debugging-port=<port>`, then `curl -sf http://127.0.0.1:<port>/json/version`.
- Android: `adb shell pm list packages | grep <package>`. iOS: `xcrun simctl listapps booted | grep <bundle id>`.
Do not continue until both facts are proven. If one is missing, stop and tell the user what you tried and what you need.
### 2.2 Write the config
```bash
npx speedpatrol@latest init --agent claude # or codex, opencode
```
Edit `.speedpatrol/speedpatrol.yml`:
- `app.prepare`: install and build, once per checkout (e.g. `pnpm install --frozen-lockfile && pnpm build`). Never timed.
- `app.setup`: start the app as a `background: true` command with `readyUrl` or `readyWhen`. Use `${SPEEDPATROL_SOURCE}` only if a command must name the checkout explicitly; commands already run in it.
- `app.env` for values like `BASE_URL`; `app.secrets` for env var names whose values must never reach a log or a model. Never write a secret value in the config.
- Production build over dev server when you can: dev servers recompile and skew timings.
Write `.speedpatrol/instructions.md`: what the app is, which paths users wait for most, how to sign in, what must never be benchmarked (destructive writes, real payments, emails to real people).
### 2.3 Benchmarks
Either run the scout:
```bash
npx speedpatrol@latest scout
```
or write them yourself in `benchmarks:` (see https://github.com/agent-labs-dev/speedpatrol/blob/main/docs/configuration.md). Aim for 5 to 15, and mark the few most important ones `critical: true`. Kinds: `http`, `web` (page load + `steps` for screen navigation), `electron`, `startup`, `command`, `android`, `ios`, `maestro`, `custom`.
### 2.4 Prove it
```bash
npx speedpatrol@latest doctor
npx speedpatrol@latest run --iterations 5
```
Every benchmark must show a median and no errors. Fix the config until it does. Then show the user the table.
## 3. Use it
- `npx speedpatrol@latest run`: measure this checkout and record its baseline (clean tree only).
- `npx speedpatrol@latest compare`: working tree vs `origin/main`, A/B. `--head <dir|ref>`, `--base <ref>`, `--pr <number|url>` (a GitHub PR vs its base branch, needs `gh`), benchmark ids or tags as arguments. Exit 1 = regression.
- `npx speedpatrol@latest`: the patrol, all day, on a dedicated machine or VM. `--once` for one cycle. Before you set one up, read https://github.com/agent-labs-dev/speedpatrol/blob/main/docs/running-a-patrol.md (scheduling, test accounts, agent time limits, GitHub). When something fails, read https://github.com/agent-labs-dev/speedpatrol/blob/main/docs/troubleshooting.md.
- `npx speedpatrol@latest dashboard`: http://127.0.0.1:4321.
- `npx speedpatrol@latest regressions`, `analyze`, `optimize <benchmark>`, `publish --dry-run`.
When you change code for performance, verify with `compare` before claiming a speed-up, and quote its table: the verdict, the change and the interval. `noisy` means measure more (`--rounds 4`), not "faster".
## 4. Read the results
- A comparison row: verdict, base and head median, change, 95% interval, p. Only `regression` and `improvement` are findings.
- `.speedpatrol/runs/regressions/*.json`: confirmed regressions with the analyst's explanation and suspects.
- `.speedpatrol/runs/experiments/*.json`: optimizer attempts; `improved` ones have a branch ready for a PR.
- A timed-out, budget-exhausted, or incomplete agent session is a failure, not a benchmark verdict. `scout`, `analyze`, `optimize`, and a failed `--once` cycle exit 4; completed measurements remain saved. A failed optimizer session is never committed or verified. Completed attempts with no proven speed-up are normal rejections (exit 0).
- `.speedpatrol/runs/profiles/<run>/<benchmark>.cpuprofile`: open in Chrome DevTools or speedscope; the hotspots are in the run JSON.
Use `use: codex` to inherit the MCP tool timeout from the role's `timeoutMinutes`. A custom Codex command must include `-c mcp_servers.speedpatrol.tool_timeout_sec={timeoutSeconds}`. Size the session limit for edits, tests, and all A/B calls; shutdown drains an in-flight measurement before cleanup.
For optimizer timeouts, inspect the primary metric and the session's `measure_change` durations before raising the limit. `get_target` supplies improvement requirements and remaining working time. Trials prepare each side once and run one A/B round without profiling; the result reports duration and remaining time. Keep the machine idle during a measurement. Finish a promising candidate after its required checks so Speedpatrol can run the separate full verification outside the session limit. Revert unsuccessful edits and finish without a candidate when another trial cannot fit. Never salvage an incomplete session or weaken the measurement thresholds to publish a change.
## 5. CI
Add `.github/workflows/speedpatrol.yml` with `agent-labs-dev/speedpatrol@v0` (checkout with `fetch-depth: 0`) to post an A/B table on every pull request. See https://github.com/agent-labs-dev/speedpatrol/blob/main/docs/ci.md.
Wersje
W bazie nie ma innych skilli o nazwie speedpatrol.
Migawka bazy z 13.11.2026 · wersja paczki acd774514457 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100detecting-performance-regressions
Automatycznie wykrywa regresje wydajności w potokach CI/CD, porównując metryki z wartościami bazowymi. - 100detecting-performance-regressions
Automatycznie wykrywa regresje wydajności w potokach CI/CD, porównując metryki z wartościami bazowymi. - 100faster-ci
Przyspiesza i tanieje GitHub Actions: mierzy bazę z ostatnich przebiegów, znajduje ścieżkę krytyczną i stosuje wybrane poprawki, każdą w osobnym commicie. - 100running-smoke-tests
Uruchamia smoke testy po wdrożeniu, aby szybko zwalidować, że krytyczne ścieżki aplikacji działają. - 90sloppatrol
Konfiguruje i uruchamia zespół agentów, który porządkuje kod małymi refaktoryzacjami zweryfikowanymi testami repozytorium.