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

TestDriver Cache Tuning Reference

A reference skill for configuring and debugging TestDriver's screenshot-based cache to speed up AI test runs.

Dev & CodingIntermediate★ 243⑂ 37AI score 7/10Last updated: Sep 21, 2026

What it does

  • Gives Claude accurate knowledge of TestDriver SDK caching: screen-level pixel diff plus OpenCV template matching on the cached element crop.
  • Generates config code for cache.thresholds.find.screen, element, and assert with correct defaults and ranges.
  • Explains threshold resolution order (per-command option > legacy numeric arg > constructor config > hard-coded defaults) so changes are predictable.
  • Documents auto-generated cacheKey (first 16 hex chars of the test file's SHA-256), automatic invalidation, and cache partitioning by OS and resolution.
  • Helps diagnose misses via getDebugInfo() fields cacheHit, similarity, cacheSimilarity.

Who it's for

  • QA engineers and developers running TestDriver AI E2E tests who want fewer AI calls and faster suites.
  • Teams hitting flaky results because a cached element position is reused when it shouldn't be.
  • Anyone debugging poor cache reuse across CI machines with different OS or screen resolutions.

Examples

  1. "My login test rarely hits cache — how should I tune screen/element thresholds?" → guidance around the 0.05 / 0.8 defaults with ready-to-paste snippets.
  2. "Make just this assertion strict" → assert('dashboard loaded', { cache: { threshold: 0.01 }, cacheKey: 'dashboard-check' }).
  3. "Disable caching only in CI" → set TD_NO_CACHE=true or pass new TestDriver({ cache: false }).

· · · 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)
  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-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.

  1. Open a terminal.
  2. Clone the repo: git clone https://github.com/testdriverai/testdriverai.git
  3. Create the skill folder: mkdir -p ~/.claude/skills/testdriver-cache
  4. Copy the files: cp -r testdriverai/ai/skills/testdriver-cache/* ~/.claude/skills/testdriver-cache/
  5. Restart Claude Code and confirm testdriver:cache appears in your skills list.
  6. To use it for real work, install the SDK in your project (npm i testdriverai) and ask Claude to wire up new TestDriver({ cache: { ... } }) in your test file.