omgskills Get the Mac app
Skill

bazel-test-hygiene

@cloudflare 8.4k stars Updated 2026-07-28 Author match: High

Mandatory rules for running bazel tests during development. Load this skill before running any bazel test command, especially when validating fixes or verifying regression tests. Prevents false confidence from cached results, filter flags that silently match nothing, and partial test runs that miss breakage.

Install

Install this Claude and Codex skill with the command below. The command stays visible even when copy support is unavailable.

Install command
git clone https://github.com/cloudflare/workerd /tmp/workerd && ln -s /tmp/workerd/.opencode/skills/bazel-test-hygiene ~/.claude/skills/bazel-test-hygiene

View on GitHub

From README

Bazel Test Hygiene The Three Rules Always disable caching Why: Bazel's action cache can serve stale test binaries even after you edit source files. Without --nocachetestresults, you may be running the OLD binary and seeing OLD results. This is not hypothetical — it has caused real false-positive/false-negative confusion in this repo. Always include --nocachetestresults. No exceptions. Keep it simple — no filter flags Do NOT use --testarg='-f' or similar filter flags to run individual test cases. Why: KJ test's -f flag silently passes when zero tests match. If you typo the filter or the test name changes, bazel reports "PASSED" with zero tests actually run. This gives completely false confidence. Run the full test target. If you need to check a specific test, look for its name in the full output. If the full suite is too slow, run the specific test target (e.g., //src/workerd/api:streams/standard-test@), not a filtered subset within a target.

More from this repo