skills/convert-artillery-yaml-to-ts/SKILL.md
Convert existing Artillery YAML scripts to TypeScript or ESM JavaScript, auto-detecting the best output format, resolving YAML anchors by inlining, type-annotating exports, and verifying the output via tsc or node --check. Use when the user wants to migrate, rewrite, or translate Artillery load-test scripts from YAML to TS/JS for better IDE support, type checking, and composability.
npx skillsauth add artilleryio/agent-skills convert-artillery-yaml-to-tsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are converting Artillery YAML test scripts to TypeScript or ESM JavaScript. The conversion is a 1:1 structural mapping — every YAML key maps directly to a JS export. Follow the steps below. Ask the user questions at each decision point marked with DECISION.
Glob for *.yml and *.yaml files in the project. Identify Artillery scripts by checking for config: and scenarios: as top-level keys. List the files found.
DECISION — If multiple Artillery YAML files exist, ask the user which to convert (or all).
DECISION — Determine whether to output TypeScript or ESM JavaScript:
tsconfig.json exists, or .ts files are present in test directories → output .ts with type imports.mjsBefore converting, scan each YAML file for anchors (&name), aliases (*name), and merge keys (<<:). These are YAML-specific features with no JS equivalent.
If found:
// WARNING: This file was converted from YAML that used anchors/merge keys. The shared references have been inlined as duplicated values. Review carefully — the conversion may not be accurate.For each Artillery YAML file, read it and convert to a JS/TS module. The mapping is purely structural — YAML values become JS object literals 1:1.
Each top-level YAML key becomes a named export: config → export const config = { ... }, scenarios → export const scenarios = [ ... ], before/after → export const before/after = { ... }. before and after have no dedicated Artillery types and are exported untyped.
Add type imports and annotations for config and scenarios:
import type { Config, Scenario } from "artillery";
export const config: Config = { ... };
export const scenarios: Scenario[] = [ ... ];
If outputting .mjs, no type imports or annotations — just plain export const.
Write the new file next to the original YAML file, with the same base name but .ts or .mjs extension.
config:
target: https://api.example.com
phases:
- duration: 60
arrivalRate: 5
scenarios:
- name: "Browse products"
flow:
- get:
url: "/products"
headers:
Authorization: "Bearer {{ authToken }}"
Becomes:
import type { Config, Scenario } from "artillery";
export const config: Config = {
target: "https://api.example.com",
phases: [{ duration: 60, arrivalRate: 5 }],
};
export const scenarios: Scenario[] = [
{
name: "Browse products",
flow: [{ get: { url: "/products", headers: { Authorization: "Bearer {{ authToken }}" } } }],
},
];
Note: Artillery template expressions like {{ authToken }} stay as literal strings. The processor field (if present) is also kept as-is (string reference).
Try to verify the converted file:
npx tsc --noEmit <file> to type-check.mjs: run node --check <file> to syntax-checkTell the user:
npx artillery run ./path/to/new-file.ts (or .mjs)development
Set up the Artillery Playwright reporter in an existing Playwright E2E test suite. Installs @artilleryio/playwright-reporter, configures it in playwright.config.ts, sets up Artillery Cloud API key, and runs the suite to verify reporting works. Use when the user wants to add Artillery Cloud reporting to their Playwright tests, monitor E2E test results in a dashboard, or integrate Playwright with Artillery Cloud.
tools
Set up Artillery load testing for any project. Detects package manager and project type, creates a TypeScript test script (HTTP or Playwright browser), configures Artillery Cloud, and provides the run command. Use when the user wants to add load testing, performance testing, or browser-based load testing to their project.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.