/grafana-k6:k6-validatefrom grafana-k6
Validates k6 scripts against structural, performance, and reliability standards. Detects anti-patterns, checks thresholds and load profiles before execution.
Ships in grafana-k6. 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.
At the beginning of the workflow, detect and use interaction tools in this order:
AskUserQuestion exists, use it for required inputs.mcp:sampling or create_message exists, use native IDE modal interaction.confirm_action exists, use it for critical confirmations.> [?] MISSING REQUIREMENT: Missing script path or validation scope
missing: script path, validation scope
why: deterministic validation report cannot run without target and scope
next_question: Which script should be validated?
Do not continue validation after fallback.
When fallback is required, always use this portable payload shape:
> [?] MISSING REQUIREMENT: <short missing requirement summary>
missing: <comma-separated missing fields>
why: <why validation cannot continue deterministically>
next_question: <single, specific question that unblocks the next step>
Do not emit final validation findings after this fallback.
load, stress, spike, soak, smoke) used to select executor intent.minimal, standard, aggressive) used to evaluate whether vus, duration, and thresholds fit the intended load level.Apply deterministic recommendation:
K6_WEB_DASHBOARD=falseK6_WEB_DASHBOARD=trueK6_WEB_DASHBOARD=false unless explicit opt-infalsePerformance Best Practices:
WARNINGWARNINGWARNINGWARNINGProtocol-Specific:
client.connect() outside default function, setup(), or teardown() as WARNING (connection lifecycle leakage risk)on('open'), on('error'), graceful close path, and bounded session duration)WARNINGnewPage() / newContext() creation.return, throw, catch branches)..close(), emit WARNING with path evidence.try/finally remediation in Suggested Fixes.Anti-Patterns to Flag:
https://api.prod...) in runnable scripts without __ENV control__ENV fallback)catch blocks that swallow errorsexport default function() {} without a name is a quality violation. Flag as WARNING: "Default export function should be named for traceability and debuggability. Example: export default function runLoad() {}". The naming convention is run<ScenarioType> or run<Protocol><ScenarioType>.
Always enforce these validations as mandatory checks:
ERROR because it violates cross-env SLA coherence expected by k6-builder.vus and duration for time-based cases, or clear equivalent (stages, iterations + vus) for scenario-based definitions.preAllocatedVUs <= maxVUs.__ENV control as at least WARNING (elevate to ERROR when credentials or sensitive paths are coupled).page/context in all execution paths.Every validation response must include these sections in order:
Output artifact requirements:
validation-report.md.## Validation Summary## Scope and Assumptions## Mandatory Invariant Results## Detailed Findings## Suggested Fixes## Next Step## Validation Summary must always begin with a status badge on its own line: **Status: PASS**, **Status: WARN**, or **Status: FAIL**.## Mandatory Invariant Results must include a checklist item for each invariant from Required k6 Invariants, even if the result is ✅ pass.## Detailed Findings must group entries by severity in this order: 🔴 CRITICAL (ERROR) → 🟡 WARNING → ℹ️ INFO.## Suggested Fixes must include a compact fix-priority matrix with counts and estimated time-to-fix per severity.Output budget:
Validation Summary + Mandatory Invariant Results + Detailed Findings combined must target ≤ 600 tokens total.# · Severity · Finding · Recommended Fix (one-liner max).Suggested Fixes. Each fix should include:
issue: The problem detectedseverity: ERROR, WARNING, or INFOevidence: Code snippet or line reference showing the issuefix_snippet: Executable corrected code (when applicable)estimated_time: short estimate (for example ~5 min)Detailed Findings and Suggested Fixes — Detailed Findings identifies; Suggested Fixes remediates.For common anti-patterns, point to skills/k6-validate/references/remediation-playbooks.md and include the matching playbook name.
Findings table format:
| # | Severity | Finding | Recommended Fix |
|---|---|---|---|
| 1 | ERROR | Missing thresholds | Add thresholds block to options |
| 2 | WARNING | Anonymous default function | Rename to export default function runLoad() |
Under the table, include this compact template:
### 🔴 CRITICAL (Fix Immediately)
- <highest-impact findings only>
### 🟡 WARNING (Fix Soon)
- <quality/perf risks>
### ℹ️ INFO (Optional)
- <non-blocking improvements>
In Suggested Fixes, append:
## Fix Priority Matrix
| Priority | Category | Count | Estimated Time |
|---|---|---:|---|
| 🔴 CRITICAL | Security/Safety/Correctness | <n> | <total> |
| 🟡 WARNING | Quality/Performance | <n> | <total> |
| ℹ️ INFO | Best Practice | <n> | <total> |
Keep this file focused on validation workflow. Place deep guidance in:
skills/k6-validate/references/README.mdscript) and optional context (protocol, sla, scenario type, profile).WARNING for more lax thresholds.page/context resources and flag any non-closed path.validation-report.md using Markdown and the Output Contract section order.references/README.md (opens in a new tab)references/goja-k6-compatibility-matrix.md (opens in a new tab)references/load-profile-validation-rules.md (opens in a new tab)references/remediation-playbooks.md (opens in a new tab)references/severity-and-antipatterns.md (opens in a new tab)references/testing-guide.md (opens in a new tab)references/threshold-validation-rules.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
grafana-k6@charlyautomatiza-marketplace is listed by charlyautomatiza/charlyautomatiza-marketplace — review the source before installing
npx claudepluginhub charlyautomatiza/charlyautomatiza-marketplace --plugin grafana-k63 skills in this plugin
/k6-builderBuild runnable k6 artifacts from a plan or direct requirements. Use when users ask to generate k6 scripts, choose/apply executors in runnable options, or create single/multi-environment configs. Prefer this skill for any implementation output request, even if the user also mentions "executor" or "config"./k6-planPlan deterministic k6 performance tests from goals, SLA, and protocol context. Use when users ask to plan a load test, set up a stress/spike/soak strategy, or request a full k6 test blueprint. Route implementation output requests to k6-builder.