Cloudflare's Turnstile Spin lets AI coding agents set up bot protection

Cloudflare has launched Turnstile Spin, an agent-mediated way to implement its free Turnstile bot protection from start to finish. The tool lets a coding agent add the widget to a site's frontend and wire up server-side validation in the backend, with the user approving a plan first.
- Cloudflare launched Turnstile Spin, an agent-mediated end-to-end setup of its free Turnstile bot protection.
- Spin handles fresh installs, fixes widgets lacking backend validation, and migrates from other CAPTCHA providers.
- Application code is not sent to Cloudflare; the user's own agent, such as Claude Code, Cursor or Codex, makes approved changes locally.
- Users can start from the dashboard, Wrangler, or a public skill URL pasted into an agent.
- Since July, more than 65,000 successful Spin widget creations have been recorded, according to Cloudflare.
Why Cloudflare built Spin
Cloudflare introduced Turnstile in 2023 as a privacy-first, client-side challenge that never asks a visitor to solve a puzzle. According to the company, it is free to use and works on any site, with no need to proxy traffic through Cloudflare.
Setting it up has required two steps and some knowledge of frontend and backend development. First, developers modify frontend code to render the Turnstile widget, which lets Cloudflare run the client-side challenges and issue a token. Second, they POST that token to the Siteverify API, which verifies it and returns metadata about whether the visitor passed or failed. The site can then act on the result, for example by gating a login button until the challenge is solved.
Cloudflare says Turnstile now handles about three billion verifications on a typical weekday, and that in one recent week more than 23,000 accounts created a new widget in the dashboard. The company argues that demand for simple bot protection reaches well beyond people who write backend code daily, and that AI raises the stakes by helping more people build applications while giving attackers more ways to automate abuse.
How Turnstile Spin works
Spin turns the two-part setup into a guided workflow with a coding agent. The user chooses where protection should apply, and the agent finds the relevant frontend and backend code, proposes a plan and waits for approval. It then completes both sides of the integration together.
According to Cloudflare, Spin does not send application code to Cloudflare or ask Cloudflare to change it remotely. The agent the user already works with, such as Claude Code, Cursor or Codex, makes the approved changes inside the codebase. The only new resource in the Cloudflare account is the Turnstile widget, and validation stays in the user's backend.
Spin adapts to one of three situations it finds in a codebase:
- Fresh install: with no CAPTCHA in place, the agent embeds the widget on the frontend and wires Siteverify into the backend from scratch.
- Widget recovery: Cloudflare monitors Siteverify calls for each widget, and any widget with no server-side validation gets a "Fix with Spin" banner in the dashboard. The agent uses the same secret and adds the missing backend step while the widget keeps serving traffic.
- Migration from CAPTCHA: the agent detects existing markers, proposes a substitution plan and applies it after approval. Cloudflare notes that its existing Turnstile migration paths in the docs still cover tool-specific details.
Ways to start and early numbers
Users can start Spin from the Cloudflare dashboard, from Wrangler, or by pasting a public skill URL into their agent. Cloudflare says people will typically combine the three: start in the dashboard, paste the skill into the agent, and let the agent use Wrangler to carry out the steps. To check an existing setup, users can open the Turnstile page in their account, where a widget that has served traffic without backend validation shows a "Fix with Spin" action.
Cloudflare reports that since Spin's release in July, the dashboard has recorded more than 65,000 successful Spin widget creations, and developers have copied the generated prompt more than 30,000 times. The company reads this as evidence that bringing Turnstile into AI workflows meets a real need for builders.
What it means for site owners
For people building with AI coding agents, Spin aims to remove the need to understand both halves of the Turnstile integration. Cloudflare says someone without backend experience can finish the setup correctly, while an experienced developer can skip repetitive work and catch missing steps.
Turnstile remains free for everyone, according to Cloudflare, and people without a Cloudflare account can create one with no further setup. The company points users to its documentation for details and invites feedback.
Cloudflare: Agents can now set up your website’s security with Turnstile Spin

