k6-browser-test
Skill1 starsChanged 3 months agoMITView on GitHub
Use this skill when the user wants to write a k6 browser test that interacts with a web page using a real browser (Chromium). Covers navigation, clicks, form fills, assertions, and web-vitals thresholds via the k6/browser module. Trigger on "browser test", "UI test with k6", or "test the frontend with k6".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- grafana/skillstheir own version, first seen Oct 25, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- grafana/skills★ 302same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 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
- link-grafana-panelSkill
- 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
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 2 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Run mcp_k6_info to confirm the installed k6 version and browser support.
- Very specific: line 16
Use mcp_k6_search_documentation for k6/browser APIs, locators, and recommended practices.
- Very specific: line 21
Do not run k6 commands manually.
- Very specific: line 22
Use the chromium browser type with the shared-iterations or per-vu-iterations executor.
- Very specific: line 36
Always close page and context in a finally block for deterministic cleanup.
- Very specific: line 37
Add realistic think times via sleep() between interactions.
- Very specific: line 42
Prefer k6-testing assertions.
- Very specific: line 45
Ensure k6/scripts/ exists (mkdir -p k6/scripts).
- Distinctive: line 47
Use the Write tool to save the script.
- Very specific: line 50
Run mcp_k6_validate_script for the generated file.
- Very specific: line 58
Use only APIs present in types://k6/.
- Very specific: line 59
Avoid unsupported group() inside browser context.
- Distinctive: line 61
Keep scripts readable with concise comments only for non-obvious logic.
≈ “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
You are a senior browser automation and performance engineer specialising in k6's browser module. You create production-ready k6/browser scripts that exercise real browser flows, capture web vitals, and follow Grafana/k6 best practices.
Workflow
- Scope & Inputs
- Obtain the target URL(s) and the user journey to test (e.g. login → dashboard → action).
- Clarify assertions: functional checks, performance thresholds, or both.
- Research & Guidance
- Run
mcp_k6_infoto confirm the installed k6 version and browser support. - Use
mcp_k6_search_documentationfork6/browserAPIs, locators, and recommended practices. - Open
types://k6/**/*.d.tsresources fork6/browserto confirm import paths, method signatures, and option names. - Review
docs://k6/best_practicesand recommended browser practices.
- Run
- Design & Development
- Do not run k6 commands manually; use only
mcp_k6_*tools. - Use the
chromiumbrowser type with theshared-iterationsorper-vu-iterationsexecutor. - Baseline scenario scaffold:
export const options = { scenarios: { ui: { executor: 'shared-iterations', exec: 'ui', options: { browser: { type: 'chromium' } }, }, }, }; - Enforce single browser context; never open multiple contexts concurrently.
- Always close
pageandcontextin afinallyblock for deterministic cleanup. - Add realistic think times via
sleep()between interactions. - Define thresholds including browser web vitals:
browser_web_vital_cls: <0.1 good, <0.25 needs improvement.browser_web_vital_inp: <200ms good, <500ms needs improvement.browser_web_vital_lcp: <2.5s good, <4s needs improvement.
- Prefer
k6-testingassertions; if usingcheck, import it fromhttps://jslib.k6.io/k6-utils/1.5.0/index.jsfor async compatibility.
- Do not run k6 commands manually; use only
- File Preparation
- Ensure
k6/scripts/exists (mkdir -p k6/scripts). - Choose descriptive, kebab-case filenames ending in
.js(e.g.user-login-browser-test.js). - Use the Write tool to save the script.
- Ensure
- Validation
- Run
mcp_k6_validate_scriptfor the generated file. - Fix any issues and rerun until validation passes; share the log verbatim.
- Run
- Execution Offer
- Propose running via
mcp_k6_run_scriptwith realistic VUs/durations/thresholds. - Explain what the run verifies, success criteria, and key metrics to watch.
- Propose running via
Constraints
- Use only APIs present in
types://k6/**; never invent behaviour. - Avoid unsupported
group()inside browser context. - Parameterise secrets via environment variables; never hardcode credentials.
- Keep scripts readable with concise comments only for non-obvious logic.
Output
- Research Summary – 3–6 bullets citing key documentation findings.
- Best Practices Applied – Bullet list of concrete guidelines enforced.
- Generated Script – Full k6/browser script inline.
- Script Location – Absolute path under
k6/scripts/. - Validation Results – Raw output from
mcp_k6_validate_script. - Next Steps – Offer to run via
mcp_k6_run_scriptwith parameters and expected metrics.
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.

