/perf-sentinel:prod-findingsfrom Perf Sentinel
Reads production findings from Perf Sentinel Hub, ranks them by the I/O waste they cause and helps fix them in small batches, each proved by a non-regression test. Start it only on /perf-sentinel:prod-findings or a yes to your proposal. Never propose it after a feature or a bugfix, that is /perf-sentinel:perf-tests.
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; scripts run unread.
If the user did not type /perf-sentinel:prod-findings and did not say yes to your proposal, do not run this flow. Never propose it after a feature, a bugfix or a review: that is /perf-sentinel:perf-tests.
Once started, Connection, Scope, Ranking and Presentation only read. The page files of Ranking go to a fresh temporary directory outside the repository, the only write that needs no yes. Everything else that writes (code, branch, commit, push, pull request, perf-sentinel hub ack, an acknowledgment TOML entry) 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 user to run it or to allow it. A refusal covers that command only: keep running the other steps, the ranking script included.
Never print, store or echo a Hub token. Never read the CLI's token file, never put a token on a command line, never show PERF_SENTINEL_HUB_TOKEN. The CLI finds the credential by itself.
Never invent a finding, a figure or a volume. Every number you give comes from the ranking script's output.
Answer in the user's language. The files you write follow the project's language.
$ARGUMENTS is free text that narrows the work: a service, a finding type, an environment, a Hub URL, a file, "rank only", or nothing.
.json file (relative to the repository root or absolute, found with Glob or Read, not a shell command) means: rank that file. Skip Connection and the Hub calls of Scope and Ranking, run the ranking script on the file as given, and say in one line that the volumes are the ones of the export.Presentation. Nothing is fixed, nothing is acknowledged.Scope. A Hub URL goes to --hub.Scope, still in whole UTC days. A window that reaches today gives lower bounds (open_day): say so.Read only. Load references/hub.md first.
perf-sentinel --version.
../perf-tests/references/perf-sentinel.md (Install, from this skill's base directory). Ask before installing anything.--from, --to, --offset and --include-acked, so there is no window and no paging. Continue in degraded mode (see Ranking) and suggest upgrading.Version check of ../perf-tests/references/perf-sentinel.md.perf-sentinel hub findings --environment <env> --limit 1 --format json, with the environment of Scope (production unless $ARGUMENTS names another one), and --hub <URL> when the user gave one.
400: this Hub knows no source with that environment, or none the account can see. The match is exact and case-sensitive. Say so, and offer one read without --environment (perf-sentinel hub findings --limit 50 --format json) to show the environment names the Hub has: from it, list only the distinct sources[].environment values, no finding. Then ask which environment to use, and probe again with it.401, or a 3xx asking for a browser session: the terminal is not signed in. Tell the user to run perf-sentinel login --hub <url> themselves (it prints a code to approve in a browser signed in to the Hub), and wait until they say it is done. Never run login yourself.Hub:Auth:TrustedProxyNetworks).403: the account has no access to this project in the Hub. Say to ask the Hub admin, once, without insisting.perf-sentinel login --hub <url>, ask the Hub admin for access, or hand over an export (perf-sentinel hub findings --format json ... > findings.json, made by someone with access) to rank. Then stop. List no finding.Read only.
production, unless $ARGUMENTS names another one.active.Recon of perf-tests (OpenTelemetry service.name in the config, the code or the deployment manifests). If none is found, or the user wants a ranking across services, ask which ones.--from is <today minus 7 days>T00:00:00Z, --to is <yesterday>T23:59:59Z, both RFC 3339 UTC (on 2026-10-28: --from 2026-10-21T00:00:00Z --to 2026-10-27T23:59:59Z). The Hub counts whole days up to the day of --to, and the current day is never complete, so it stays out. The window also selects the rows: a finding first seen today is not listed. When the user expects a very recent one, say so and offer the window including today.--include-acked true, so the script can exclude a finding only when every source carrying it has acknowledged it, and count the ones it left out.Rank nothing by hand. The script does it.
mktemp -d, outside the repository. Every page goes there. On Windows, Claude Code treats the temporary directory as outside the session, so the first page write asks for approval: say so before it, and say the user can add the directory to the session to avoid the next ones.last_seen, not by impact. Save each page straight to a file, in exactly this form:
perf-sentinel hub findings --environment <env> --status active --service <service> --from <from> --to <to> --include-acked true --limit 1000 --offset <N> --format json > <dir>/page-<service>-<N>.json
Never print a page into the conversation, never cat or Read one: the ranking script reads them. Start at --offset 0 and add the --limit you sent each time.python3 ${CLAUDE_SKILL_DIR}/scripts/rank.py <dir>/page-*.json as a command of its own: no cd, no && or ; with another command, or the permission system refuses it. When python3 is missing, or on Windows answers "Python was not found" (the Microsoft Store alias, exit 49), run the same command with python, then py -3. Its inputs lists each file it read with its rows. When the entry of the page you just saved holds fewer rows than the --limit you sent, that service is done. The run after the last page of the last service is the ranking.mktemp -d directory.400 on a page: the environment passed the probe of Connection and the window is never inverted, so the --limit is above the Hub's Hub:MaxReadLimit. Page every service again once, from --offset 0 in a fresh directory, with --limit 100. A second 400 ends the ranking: report it, and ask for the Hub's Hub:MaxReadLimit (references/hub.md, Errors).duplicates_dropped is above zero, a Hub poll landed between two pages and a row slid across them: say that a finding may have been missed, and offer one re-read of all the pages in a fresh directory.Arguments, run the same command on that file alone.inputs, window, excluded_acked, duplicates_dropped and groups, the groups in this order, each sorted:
avoidable_io (n_plus_one_*, redundant_*): by avoidable I/O over the window, extrapolated when sampled. A finding with unknown volume ranks after the known ones, by its per-trace extra I/O.slow (slow_*): lock risks first, then by severity, then by detections.structural (fanout, chatty, pool saturation, serialized calls): by severity.other: any type the script does not know, by severity. Never drop it.Presentation) moves to the top of slow.window is null while groups hold findings, after a read with --from and --to. The Hub is older than 0.8.6: keep the ranking of the pages already read, say Hub 0.8.6 is missing and that every volume is unknown.Connection, or --from refused as an unknown flag) cannot page or window: read once per service with --limit 1000 and no window, saved to a file as above, rank it with the same script, say CLI 0.37.0 is missing and that every volume is unknown. If a page holds as many rows as the --limit, say the list may be truncated.One line per finding, in rank order, for a developer, an architect or an SRE who knows what Perf Sentinel is for without knowing its details.
window, from the item's state. Give the window as window.from to window.to, the dates exactly as the output prints them, never shifted or converted.
exact: the figure as is ("48 200 avoidable I/O operations, exact").lower_bound: "at least" the counted figure, with each reason from gaps in plain words (references/hub.md).unknown: "volume unknown", which is not zero. Give per_trace_extra_io only as a per-trace figure, never multiplied into a total.extrapolated true: give the counted figure with its wording above, then the estimate as "about N, extrapolated at the lowest sampling rate of the window, min_sampling_rate (may overstate if the rate changed during it)". "At least" never applies to the estimate.avoidable_io group only, detections known but avoidable_io_ops null: say the avoidable I/O is unknown because green scoring is off on a source, and give the detections.sources[].id), and which ones have no count.code_location: function, file, line) and whether that file is in this repository. If it is not, mark it "outside this repository".lock_risk true means a slow write or a FOR UPDATE / FOR SHARE read, which can hold locks and block other requests: say so. For a slow read in this repository, check in the code whether it runs inside a transaction that writes. When it does, flag it as a lock risk too, move it to the top of the slow group, and say it was moved and why.gaps holds multi_instance, explain it once: several pods behind one Service are read by poll, so the count can never be complete. The remedy is a push from each pod, or one source per pod.excluded_acked is above zero, say how many findings were left out because every source carrying them acknowledged them, from excluded_acked only. Do not rank them.Propose batches, then wait for the user to validate them before any change.
Load ../perf-tests/references/fix-safety.md (from this skill's base directory) before proposing any fix.
fix-safety.md for each fix. Show each fix and wait for a yes before applying it.CREATE INDEX CONCURRENTLY on PostgreSQL, ALGORITHM=INPLACE, LOCK=NONE on MySQL, ONLINE = ON on SQL Server editions that support it). Flag a heavy migration (a table rewrite, a large backfill) to the user instead of slipping it into the batch.False positives.After the fixes of a batch, hand over to perf-tests in its bugfix before/after mode. Do not redo its work.
/perf-sentinel:perf-tests bugfix <signature> [<signature> …], with the batch's signatures and their endpoints.When the code shows a finding is intended or harmless, explain why, then propose:
perf-sentinel hub ack targets one source, so list every production source carrying the finding (from sources) in the request. The user's yes covers exactly that list: one command per source, with a reason you drafted and an expiration:
perf-sentinel hub ack --source-id <id> --signature <signature> --reason "<reason>" --expires <date or duration>
It changes production state: run it only after an explicit yes. The Hub records the signed-in person as the author..perf-sentinel-acknowledgments.toml, the matching entry ready to paste, from the template in ../perf-tests/references/perf-sentinel.md (Acknowledgment entry), with the signature, service and endpoint of the finding, and always an expires_at date. Write it only after a yes.End with a short summary:
perf-tests, review, merge, watch the waste ratio in the Hub or Grafana).references/hub.md: load at Connection. The perf-sentinel hub commands and flags, sign-in and error codes, the volume fields, their three states, the window rule and the meaning of each detections_gaps value.scripts/rank.py: run at Ranking. Ranks one or more JSON exports of perf-sentinel hub findings.../perf-tests/references/fix-safety.md: load at Fixes, before proposing any fix.../perf-tests/references/perf-sentinel.md: Install at Connection when the CLI is missing, Version check at Connection, Acknowledgment entry at False positives.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub institut-du-numerique-responsable/perf-sentinel-claude --plugin perf-sentinel2 skills in this plugin
Other plugins' skills for the same job