SkillsReviewed · fcakyon

Turnstile Spin

Turnstile Spin is a coding-agent skill for developers adding Cloudflare bot verification to existing forms, but it requires an existing backend. It combines agent instructions, shell helpers and framework examples for widget setup, secret storage and server-side verification; several examples need adaptation to match the main instructions.

Researched 17 Nov 2026

In short.

Turnstile Spin is a coding-agent skill for developers protecting existing web forms with Cloudflare Turnstile, but it needs an existing backend and careful review of its examples. It describes widget creation, existing-widget recovery and CAPTCHA migration, with server checks for token validity, action and frontend hostname. The main instructions contain stronger error handling than the framework examples, and its persistence helper downloads an unpinned upstream bundle. Nothing was executed, so integration correctness, compatibility and bot-blocking effectiveness are unknown.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes all 15 captured files under plugins/cloudflare-skills/skills/turnstile-spin at revision b4876aac9566bfd66378237c244a285e09310d2f, plus the repository-root LICENSE and the skill's Apache-2.0 declaration. Other repository resources, the separate cloudflare/skills checkout, hosted prompt and linked product documentation are outside the supplied contents. The original repository identity and immutable revision are retained. No scripts, tests, installation steps, API calls or application journeys were executed; runtime compatibility, deployed verification and bot-blocking effectiveness remain unverified.

The overview

Identity

Turnstile Spin is a directory-based skill that a coding assistant loads to set up, repair or migrate Cloudflare Turnstile integrations. SKILL.md defines the procedure; companion files provide shell helpers, framework examples and validation cases.

