admission-control
Use when the user asks to "write a validator", "add validation", "implement admission control", "write a mutating webhook", "add…
Generate a working k6 browser test (k6/browser) from a plain-language description of a user journey — no CSS selectors or technical detail needed. Explores the LIVE target site with a throwaway k6/browser session to discover real, verified selectors
$ npx -y skills add grafana/skills --skill k6-browser-test --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/k6-browser-testContext preview
The summary Claude sees to decide when to auto-load this skill.
Generate a working k6 browser test (k6/browser) from a plain-language description of a user journey — no CSS selectors or technical detail needed. Explores the LIVE target site with a throwaway k6/browser session to discover real, verified selectors
name: k6-browser-test description: >- Generate a working k6 browser test (k6/browser) from a plain-language description of a user journey — no CSS selectors or technical detail needed. Explores the LIVE target site with a throwaway k6/browser session to discover real, verified selectors (getByRole/getByLabel/getByText, etc.), dismisses cookie/consent banners, then writes a functional or load test using expect() from k6-testing (Web-Vitals thresholds for load). Looks up k6/browser APIs via `k6 x docs`; validates with `k6 run`. Use when the user wants to write, author, or generate a k6 browser/UI or load test with a real browser, or says things like "write a browser test for…", "test this login/checkout/search flow with k6", "click through my site and verify…", or describes navigating a site in prose. For a full multi-test performance suite use k6-perf-test-website; for HTTP/protocol (non-browser) tests use the general k6 skills; for browser or scripted checks in Grafana Cloud Synthetic Monitoring, use synthetic-monitoring-checks. license: Apache-2.0 metadata: author: grafana-labs
Turn a plain-language user journey into a working, validated `k6/browser` functional test. The user describes what to do the way they'd tell a friend ("go to the site, log in, add a pizza to the cart, check the cart shows one item") — **you** discover the real selectors by driving the live site, so the user never has to supply a CSS selector, XPath, or `data-testid`.
> **Agent-agnostic:** steps describe capabilities ("run a k6 script", "write a > file"), not specific tools. Use whatever your harness provides. The only hard > dependencies are the `k6` binary with browser support and a POSIX shell — no > MCP, no Node, no Playwright.
iteration, `expect()` assertions), or a browser *load* test (scenarios + Web-Vitals thresholds) when the user asks for load/performance.
suites with SLOs. If the user wants a full performance suite, hand off to **k6-perf-test-website**. If they want HTTP/gRPC/WS, use the general k6 skills. If the script is destined for Grafana Cloud Synthetic Monitoring (a browser or scripted check), also reference the **synthetic-monitoring-checks** skill — it owns the SM check lifecycle (create/update, cadence, probe locations).
landed in v1.2.0 — plus a Chromium-based browser installed on this machine (e.g. Google Chrome) — k6 does **not** bundle one. Point `K6_BROWSER_EXECUTABLE_PATH` at a non-default install location.
`env`. (Only the final `k6 run` in Step 7 has a PowerShell form.)
resolution, no custom build). Verify once that it prints markdown; on v1.x — or if it misbehaves — use the fallbacks in [Step 5](#step-5-fill-api-gaps-with-k6-x-docs-only-if-needed). Everything else works the same.
---
Restate the user's prose as an explicit, ordered step list and **echo it back** before exploring — a wrong reading is cheap to fix now, expensive after a script is written. Capture:
result").
page title contains 'Dashboard'", "'Rated!' appears").
(`__ENV.TEST_USERNAME` / `__ENV.TEST_PASSWORD` / `__ENV.TEST_TOKEN`) — never hardcode. Avoid reserved names: in zsh (default macOS shell) `USERNAME` is bound to the OS user, so `USERNAME=… k6 run` is silently ignored — use `env TEST_USERNAME=… TEST_PASSWORD=… k6 run …`.
before performing these during exploration, and prefer a safe stopping point. If you can't ask (non-interactive run): proceed through the step only against a demo/sandbox with no real fulfillment (e.g. saucedemo) and state why it's safe; against anything that looks real, stop before the step and surface it.
Example restatement:
> 1. Open `https://www.saucedemo.com` > 2. Log in as the standard user (creds via env) > 3. Add the first product to the cart > 4. **Assert:** the cart badge shows `1`
---
This is the heart of the skill and what makes the output reliable. **Read [`references/explore.md`](references/explore.md)** for the full procedure.
Preflight once before the first run: `k6 version` (this skill needs v1.2+). If the first explorer run fails at browser launch ("browser not found" / executable-path errors), k6 couldn't find a Chromium — install Google Chrome or point `K6_BROWSER_EXECUTABLE_PATH` at one, then re-run. Catching this now beats a confusing failure mid-exploration.
In short:
1. Copy [`scripts/explore.template.js`](scripts/explore.template.js) to a **unique temp path** — `EXPLORER="$(mktemp -d)/explore.js"` — never a fixed name like `/tmp/explore.js` (why: [`references/explore.md`](references/explore.md)). Never save it to the user's project. 2. Run it headless against the target: `K6_BROWSER_HEADLESS=true TARGET=<url> k6 run "$EXPLORER"` 3. Read the `EXPLORE_CANDIDATES` line — a JSON list of visible elements with their naming signals (`text`, `ariaLabel`, `placeholder`, `label`, `value`, `testid`, `dataTest`, `nameAttr`, `role`). The signal→locator table in [`references/explore.md`](ref
Public skills for working with Grafana, Prometheus, Loki, Tempo, Pyroscope, k6, and the broader LGTM observability stack. Compatible with Claude Code, Cursor, Codex, and any tool supporting the Agent Skills open standard.
Use when the user asks to "write a validator", "add validation", "implement admission control", "write a mutating webhook", "add…
Use when starting any grafana-app-sdk work — scaffolding a Grafana app, initializing a Grafana App Platform app, picking a…
Author CUE kind definitions for grafana-app-sdk apps - schemas, versioning, field constraints, named type definitions, custom…
Implement reconcilers and watchers for grafana-app-sdk apps — write `TypedReconciler[*MyKind]` reconcile functions, apply…
Cut Grafana Cloud Metrics cost by shrinking active-series count with Adaptive Metrics aggregation rules — auto-recommendations…