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.
npx skills add https://github.com/cloudflare/workerd --skill bazel-test-hygiene
bazel test //... --nocache_test_results
Why: Bazel's action cache can serve stale test binaries even after you edit source files. Without --nocache_test_results, 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 --nocache_test_results. No exceptions.
Do NOT use --test_arg='-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.
A single test target passing does not mean you haven't broken something else. Fixes to shared code (queue.c++, standard.c++, common.h) can break tests in completely different directories.
Before claiming any fix is complete:
bazel test //... --nocache_test_results
Check the final summary line: Executed N out of N tests: N tests pass. All N must match. If any test fails, the fix is not done.
When writing a regression test for a bug fix, you MUST verify the test actually catches the bug:
bazel test //... --nocache_test_results — all tests pass (fix in place)bazel test //... --nocache_test_results — the new test(s) MUST failbazel test //... --nocache_test_results — all tests pass againIf step 2 passes (test doesn't fail without the fix), the test is not testing what you think. Go back and fix the test.
Do the red-green on the full suite, not just the one target. This catches two problems at once: (a) the regression test actually detects the bug, and (b) the fix doesn't break anything else.
| Don't | Do instead |
| ----------------------------------------- | --------------------------------------------------- |
| bazel test //target (no cache flag) | bazel test //target --nocache_test_results |
| --test_arg='-f' --test_arg='test name' | Run the full target, grep output for test name |
| Run one target, claim fix is done | Run //..., check all-pass summary |
| Claim "tests pass" from a previous run | Run fresh, read fresh output |
| Trust filter-based "PASSED" at face value | Check that the expected test names appear in output |
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Use when implementing any feature or bugfix, before writing implementation code
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
Expert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating quantitative trading strategies. Covers "beating ideas to death" methodology, parameter robustness testing, slippage modeling, bias prevention, and interpreting backtest results. Applicable when user asks about backtesting, strategy validation, robustness testing, avoiding overfitting, or systematic trading development.
Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental validation including binding assays, expression testing, thermostability measurements, enzyme activity assays, or protein sequence optimization. Also use for submitting experiments via API, tracking experiment status, downloading results, optimizing protein sequences for better expression using computational tools (NetSolP, SoluProt, SolubleMPNN, ESM), or managing protein design workflows with wet-lab validation.
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.
Take cloudflare/bazel-test-hygiene from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.