comeonoliver/skillshub/cloudflare-workers-security
Claude Code and agent skill by comeonoliver/skillshub
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Cloudflare Workers security with authentication, CORS, rate limiting, input validation. Use for securing APIs, JWT/API keys, or encountering auth failures, CORS errors, XSS/injection vulnerabilities.
Install
npx vskill@latest install comeonoliver/skillshub/cloudflare-workers-securitySKILL.md
The same SKILL.md was published earlier as comeonoliver/skillshub/cloudflare-workers-security.
Cloudflare Workers Security
Comprehensive security patterns for protecting Workers and APIs.
Quick Security Checklist
Critical Rules
- Never trust client input - Validate and sanitize everything
- Use secure secrets - Store in Wrangler secrets, never in code
- Implement rate limiting - Protect against abuse
- Set security headers - Prevent common attacks
- Use CORS properly - Don't use
*in production
Top 10 Security Errors
| Vulnerability | Symptom | Prevention | |
|---|---|---|---|
| Missing auth | Unauthorized access | Verify tokens on every request | |
| SQL injection | Data breach | Use parameterized queries with D1 | |
| XSS | Script injection | Sanitize output, set CSP | |
| CORS misconfiguration | Blocked requests or open access | Configure specific origins | |
| Secrets in code | Exposed credentials | Use wrangler secret | |
| Missing rate limits | DoS vulnerability | Implement per-IP limits | |
| Weak tokens | Session hijacking | Use crypto.subtle for signing | |
| Missing HTTPS | Data interception | Enforce HTTPS redirects | |
| Insecure headers | Clickjacking, MIME attacks | Set security headers | |
| Excessive permissions | Blast radius | Principle of least privilege |
Authentication Patterns
JWT Verification
API Key Validation
Input Validation
With Zod
Security Headers
CORS Configuration
When to Load References
Load specific references based on the task:
- Implementing authentication? → Load
references/authentication.md - CORS issues? → Load
references/cors-security.md - Validating input? → Load
references/input-validation.md - Managing secrets? → Load
references/secrets-management.md - Rate limiting? → Load
references/rate-limiting.md - Security headers? → Load
references/security-headers.md
Templates
| Template | Purpose | Use When | |
|---|---|---|---|
templates/auth-middleware.ts | JWT/API key auth | Adding authentication | |
templates/cors-handler.ts | CORS middleware | Handling cross-origin | |
templates/rate-limiter.ts | Rate limiting | Preventing abuse | |
templates/secure-worker.ts | Full secure setup | Starting secure project |
Scripts
| Script | Purpose | Command | |
|---|---|---|---|
scripts/security-audit.sh | Audit security | ./security-audit.sh <url> |
Resources
- Security: https://developers.cloudflare.com/workers/platform/security/
- WAF: https://developers.cloudflare.com/waf/
- Rate Limiting: https://developers.cloudflare.com/workers/runtime-apis/bindings/rate-limit/
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/secondsky/claude-skills/cloudflare-workers-security/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/comeonoliver/skillshub/cloudflare-workers-security)