turnstile-spin

Set up Cloudflare Turnstile bot verification with widget creation and server-side siteverify.

Updated Jul 31, 2026
One-click install
npx skills add https://github.com/julianckt/adoptarun --skill turnstile-spin-julianckt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: turnstile-spin
Source: https://github.com/julianckt/adoptarun/tree/main/.agents/skills/turnstile-spin
Command: npx skills add https://github.com/julianckt/adoptarun --skill turnstile-spin-julianckt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Adding bot protection to forms and endpoints requires coordinating Cloudflare API credentials, widget creation, frontend embeds, and server-side token validation, which is error-prone when done manually. ## Core Features & Use Cases - End-to-end Turnstile wizard: Probes API token scope, creates the widget, embeds it at chosen form surfaces, and wires canonical siteverify into the existing backend handler. - Framework-specific snippets: Provides ready integration references for Next.js App Router, Next.js Pages Router, Astro, SvelteKit, Hugo, and vanilla HTML. - CAPTCHA migration: Detects existing reCAPTCHA or hCaptcha integrations and converts them to Turnstile, including token field and siteverify endpoint changes. - Use Case: A developer asks the agent to protect a signup form from bots; the skill creates the widget, gates the existing handler on siteverify success, action, and hostname, then validates with a real token and replay rejection. ## Quick Start Ask the agent to set up Cloudflare Turnstile bot protection on your signup form and let it run the guided wizard end to end.

Frequently Asked Questions about turnstile-spin

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Cloudflare Turnstile to an existing form?

Run the guided wizard: it probes your API token, creates a widget for your domains, embeds the cf-turnstile div in your form, and adds a siteverify check inside your existing backend handler. The handler logic stays unchanged, gated on success, action, and hostname.

How do I migrate from reCAPTCHA or hCaptcha to Turnstile?

The skill detects existing reCAPTCHA or hCaptcha code and switches to a migration plan. It replaces the script tag and widget div, renames the token field to cf-turnstile-response, and points the backend siteverify call at the Cloudflare endpoint.

Does Turnstile work with Next.js, Astro, and SvelteKit?

Yes, the skill ships framework-specific references for Next.js App Router, Next.js Pages Router, Astro, SvelteKit, Hugo, and vanilla HTML. Each reference includes the client-side widget embed and the matching server-side siteverify snippet.

Can Turnstile protect a pure static site with no backend?

No, siteverify is server-side by design, so a backend handler is required. For static sites you need a Cloudflare Pages Function, a Worker, or a form host with a server-side hook before the skill applies.

Why does siteverify return invalid-input-secret after setup?

The secret did not reach the backend environment. Re-check the TURNSTILE_SECRET value in your env file or secret manager, and for Workers run wrangler secret list to confirm the binding targets the correct script.