{"enrichment":{"faq":[{"a":"Cloudflare Workers Security recommends a layered approach: implement authentication (JWT or API keys) at entry points, validate all inputs rigorously, set restrictive security headers, enable rate limiting to prevent DoS, and use environment variables for secrets. The skill covers production patterns for each layer, from middleware setup to vulnerability prevention, ensuring your Workers APIs resist common attacks like injection, XSS, and unauthorized access.","q":"What are the security best practices for Cloudflare Workers?"},{"a":"Cloudflare Workers Security provides patterns for JWT verification and API key validation as middleware. Extract tokens from Authorization headers, verify signatures against your key material, and reject invalid requests early. The skill includes examples for both JWT and API key approaches, allowing you to choose based on your architecture. Secrets should be stored in environment variables, never hardcoded.","q":"How do I add authentication to Cloudflare Workers?"},{"a":"Cloudflare Workers Security covers safe CORS configuration by setting appropriate Access-Control headers in responses. Define allowed origins explicitly (avoid wildcards in production), specify permitted methods and headers, and handle preflight OPTIONS requests. The skill shows how to validate origin headers and configure credentials safely, preventing both access errors and security gaps from overly permissive policies.","q":"How can I fix CORS errors in Cloudflare Workers?"},{"a":"Cloudflare Workers Security implements rate limiting through request counting and sliding windows, rejecting excess traffic with 429 responses. Combine this with security headers and input validation to defend against DoS. The skill provides patterns for per-IP or per-user limits, durable objects for state, and integration with Cloudflare's edge protections to create defense-in-depth against volumetric and application-layer attacks.","q":"What rate limiting and DoS protection does Cloudflare Workers offer?"},{"a":"Cloudflare Workers Security emphasizes input validation\u2014sanitize and type-check all request data before use. Set Content-Security-Policy and X-Content-Type-Options headers to limit XSS impact. For database queries, use parameterized statements. The skill covers validation patterns, header configuration, and common injection vectors (SQL, command, template), helping you block malicious payloads at the Worker boundary before they reach downstream systems.","q":"How do I prevent XSS and injection attacks in Cloudflare Workers?"},{"a":"Cloudflare Workers Security stores secrets in environment variables and Durable Objects, never in code or logs. Rotate keys regularly, use short expiration windows, and audit access. The skill shows how to load secrets at runtime, validate API keys against a store, and implement key versioning. Combine with rate limiting per key and monitoring to detect compromised credentials early.","q":"How should I manage API keys and secrets securely in Workers?"}],"shadow_tags":["api-protection","token-verification","cross-origin-requests","abuse-prevention","data-validation","credential-storage","attack-mitigation","middleware-patterns","compliance-ready"],"summary_rewrite":"Cloudflare Workers Security delivers production patterns for protecting APIs and Workers through authentication verification, request rate limiting, input validation, and security headers. It covers JWT and API key validation, CORS configuration, and defends against common vulnerabilities like injection, XSS, and unauthorized access."},"files":[{"bytes":7447,"path":"plugins/cloudflare-workers/skills/cloudflare-workers-security/SKILL.md","sha256":"3d6ea071897ceaa61fc988eba01a8a666fe9ca83b2bedab20d63347dab818519","url":"https://skillfed.io/files/secondsky/claude-skills/cloudflare-workers-security/85e7999f/SKILL.md"}],"id":"secondsky/claude-skills/cloudflare-workers-security","links":{"html":"https://skillfed.io/secondsky/claude-skills/cloudflare-workers-security","md":"https://skillfed.io/secondsky/claude-skills/cloudflare-workers-security.md","repo":"https://github.com/secondsky/claude-skills"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":29,"language":"TypeScript","last_updated":"2026-07-25","license":"MIT","name":"cloudflare-workers-security","publisher":"secondsky","stars":196},"relations":{"similar":[{"id":"secondsky/claude-skills/cloudflare-workers-runtime-apis"},{"id":"personamanagmentlayer/pcl/cloudflare-expert"},{"id":"JosiahSiegel/claude-plugin-marketplace/nextjs-middleware"},{"id":"null-shot/cloudflare-skills/workers"},{"id":"hoodini/ai-agents-skills/cloudflare"},{"id":"patricio0312rev/skills/cors-configuration"},{"id":"hookdeck/webhook-skills/neon-webhooks"},{"id":"BagelHole/DevOps-Security-Agent-Skills/cloudflare-r2"},{"id":"daffy0208/ai-dev-standards/security-engineer"},{"id":"jmsktm/claude-settings/api-design"}]},"slug":{"owner":"secondsky","repo":"claude-skills","skill":"cloudflare-workers-security"},"version":"85e7999f"}
