TestDriver Cache Tuning
A reference skill for configuring TestDriver AI's screenshot-based cache to speed up repeated test runs.
Dev & CodingIntermediate★ 240⑂ 36AI score 7/10Last updated: Aug 16, 2026
What it does
Gives Claude an accurate model of the TestDriver SDK cache system so it can write and fix cache configuration.
- Screen cache: pixel-diff comparison against the cached screenshot (default 5%)
- Element cache: OpenCV
TM_CCOEFF_NORMEDtemplate matching to re-verify position (default 0.8) - A threshold priority table: per-command option > legacy numeric arg > constructor config > defaults
- How the auto
cacheKeyworks (first 16 hex chars of the test file's SHA-256) and why it self-invalidates - Disabling via
cache: falseorTD_NO_CACHE=true - Reading
getDebugInfo()fields:cacheHit,similarity,cacheSimilarity
Who it's for
- QA engineers and developers running TestDriver AI E2E tests who want faster runs and fewer AI calls
- Anyone debugging chronic cache misses or false cache hits that make tests pass incorrectly
- CI owners who need to understand cache partitioning by OS and screen resolution
Examples
- "The submit button find keeps re-calling the AI" → generates a per-command override with
screen: 0.01, element: 0.95 - "Disable caching only in CI" → shows
TD_NO_CACHE=true npx vitest run - "Why did this miss?" → walks through
el.getDebugInfo()and comparessimilarity/cacheSimilarityagainst configured thresholds
· · · 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-cache/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-cache folder from the GitHub repo testdriverai/testdriverai into my ~/.claude/skills/testdriver-cache/. 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-cache && cp -r /tmp/testdriverai/ai/skills/testdriver-cache/* ~/.claude/skills/testdriver-cache/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repository:
git clone https://github.com/testdriverai/testdriverai.git /tmp/testdriverai - Create the skill folder:
mkdir -p ~/.claude/skills/testdriver-cache - Copy the skill files:
cp -r /tmp/testdriverai/ai/skills/testdriver-cache/* ~/.claude/skills/testdriver-cache/ - Restart Claude Code and confirm
testdriver:cacheappears in your skill list. - In a project that uses the TestDriver SDK, ask something like "tune my cache thresholds" to verify it triggers.