cloudflare-turnstile

Integrate Cloudflare Turnstile with server-side Siteverify validation.

961|99|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/jezweb/claude-skills --skill cloudflare-turnstile
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-turnstile
Source: https://github.com/jezweb/claude-skills/tree/main/skills/cloudflare-turnstile
Command: npx skills add https://github.com/jezweb/claude-skills --skill cloudflare-turnstile

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill eliminates the complexity of implementing secure bot protection, preventing 12 common integration errors while saving 65-70% development time.

Core Features & Use Cases

  • Server-Side Validation: Mandatory Siteverify API integration to prevent security vulnerabilities.
  • Framework Integration: Ready-to-use templates for React, Next.js, Hono, and Cloudflare Workers.
  • Use Case: When you need to protect a login form from automated attacks, this Skill provides complete client-side widget setup and server-side token validation.

Quick Start

Add bot protection to your contact form using Cloudflare Turnstile with automatic server-side validation.

Frequently Asked Questions about cloudflare-turnstile

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

FAQPage Schema
How do I protect forms from bot submissions using Cloudflare Turnstile?

Cloudflare Turnstile protects forms from automated bot attacks by embedding an invisible or visible widget on the client side and validating tokens server-side via the Siteverify API. Integrate the widget into your form, capture the token on submission, and verify it server-side using your secret key to block bots while allowing legitimate users through.

Can I use Cloudflare Turnstile with React and Next.js?

Yes, Cloudflare Turnstile works with React, Next.js, and Hono frontends. The Skill provides ready-to-use templates for each framework, handling widget setup, token management, and integration with server-side validation endpoints to streamline implementation.

What's required for server-side validation with Turnstile?

Server-side validation requires a mandatory POST request to Cloudflare's Siteverify API using your secret key and the client token. Secure key handling, test keys for development, and proper error handling ensure robust protection against spoofed tokens.

How do I migrate from reCAPTCHA to Cloudflare Turnstile?

Migration involves replacing reCAPTCHA widget setup with Turnstile's sitekey and configuring server-side validation via Siteverify instead of reCAPTCHA's verification endpoint. The Skill covers the complete migration pattern, including token lifecycle and callback configuration.

Does Turnstile work with Cloudflare Workers?

Yes, Cloudflare Turnstile integrates with Cloudflare Workers backends for server-side token validation. The Skill includes templates for Workers-based validation endpoints, enabling seamless bot protection in edge-deployed applications.

What CSP considerations apply when using Turnstile?

Cloudflare Turnstile requires Content Security Policy directives to load scripts and connect to Cloudflare's API. The Skill addresses CSP configuration requirements to prevent widget failures while maintaining security boundaries.