link-grafana-panel
Skill1 starsChanged 3 months agoMITView on GitHub
Type: skill (deterministic — pure string construction, no network, no token) · Used by: perf-run-one, perf-sweep · Status: LIVE (P3 — links the LGTM Perf - <team> dashboard; no GRAFANA_SERVICE_ACCOUNT_TOKEN needed) You are the link-grafana-panel skill. You construct a deep-link to the per-project LGTM dashboard (Perf - <team>, uid perf-<team> by convention), pre-filtered to the exact run(s) and time window, for embedding in the Jira draft (grafana_url) and the Slack alert. This is pure URL construction — no Grafana API…
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- k6-browser-testSkill
- k6-load-testSkill
- k6-playwright-converterSkill
- k6-smoke-testSkill
- k6-test-plannerSkill
- apply-ws2-conventionsSkill
- author-resilient-playwrightSkill
- build-status-viewsSkill
- choose-k6-execution-modeSkill
- compare-coreSkill
- compare-to-baselineSkill
- corroborate-2-sourcesSkill
- curate-baselinesSkill
- doc-consistency-checkSkill
- emit-otlp-and-prometheusSkill
- estimate-token-costSkill
- explore-product-structureSkill
- file-perf-regression-jiraSkill
- func-verdictSkill
- heal-playwright-suiteSkill
- k6-profile-benchmarkSkill
- k6-profile-loadSkill
- k6-profile-soakSkill
- k6-profile-spikeSkill
- k6-profile-stressSkill
- learn-via-k6-docsSkill
- notify-responsible-teamSkill
- open-draft-prSkill
- parse-k6-json-summarySkill
- parse-playwright-summarySkill
- perf-run-logSkill
- run-k6-scriptSkill
- run-ledgerSkill
- run-playwright-suiteSkill
- scope-reviewSkill
- scrub-har-secretsSkill
- triage-func-verdictSkill
- triage-perf-verdictSkill
- verify-k6-scriptSkill
- verify-playwright-suiteSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Gate: If observe is not 1 → return { "grafana_url": "", "reason": "run not exported (OBSERVE off) — no data in Mimir to link" }.
- Very specific: line 35
If a confirm run is supplied, extend to to the confirm run's end + 60s (one window covering both runs).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
link-grafana-panel
Build a URL-encoded Grafana deep-link to the exact run window for the ticket / proof.
Type: skill (deterministic — pure string construction, no network, no token) · Used by: perf-run-one, perf-sweep · Status: LIVE (P3 — links the LGTM Perf - <team> dashboard; no GRAFANA_SERVICE_ACCOUNT_TOKEN needed)
Prompt
You are the link-grafana-panel skill. You construct a deep-link to the per-project LGTM
dashboard (Perf - <team>, uid perf-<team> by convention), pre-filtered to the exact
run(s) and time window, for embedding in the Jira draft (grafana_url) and the Slack alert.
This is pure URL construction — no Grafana API call, no auth, no model call.
Inputs (from the workflow):
team,profile,env,run_idstarted_at(ISO) +duration_s— fromreports/<run_id>/contract.jsonobserve— whether the run exported OTLP (OBSERVE=1)- optional:
confirm_run_id+ itsstarted_at/duration_s(corroborated reds — fromreports/<run_id>_confirm/contract.json)
Steps
- Gate. If
observeis not1→ return{ "grafana_url": "", "reason": "run not exported (OBSERVE off) — no data in Mimir to link" }. A link to an empty panel is worse than no link. Resolve the Grafana host (where the run's OTLP export landed):
env host stghttps://grafana.example.comprodhttps://grafana.example.com- Dashboard path by convention:
/d/perf-<team>/perf-<team>(per-project dashboard rule — one dashboard per project, uidperf-<project>, lives in theteam-perffolder). - Time window:
from = epoch_ms(started_at) − 60000;to = epoch_ms(started_at) + duration_s×1000 + 60000. If a confirm run is supplied, extendtoto the confirm run's end + 60s (one window covering both runs). - Variables (must match the dashboard's templating + the script tag contract):
var-environment— map env:stg→staging,prod→prod-usvar-test_file—<profile>(e.g.api-benchmark)var-run_id—<run_id>; if a confirm run exists, repeat the param (&var-run_id=<run_id>&var-run_id=<run_id>_confirm— multi-select shows both bars side by side)
Assemble + URL-encode each value:
<host>/d/perf-<team>/perf-<team>?orgId=1&from=<from_ms>&to=<to_ms>&var-environment=<env_tag>&var-test_file=<profile>&var-run_id=<run_id>[&var-run_id=<confirm_run_id>]- Return
{ "grafana_url": "<url>" }. The workflow fills it intojira-draft.md(evidence section) before any filing, and passes it tonotify-responsible-team.
Example (corroborated red)
https://grafana.example.com/d/perf-demo-web/perf-demo-web?orgId=1&from=1781102342000&to=1781103062000&var-environment=staging&var-test_file=api-benchmark&var-run_id=demo-web_api-benchmark_stg_20260610T143022Z&var-run_id=demo-web_api-benchmark_stg_20260610T143022Z_confirmHard rules
- No Grafana API, no token, no network. A deep-link is a string. (The
GRAFANA_SERVICE_ACCOUNT_TOKENis NOT needed here — it only unlocks the reviewer's optional Grafana-MCP context enrichment.) - Never link a run that didn't export (
observe != 1→ empty url + reason). - p95 is the percentile of any panel this links to.
- uid by convention only (
perf-<team>) — no per-baseline override; one convention, zero drift. (The stalegrafanablock in pre-P3 baselines was removed 2026-06-10.)
Tools
none — deterministic (plain string construction)
Data
- Reads:
reports/<run_id>/contract.json(started_at,duration_s) and, when present,reports/<run_id>_confirm/contract.json - Writes: nothing (returns the URL to the caller)
Frozen skill registry: AGENTS.md in this repo
(2026-06-10: implemented as a pure URL-builder against the LGTM Perf - demo-web dashboard — the planned Grafana-API approach needed a token for zero benefit.)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

