TestDriver Screen Assertion Guide
A reference skill teaching Claude how to verify screen state in plain English with TestDriver's AI assert().
Dev & CodingIntermediate★ 243⑂ 37AI score 6/10Last updated: Sep 21, 2026
What it does
- Teaches Claude the exact syntax for
testdriver.assert('the login page is displayed')to verify UI state in natural language. - Documents parameters (assertion string,
ai.temperature,top.p/ksampling overrides) and the return contract (Promise<boolean>, throws on failure). - Includes best practices (be specific, not vague), before/after state-change assertion patterns, and a
waitForAssertionpolling helper for conditions that need time. - Ships a full Vitest example covering auth → connect → assert → disconnect.
Who it's for
- QA engineers and frontend devs writing UI/E2E tests with TestDriver.ai
- Teams tired of brittle selector-based tests who want visual/semantic checks
- Anyone embedding AI assertions inside existing Vitest/Jest suites
Examples
- "Write a test that checks required-field errors when submitting an empty form" → generates per-field assert chains
- "Wait until more than 10 items load after clicking load more" → applies the
waitForAssertion(...)polling pattern - "Verify active/completed state for each step of a 3-step wizard" → step-by-step assertion sequence
· · · 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-assert/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)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the 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-assert folder from the GitHub repo testdriverai/testdriverai into my ~/.claude/skills/testdriver-assert/. 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/testdriver-assert && cp -r /tmp/testdriverai/ai/skills/testdriver-assert/* ~/.claude/skills/testdriver-assert/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/testdriverai/testdriverai.git /tmp/testdriverai - Create the skill folder:
mkdir -p ~/.claude/skills/testdriver-assert - Copy the skill files:
cp -r /tmp/testdriverai/ai/skills/testdriver-assert/* ~/.claude/skills/testdriver-assert/ - Install the runtime package in your project:
npm i -D testdriverai - Export your API key:
export TD_API_KEY=your_key - Restart Claude Code and ask something like "write a login verification test using testdriver assert".