wd-test-format
Skill by cloudflare
Guides authors writing .wd-test Cap'n Proto configs and test JavaScript for workerd's test framework. Covers bindings, module types, wd_test Bazel rules and test variants.
Install wd-test-format
Built from the published package, never by AI.
git clone --depth 1 https://github.com/cloudflare/workerd /tmp/workerd && mkdir -p ~/.claude/skills && cp -r /tmp/workerd/.opencode/skills/wd-test-format ~/.claude/skills/wd-test-formatRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/cloudflare/workerd /tmp/workerd && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/workerd/.opencode/skills/wd-test-format ~/.gemini/antigravity-cli/skills/wd-test-formatAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is a guide for writing .wd-test files, the Cap'n Proto configs that define test workers for workerd's test framework. It covers the basic config structure, module types such as ES, JSON, WebAssembly and CommonJS modules, and bindings that expose services, text, data, KV namespaces and Durable Object namespaces through env. It also shows how test files export named objects with a test() method.
The guide explains how wd_test() rules are declared in BUILD.bazel and how each test gets three variants with different compatibility dates and flags. Advanced topics such as Durable Objects, multi-service setups, outbound network access and TypeScript sources are kept in a reference file that the guide says must be read first. It is aimed at developers writing or reviewing tests in the workerd repository.
Written from the project's SKILL.md and checked against it.
What it can do
- Module typesShows how to declare ES, JSON, WebAssembly and CommonJS modules in a test config.
- BindingsExplains text, data, JSON, service, KV and Durable Object namespace bindings available via env.
- Test JavaScript structureDescribes exporting named test objects with a test() method, with controller and env arguments.
- BUILD.bazel integrationShows how to declare wd_test() rules with args, data and fixture files.
- Test variantsLists the @, @all-compat-flags and @all-autogates variants generated for each wd_test().
- ScaffoldingDescribes using just new-test to create the config, JS file and BUILD.bazel rule.
What you need
- workerd repository with its Bazel build
- Bazel
- just command runner
- Cap'n Proto config schema (workerd.capnp)
Try asking
- Write a .wd-test config with a KV binding and a Durable Object namespace
- Scaffold a new workerd test at //src/workerd/api/tests:my-test
- Add a wd_test rule to BUILD.bazel with fixture files and --experimental
Good to know
- compatibilityDate should not be used in wd-test; use specific compatibility flags instead.
- Experimental features require the --experimental argument.
- Advanced patterns such as Durable Objects and multi-service configs are in a separate reference file.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .opencode/skills/wd-test-format/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md5 KB -
reference/advanced-configs.md3 KB
Alternatives to wd-test-format
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
wd-test-format: common questions
What is a .wd-test file?
A .wd-test file is a Cap'n Proto config that defines test workers for workerd's test framework. It uses the schema in src/workerd/server/workerd.capnp.
Which compatibility date do wd-test variants use?
The default variant uses compat date 2000-01-01, the all-compat-flags variant uses 2999-12-31, and the all-autogates variant uses 2000-01-01. Each wd_test() generates all three.
How do I create a new workerd test?
The guide says to run just new-test with the target path. This creates the .wd-test file, a .js test file and appends a wd_test() rule to BUILD.bazel.
How do I install wd-test-format?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is wd-test-format free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is wd-test-format safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to wd-test-format?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
