Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
Back to list

TestDriver ai() Natural-Language Test Runner

A reference skill for using TestDriver's ai() method to drive UI test steps with plain-English instructions.

Dev & CodingIntermediate23835AI score 6/10Last updated: Aug 12, 2026

What it does

  • Documents the testdriverai SDK's ai(task, options) method: parameters, return value, and the validateAndLoop option for self-verifying retries.
  • Helps you write tests like "Click the submit button" or "Complete the checkout process" where the AI analyzes the screen and plans the steps itself.
  • Gives clear guidance on when to reach for ai() versus explicit methods such as find(), assert(), and extract().
  • Includes a full vitest E2E example covering auth → connect → scenario → disconnect.

Who it's for

  • QA engineers and frontend developers already writing UI automation with TestDriver.
  • Anyone prototyping tests quickly or exploring an unfamiliar app without hand-writing selectors.
  • Prerequisites: the testdriverai package plus a TD_API_KEY; of little value outside TestDriver projects.

Examples

  1. Shopping flow: await testdriver.ai('Search for "laptop", add the first result to cart, and proceed to checkout'), then verify the total with extract().
  2. Optional UI: await testdriver.ai('Accept the cookie consent if it appears') to gracefully handle popups that may or may not show.
  3. Validated checkout: ai('Proceed to checkout and fill in shipping details', { validateAndLoop: true }) followed by an explicit assert('order confirmation page is displayed').

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/testdriverai/testdriverai/HEAD/ai/skills/testdriver-ai/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on Claude Skill Mart.
Copy the ai/skills/testdriver-ai folder from the GitHub repo testdriverai/testdriverai into my ~/.claude/skills/testdriver-ai/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/testdriverai/testdriverai.git /tmp/testdriverai && mkdir -p ~/.claude/skills && cp -r /tmp/testdriverai/ai/skills/testdriver-ai ~/.claude/skills/

This is a third-party skill. Check the source repository before installing.

  1. Clone the repo: git clone https://github.com/testdriverai/testdriverai.git
  2. Create the skills folder: mkdir -p ~/.claude/skills
  3. Copy the skill: cp -r testdriverai/ai/skills/testdriver-ai ~/.claude/skills/
  4. Install the SDK in your test project: npm i -D testdriverai vitest
  5. Export your key: export TD_API_KEY=your_key_here
  6. Restart Claude Code and ask something like "write a login test using testdriver.ai()" so the skill gets picked up.