turnstile-spin
Skill by cloudflare
Sets up, repairs, or migrates Cloudflare Turnstile bot verification in an existing frontend and backend. It is for developers who want to protect forms and endpoints from bots.
Install turnstile-spin
Built from the published package, never by AI.
git clone --depth 1 https://github.com/cloudflare/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/skills/turnstile-spin ~/.claude/skills/turnstile-spinRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/cloudflare/skills /tmp/skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/skills/skills/turnstile-spin ~/.gemini/antigravity-cli/skills/turnstile-spinAntigravity 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
Turnstile Spin is an agent skill that turns a request to set up Cloudflare Turnstile into an end-to-end integration. It creates a Turnstile widget through the Cloudflare API, embeds it at the chosen points in the existing frontend, and adds a server-side Siteverify call to the existing backend handler. If an existing CAPTCHA such as reCAPTCHA or hCaptcha is detected, it switches to a migration plan.
The agent follows a guided wizard. It checks the API token and account scope, scans the codebase for the frontend framework and backend handler, and asks for confirmation before irreversible steps. It stores the secret in the user's own secret store and validates the result with a real request and a token replay check. It is aimed at developers who need bot protection on signups, logins, contact forms, or other user-triggered endpoints.
Written from the project's SKILL.md and checked against it.
What it can do
- Auth and scope checkChecks the Cloudflare API token and account before any changes are made.
- Codebase scanDetects the frontend framework, backend handler location, and any existing CAPTCHA.
- Widget creationCreates a managed Turnstile widget for the approved domains.
- Frontend embedAdds the widget at each chosen insertion point, with references for several frameworks.
- Server-side SiteverifyAdds a check that requires success, the expected action, and an approved hostname.
- Secret storageStores TURNSTILE_SECRET in the user's env or secret manager instead of chat.
- CAPTCHA migrationPlans a move from reCAPTCHA or hCaptcha to Turnstile.
- ValidationSends a real token request and checks that replaying the token is rejected.
What you need
- Cloudflare account
- Cloudflare API token with Account.Turnstile:Edit permission
- curl and jq
- Wrangler, optional, at a user-approved path
Try asking
- Set up Turnstile on my signup form and wire up the backend check.
- Migrate my login form from hCaptcha to Turnstile.
- Add Turnstile verification to my contact form endpoint and validate it.
Good to know
- The user must create the Cloudflare API token with Account.Turnstile:Edit.
- Wrangler is never installed automatically during the flow.
- If the backend cannot be run, destination validation is reported as pending.
- Wrangler login is not used unless its OAuth scope includes Turnstile edit.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/turnstile-spin/SKILL.md, skills/turnstile-spin/scripts/auth-probe.sh, skills/turnstile-spin/scripts/persist-skill.sh, skills/turnstile-spin/scripts/validate.sh, skills/turnstile-spin/scripts/widget-create.sh, skills/turnstile-spin/tests/test_persist_skill.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
README.md4 KB -
SKILL.md28 KB -
references/astro.md6 KB -
references/hugo.md4 KB -
references/nextjs-app.md7 KB
Show all 15 files
-
references/nextjs-pages.md3 KB -
references/skill-feedback.md3 KB -
references/sveltekit.md5 KB -
references/vanilla-html.md6 KB -
scripts/auth-probe.sh11 KB -
scripts/persist-skill.sh4 KB -
scripts/validate.sh4 KB -
scripts/widget-create.sh4 KB -
tests/test_persist_skill.py3 KB -
tests/validation.md3 KB
Alternatives to turnstile-spin
All alternatives →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
Compare with function_health, windows-privilege-escalation or github-actions-advanced
turnstile-spin: common questions
Does the skill need my API token in chat?
No. The skill asks the user to export the token or save it to a user-only file, and tells the user not to paste it into chat.
Can it migrate from reCAPTCHA or hCaptcha?
Yes. If an existing CAPTCHA is detected, the skill switches to a migration plan instead of the standard setup.
Can localhost be used in production?
Localhost and 127.0.0.1 can be registered for local use, but they must never appear in a production backend's expected-hostname allowlist.
How do I install turnstile-spin?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is turnstile-spin free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is turnstile-spin safe to use?
It scores 93 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 turnstile-spin?
Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.