The captured resource is the turnstile-spin folder in fcakyon/claude-codex-settings at revision b4876aac9566bfd66378237c244a285e09310d2f [https://github.com/fcakyon/claude-codex-settings/tree/b4876aac9566bfd66378237c244a285e09310d2f/plugins/cloudflare-skills/skills/turnstile-spin]. Its README identifies cloudflare/skills as the upstream installation source. Exact equivalence between this captured copy and that separate repository is unknown.

Assessment

The useful design choice is to place verification before an existing handler's business logic. The skill also requires matching the token's action and frontend hostname, handling single-use tokens and keeping secrets out of browser code. These are concrete integration requirements that a widget-only example would leave unresolved.

It is a useful starting point for supervised implementation. Its written procedure and examples have inconsistencies, and its helper validation cannot establish that the deployed handler works. No successful installation, backend request, replay rejection or security outcome is demonstrated by the supplied evidence.

Users

The intended users are developers working with a coding assistant on signup, login, contact, subscription or similar requests that already have a server-side handler. References cover vanilla HTML, Next.js App Router, Next.js Pages Router, Astro, SvelteKit and Hugo.

Beginners receive a guided sequence, but still need to identify their Cloudflare account, domains, backend and secret destination. Experienced developers can adapt the verification contract to other backends. A purely static form without a server-side verification destination falls outside the main skill's supported setup flow.

Capabilities

The procedure covers Cloudflare authorization, domain selection, form discovery, action-to-handler mapping, managed-widget creation, frontend embedding and server-side Siteverify integration. Separate paths address existing widgets and migration from reCAPTCHA or hCaptcha. reCAPTCHA Enterprise migration is explicitly excluded from automatic migration.

Four helpers handle authorization probing, widget creation, metadata and secret validation, and skill persistence. Framework references illustrate native form submission and same-page token resets. A separate feedback reference describes reporting skill problems while excluding credentials and private project data from public issues.

Using it

Requirements

The helper workflow uses Bash, curl and Python 3; validation additionally requires jq, and persistence requires Git. It needs network access to Cloudflare APIs, with GitHub access for the documented bundle installation and persistence paths. Cloudflare authorization requires an API token with Account.Turnstile:Edit for the target account.

An explicit account ID can avoid Wrangler-based account enumeration. Where Wrangler is used, the instructions require an approved canonical executable outside the project and an exact version match. Existing-widget secret recovery specifically requires Wrangler 4.109.0 or later. Compatibility with current Wrangler and framework releases is unknown.

The application needs an existing backend, a server-only secret destination and deployment-specific frontend hostname configuration. Local env files must be ignored by Git before secret writes. Production backend hostname lists must exclude localhost and 127.0.0.1.

Mechanism

The browser renders a widget using its public sitekey and submits the resulting token to the application's existing backend. That backend sends the token and server-held secret to Cloudflare Siteverify [https://challenges.cloudflare.com/turnstile/v0/siteverify]. The intended contract allows existing handler logic to continue only after successful verification with the expected action and an allowed frontend hostname.

Tokens are single-use. Same-page submissions retain each widget's identifier and reset that widget after request completion so retries obtain a fresh token. Native forms that navigate away do not need the same reset handling.

The validation helper checks widget metadata, matches the supplied secret to the sitekey and submits a deliberately invalid token. Its expected error response provides a credential check; it does not exercise the application's protected handler. The authorization helper always exits with status zero, so an agent must inspect its JSON status rather than treating process completion as authorization success.

Setup

The README describes cloning cloudflare/skills and linking the turnstile-spin directory into an assistant's skill directory. SKILL.md alone is insufficient for the bundled workflow because it invokes companion scripts and references. A hosted single-file alternative fetches those dependencies on demand and cannot use the bundle persistence helper.

The setup dialogue confirms domains, protected surfaces and their actions before integration. Existing-widget recovery additionally requires confirmation of the exact account, sitekey, executable version and secret destination before retrieval. Secrets are intended to pass through shell variables and standard input into the application's approved secret store without appearing in chat or command arguments.

The persistence helper fetches the current cloudflare/skills repository without pinning a revision. A persisted installation can therefore differ from the captured version described here.

Example

For an existing Next.js signup handler, the intended adaptation adds a widget with the action signup and forwards its token alongside the handler's existing form data. The server uses TURNSTILE_SECRET and a production hostname list such as accounts.example.com, verifies the token and action, then continues the existing signup logic. A same-page form resets its own widget after completion. Acceptance would require one successful request with a fresh real token followed by rejection of a replay. This is an illustrative application of the instructions; it was not implemented or run.

Assessment & evidence

Limitations

The framework handlers omit safeguards present in the main JavaScript example, including its explicit timeout, network and JSON error handling, and complete token length checks. The main example itself uses a truthiness check for success despite the written requirement for success === true. These differences need reconciliation when adapting the code.

The Next.js App Router fetch example renders an email input but sends only the token. Copying that example directly would omit the email from its request. Real integrations must preserve the existing form fields and business logic.

There is an internal scope conflict for static sites: SKILL.md requires an existing backend and prohibits adding infrastructure, while the vanilla HTML reference suggests adding a Pages Function or Worker when no backend exists. Those suggestions exceed the main wizard's stated boundary.

The authorization probe sends an intentionally invalid widget-creation request. If the API unexpectedly creates a widget, the script attempts deletion; a failed deletion is reported to stderr without necessarily preventing an ok authorization status. This probe can therefore have side effects. Separately, metadata validation checks that expected domains are present but does not reject additional configured domains.

Reasoning

The skill's value is in coordinating details across the browser, backend, Cloudflare account and secret store. Action and hostname checks connect a token to the intended surface, while real-token and replay checks address behavior that metadata inspection cannot establish.

It is a reasonable fit when an existing backend and supervised coding-agent workflow are already available. The inconsistent examples increase the need for developer review. The evidence supports an integration design, but provides no measurements of setup time, bot rejection, false positives, accessibility or production reliability.

Alternatives

The README offers a hosted prompt for assistants without an installed bundle [https://developers.cloudflare.com/turnstile/spin/prompt.md]. It describes equivalent behavior with on-demand dependency fetching, but the hosted file's contents and equivalence are not established by the supplied evidence.

Developers can also consult the linked server-side validation documentation [https://developers.cloudflare.com/turnstile/get-started/server-side-validation/index.md]. For an existing Pages Functions backend, the skill points to a Turnstile plugin [https://developers.cloudflare.com/pages/functions/plugins/turnstile/index.md]. These linked resources were not supplied in full, so their current behavior, compatibility and comparative costs are unknown.

Evidence

The supplied material contains the skill instructions, README, seven references, four shell helpers, two test-related files and the repository license. These support descriptions of the intended workflow and observable source behavior.

The Python tests use a local Git stub and cover persistence into new or empty directories, preserving nonempty destinations and reporting copy failures. The validation document specifies additional checks but supplies no execution results. Nothing was executed: live API behavior, framework compilation, secret delivery, successful backend verification and replay rejection remain unverified.

Access & freshness

Costs

The source license grants no-charge rights to use and redistribute the covered work under its conditions. The evidence provides no prices or usage limits for Cloudflare Turnstile, coding assistants, model APIs or backend hosting. Total operating cost and any cost savings are unknown.

Rights

SKILL.md declares Apache-2.0, and the captured repository LICENSE contains the Apache License 2.0 terms. These permit use, modification and redistribution subject to conditions including providing the license, retaining applicable notices, marking modified files and carrying relevant NOTICE attributions if supplied.

The license includes a conditional patent grant, does not grant general trademark permission and provides the work without warranty. It does not establish rights or service terms for Cloudflare APIs, hosted documentation or coding-assistant services; those terms are not assessed.

Freshness

The supplied snapshot was captured on 17 November 2026 at revision b4876aac9566bfd66378237c244a285e09310d2f. The capture date does not establish the last maintenance or release date. Current Cloudflare API responses, Wrangler commands and framework compatibility are unknown. The README installation recipes and persistence helper fetch upstream content without pinning this captured revision, so subsequent installations may contain different instructions or code.

Actions

Before adoption, identify the existing protected handler, exact production hostnames and supported secret destination. Retain a known bundle revision and reconcile the framework example with the main verification contract, including strict success checks, token validation, bounded requests, error handling and preservation of existing form data.

Before relying on the integration, exercise the actual backend with a fresh real token and verify replay rejection. Also check rejection of missing tokens, unexpected actions and hostnames, plus same-page retry resets. Widget metadata checks and the presence of a secret binding alone do not establish that the destination uses the correct secret.

Evidence for this report

LICENSEnotice · checked 2026-11-17