create-k6-test

Generate k6 load-testing artifacts from a JSON specification.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/diegolirio/ai-showcase-skills --skill create-k6-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-k6-test
Source: https://github.com/diegolirio/ai-showcase-skills/tree/main/skills/create-k6-test
Command: npx skills add https://github.com/diegolirio/ai-showcase-skills --skill create-k6-test

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the creation of end-to-end k6 load tests for REST endpoints by generating all artifacts from a single JSON specification, including docs/{feature}/k6.json, k6.js, and Makefile targets.

Core Features & Use Cases

  • Generates a full k6.json spec, a parametrized k6.js script, and Makefile targets for each scenario.
  • Reads the single source of truth docs/{feature}/k6.json to drive multiple test scenarios.
  • Enforces strict validation of required fields, preserves exact request bodies, and documents thresholds and load profiles in the artifacts.

Quick Start

Provide a JSON spec detailing the feature, endpoints, and load scenarios, then run the skill to generate docs/{feature}/k6.json, k6.js, and Makefile targets.

Frequently Asked Questions about create-k6-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate k6 load tests from a JSON specification?

You can generate k6 load tests by providing a single JSON specification detailing your REST endpoints and load scenarios. The skill reads docs/{feature}/k6.json and outputs a parametrized k6.js script, a docs folder, and a Makefile with per-scenario targets.

Can I automate k6 test-automation setup for multiple REST API scenarios at once?

Yes, k6 test-automation setup supports multiple REST API scenarios through a single source of truth. By defining load profiles and endpoints in docs/{feature}/k6.json, the skill generates a parametrized k6.js script and Makefile targets covering every scenario.

What is the best way to structure k6 load-testing scripts and Makefile targets?

The best way to structure k6 load-testing scripts is from a single JSON spec. This approach generates a parametrized k6.js script alongside a Makefile containing per-scenario targets, ensuring thresholds, load profiles, and endpoints are consistently documented.

Does this k6 load-testing approach validate required fields in the JSON spec?

Yes, the k6 load-testing generation enforces strict validation of required fields in the JSON specification. It ensures the request body is carried exactly as provided and documents all thresholds and load profiles directly within the generated artifacts.

How do I run different load-testing scenarios using a Makefile?

You can run different load-testing scenarios by executing the generated Makefile targets. The skill creates per-scenario Makefile targets driven by the docs/{feature}/k6.json specification, allowing you to trigger specific load tests individually.

What do I need to provide to create a complete k6 load-testing setup for a REST endpoint?

To create a complete k6 load-testing setup, you need to provide a JSON specification detailing the feature, REST endpoints, and load scenarios. This single input drives the generation of the k6.js script, documentation folder, and Makefile targets.