bazel-test-hygiene
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
With your agent
Install OMGSkills skill "cloudflare/workerd:bazel-test-hygiene" into this agent's normal skills directory: use the OMGSkills MCP get_skill tool, install only the pinned_install commit and path, verify SKILL.md against pinned_install.skill_md_sha, and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.
Manual command
git clone https://github.com/cloudflare/workerd /tmp/workerd && ln -s /tmp/workerd/.opencode/skills/bazel-test-hygiene ~/.claude/skills/bazel-test-hygiene
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.
