AI agent skill
The test-lab-plan skill teaches an AI coding agent (Claude Code, Codex, Cursor) to write production-ready test-lab plans grounded in your code, then create them with the testlab CLI.
AI agent skill (test-lab-plan)
test-lab-plan is an agent skill that teaches Claude Code, Codex, or Cursor how to turn a described flow into a production-ready test-lab plan: an explicit URL, declarative acceptance criteria, {{credentials.<key>}} for secrets, and {{data.<fixture>.<field>}} for generated data.
Install
First install the testlab CLI, which provides the testlab command:
npm i -g @test-lab-ai/cliThen add the skill to your agent of choice:
testlab skills install # auto-detects the agent(s) you use
testlab skills install --agent codex # Codex -> .agents/skills
testlab skills install --agent cursor # Cursor -> .cursor/rules/test-lab-plan.mdc
testlab skills install --agent all # all threeWith no --agent, it detects which agents you use (the agent running the command, plus the .claude / .agents / .cursor folders in your project) and installs for each, defaulting to Claude Code if none are found.
Add --global to install under your home directory instead of the project (Claude Code and Codex only; Cursor user rules are configured in Cursor's Settings). Restart your agent to load it. The skill is bundled with the CLI and version-locked to it, so installs are offline and reproducible. The public Test-Lab-ai/skills repo is the browsable, open-source source.
Keeping it current: a skill change ships as a new CLI version, so npm i -g @test-lab-ai/cli@latest updates it. The CLI auto-refreshes installed copies the first time you run it after an upgrade, and testlab skills update re-installs the bundled version on demand.
How it works
When you ask your agent to "write a test-lab test for X", the skill:
- Reads the real source when the target site is in your repo, so the acceptance criteria quote actual on-screen text and response shapes instead of guesses.
- Drafts one plan with a single label, the right mode (Quick or Deep), and the credential and data references it needs.
- Offers to create it directly in your account with the
testlabCLI, or hands back a paste-ready plan for the dashboard.
Two ways to use it
Author a test while building a feature. You just added a page or route, so you ask the agent to write a test for it. The skill reads the new component, produces a grounded plan, and creates it through the CLI.
Import the tests you already have. Point the agent at Playwright or Cypress specs, Cucumber features, a TestRail or Zephyr export, or a prose doc. It converts each into a plan and imports the whole batch with testlab import.
Example prompts
You invoke the skill and describe the test in plain language; it writes the plan JSON and runs the CLI. In Claude Code that means /test-lab-plan; in Codex or Cursor, mention test-lab and the skill triggers.
Create a test for a feature you just built:
/test-lab-plan write a test for the signup flow at https://app.example.com/signup, then create it in my accountImport existing tests:
/test-lab-plan convert the Playwright specs in ./tests/e2e into test-lab plans and import themThe skill surveys your account first, so it reuses the matching project, existing credentials, and existing fixtures instead of duplicating them.
The skill writes the plans; the testlab CLI imports them. Install the CLI with npm i -g @test-lab-ai/cli, then add the skill with testlab skills install.