/perf-sentinel:perf-testsfrom Perf Sentinel
Writes performance integration tests for the current change and runs them under Perf Sentinel, so N+1 queries and other I/O waste show up before production. Start it only on /perf-sentinel:perf-tests or a yes to your proposal. When the user says a change is done or asks for a review and the diff adds database, HTTP, RPC or messaging calls, finish their request, then propose /perf-sentinel:perf-tests in one short question with the reason from the diff (for example a query issued once per item). Not for UI-only changes or load tests (k6, Gatling, JMeter).
Ships in Perf Sentinel. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
If the user did not type /perf-sentinel:perf-tests and did not say yes to your proposal, do not run this flow. Propose it in one line and stop.
Once started, Recon, Change scope and Business context only read. Every step that writes a file, edits the build, installs a tool, starts a container, runs tests or touches the CI asks first and waits for a clear yes. One yes covers the action it answered, not the next one.
If the permission system refuses a command, do not retry it in another form (an env prefix, a script, a wrapper). Show the exact command and ask the developer to run it or to allow it.
Your first message after the recon always ends with questions or scenarios to validate. Never write a test in that message, neither in a file nor as finished code in the reply.
Answer in the developer's language. The files you write follow the project's language.
$ARGUMENTS is free text that narrows the work: a ticket reference (PROJ-1234, bugfix PROJ-1234), a feature name, or nothing.
bugfix in the argument, or a ticket that describes an incident, means the bugfix questions and the Bugfix before/after step apply.<finding_type>:<service>:<endpoint>:<hash>) is a production finding to reproduce. Read each one with perf-sentinel hub findings --signature "<signature>" --format json (flags, sign-in and errors: ../prod-findings/references/hub.md). The row gives the finding and the endpoint, so do not ask for those again. It does not give the data conditions: keep asking for them unless the ticket or the diff does. An empty array or a 404 means the Hub does not know this signature: relay the Hub's detail if any, keep the signature for the summary and ask as usual. On a 401 or 403, tell the user to run perf-sentinel login --hub <url> themselves or to ask the Hub admin, and never run it for them. Without a signed-in CLI, keep the signature for the summary and ask as usual. Never print or read a Hub token.Read only. Report what you found in a few lines.
pom.xml, build.gradle(.kts), *.csproj, pyproject.toml, requirements*.txt, go.mod, package.json, Cargo.toml, Gemfile, composer.json. Load the matching stack reference..github/workflows/, .gitlab-ci.yml, Jenkinsfile, azure-pipelines.yml, .circleci/ and others. Note whether a Perf Sentinel step (perf-sentinel capture, perf-sentinel analyze) already runs. If the CI goes through an internal layer you cannot read (shared library, company template), say so..perf-sentinel.toml, .perf-sentinel-acknowledgments.toml.No integration tests at all. Say that the repository has no integration tests, so there is no style to copy. Do not present unit tests with mocks as an integration style. Propose the framework's idiomatic minimal harness by name (for example @SpringBootTest with a Testcontainers container of the production database engine, WebApplicationFactory for ASP.NET Core, pytest with TestClient for FastAPI), with a real database container if Docker is available. Ask before creating it.
Several services or stacks. When the repository holds several services and the change touches more than one, run the recon per service. Each service gets its own stack reference, its own scenario list and its own capture run. Never assume one stack for the whole repository. Write the reply as one section per service, in this shape:
### <service path> (<stack>)
- Entry points touched: ...
- Scenarios: ...
- Capture: its own `perf-sentinel capture` run around this service's test command
- Questions: ...
git merge-base, then git diff). If git is unavailable, say so and work from the files, the argument and the branch name, and ask the developer to confirm which files changed.Find answers yourself first: the ticket, the diff, the data model, the fixtures. If the perf-sentinel CLI is signed in to a Hub (perf-sentinel hub findings, see ../prod-findings/references/hub.md), read the production findings for the touched endpoints. Without it, the step works the same.
Then ask only what you could not find.
For a feature, the typical usage at production scale:
For a bugfix, what happened:
GET /clients/{id}/contracts, a client with 200 contracts of 15 lines each.references/perf-sentinel.md.Only when instrumentation is missing or incomplete. Ask before any change.
db.query.text or db.statement), the full URL of outbound calls, service.name on the resource, and http.route on server spans when possible.https://perf-sentinel.dev/docs/INSTRUMENTATION when it adds something.none, a forked test JVM that cannot write to stdout, several workers or a reloader, libraries that emit events instead of spans).Only after the scenarios are validated, and after a yes to create the files.
Ask before running anything.
Check the prerequisites: the perf-sentinel binary (perf-sentinel --version), Docker if the tests need it, the test command.
If the binary or image is there, check it is the latest release, as in Version check in references/perf-sentinel.md.
If the binary is missing, offer the three modes of Local run modes in references/perf-sentinel.md: binary on the PATH, binary in a folder of the developer's choice, or the Docker image when Docker is there. The developer picks. The commands below use the binary, adapt them to the chosen mode.
Run only the new tests: perf-sentinel capture --output <file> -- <filtered test command>. Write the capture file outside the build directory, since a clean step deletes it. With Docker, use the background form of Local run modes.
Then perf-sentinel analyze --input <file> from the repository root, so .perf-sentinel.toml is read when the project has one.
Check the traces before reading the findings. Run perf-sentinel analyze --input <file> --format json and read:
analysis.events_processed and analysis.traces_analyzed: both above zero, otherwise nothing usable was capturedusable_span_ratio and the filtered_missing_db_statement / filtered_missing_http_url counters, when present: spans dropped there lack the SQL text or the URL, so the instrumentation is incompleteIf the diff's queries are absent, the test is wrong even with zero findings. Say so and fix the test.
End the run by asking how the developer wants to read the results:
inspect in references/perf-sentinel.md), never run it yourself;report (report in references/perf-sentinel.md) and give the path of the file to open.If a local run is impossible, say why in one sentence and move on. The CI will do the check.
Only for a bugfix. Ask before creating the worktree.
Only when there are findings. Show the proposed fix and ask before applying it. Load references/fix-safety.md before proposing any fix.
perf-sentinel hub findings --service <service> --format json. Without it, the step works the same.references/fix-safety.md.references/perf-sentinel.md: signature, reason, reviewer to fill in, and always an expires_at date. An entry without a date is permanent.unmatched_acknowledgment entries the local run shows. They can be deleted.Only what Perf Sentinel already has. Load the CI reference that matches the detected CI. Ask before any change.
perf-sentinel capture. Never add a second step that runs the suite again.perf-sentinel analyze for SARIF and JSON and perf-sentinel report for HTML, archived with the build, on every branch.--config .perf-sentinel.toml. When recon found no such file, analyze exits 75 and the report step produces nothing. Either propose creating the file (preferred, min_usable_span_ratio needs it, and create it only after a yes) or drop --config from the snippets..perf-sentinel-acknowledgments.toml, versioned in the repo, is the register of unresolved findings: each entry has a reason, a reviewer and an expiration.analyze --ci on pull requests, not on the main branch, show the change it makes, and do not turn it on yourself. The gate judges every trace of the suite with no comparison to the base branch, so findings from existing tests are the team's to fix or acknowledge..perf-sentinel.toml or the defaults in references/perf-sentinel.md, and say which of the new tests would cross them if the code had a defect. Suggest min_usable_span_ratio so broken instrumentation fails the CI instead of passing green.https://perf-sentinel.dev/docs/CI and https://perf-sentinel.dev/docs/ACKNOWLEDGMENTS.End with a short summary:
Each stack and CI reference starts with a status line. A Status: tried end-to-end reference may add a Tried: / Not tried: line. The parts listed under Not tried count as untried. When the status reads Status: written from official docs, not yet tried, or for a part listed as not tried:
Local run even when the run looks green.references/perf-sentinel.md: load at Scenarios and CI wiring. Detectors and what makes each fire, gate defaults, CLI, exit codes, acknowledgment template, perf-sentinel.dev links.references/fix-safety.md: load at Fixes, before proposing any fix.references/stacks/java-spring-boot.md, java-quarkus.md, java-micronaut.md, dotnet.md, python.md, go.md, node.md, rust.md, ruby.md, php.md: load the one matching each service's stack at Recon, use it at Instrumentation, Writing the tests and Local run.references/ci/github-actions.md, gitlab-ci.md, jenkins.md, azure-devops.md, circleci.md: load the one matching the detected CI at CI wiring. references/ci/other.md for any other CI or an unreadable internal layer.LICENSES/Apache-2.0.txt (opens in a new tab)LICENSES/CC-BY-4.0.txt (opens in a new tab)NOTICE (opens in a new tab)references/ci/azure-devops.md (opens in a new tab)references/ci/circleci.md (opens in a new tab)references/ci/github-actions.md (opens in a new tab)references/ci/gitlab-ci.md (opens in a new tab)references/ci/jenkins.md (opens in a new tab)references/ci/other.md (opens in a new tab)references/fix-safety.md (opens in a new tab)references/perf-sentinel.md (opens in a new tab)references/stacks/dotnet.md (opens in a new tab)references/stacks/go.md (opens in a new tab)references/stacks/java-micronaut.md (opens in a new tab)references/stacks/java-quarkus.md (opens in a new tab)references/stacks/java-spring-boot.md (opens in a new tab)references/stacks/node.md (opens in a new tab)references/stacks/php.md (opens in a new tab)references/stacks/python.md (opens in a new tab)references/stacks/ruby.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub institut-du-numerique-responsable/perf-sentinel-claude --plugin perf-sentinel2 skills in this plugin