# add-autogate

> Claude/Codex skill by [@cloudflare](https://omgskills.com/library/cloudflare/index.md) · 8.4k stars · Updated 2026-08-04

Step-by-step guide for adding a new autogate to workerd for gradual rollout of risky changes, including enum registration, string mapping, usage pattern, and testing.

## Install

```sh
git clone https://github.com/cloudflare/workerd /tmp/workerd && ln -s /tmp/workerd/.opencode/skills/add-autogate ~/.claude/skills/add-autogate
```

## From README

Adding an Autogate Autogates enable gradual rollout of risky code changes independent of binary releases. Unlike compatibility flags (which are permanent, date-based behavioral changes), autogates are temporary gates that can be toggled on/off via internal tooling during rollout, then removed once the change is stable. When to use an autogate vs a compat flag | Use an autogate when... | Use a compat flag when... | | --------------------------------------------- | ------------------------------------------ | | Rolling out a risky internal change gradually | Changing user-visible behavior permanently | | You need a kill switch during rollout | The change is tied to a compatibility date | | The gate will be removed once stable | Users need to opt in or out explicitly | Autogates and compat flags are separate mechanisms — an autogate does not become a compat flag. Step 1: Add the enum value Edit src/workerd/util/autogate.h.

## Links

- HTML page: https://omgskills.com/skills/cloudflare/workerd/add-autogate/
- GitHub: https://github.com/cloudflare/workerd
- Author: [@cloudflare](https://omgskills.com/library/cloudflare/index.md)

## More from this repo

- [bazel-test-hygiene](https://omgskills.com/skills/cloudflare/workerd/bazel-test-hygiene/index.md) — Mandatory rules for running bazel tests during development.
   - [@cloudflare](https://omgskills.com/library/cloudflare/index.md) · 8.7k stars
- [commit-categories](https://omgskills.com/skills/cloudflare/workerd/commit-categories/index.md) — Commit categorization rules for changelogs and "what's new" summaries.
   - [@cloudflare](https://omgskills.com/library/cloudflare/index.md) · 8.7k stars
- [dad-jokes](https://omgskills.com/skills/cloudflare/workerd/dad-jokes/index.md) — After completing any task that took more than ~5 tool calls, or after long-running builds/tests finish, load this skill...
   - [@cloudflare](https://omgskills.com/library/cloudflare/index.md) · 8.7k stars
