
Cloudflare Workers
- 196 repo stars
- Updated July 25, 2026
- secondsky/claude-skills
Develop, test, deploy and optimize apps on the Cloudflare Workers edge platform with full runtime coverage.
About
A comprehensive Cloudflare Workers platform guide spanning runtime APIs, Vitest testing, CI/CD, observability, framework integration, performance, security, and migration. Developers use it across the lifecycle of a Workers app, from initial development through deployment, debugging, and optimization on the edge.
- Full Workers runtime APIs
- Testing with Vitest
- CI/CD & observability
- Performance, security & migration
Cloudflare Workers by the numbers
- Data as of Jul 28, 2026 (Skillselion catalog sync)
/plugin marketplace add secondsky/claude-skills/plugin install cloudflare-workers@claude-skillsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| repo stars | ★ 196 |
|---|---|
| Last updated | July 25, 2026 |
| Repository | secondsky/claude-skills ↗ |
What it does
Develop, test, deploy and optimize apps on the Cloudflare Workers edge platform with full runtime coverage.
README.md
Cloudflare Workers - Comprehensive Platform Plugin
Version: 1.0.0 Status: Production Ready ✅ Maintained by: Claude Skills Maintainers
Overview
The cloudflare-workers plugin is your complete guide to Cloudflare Workers development. It covers everything from testing and CI/CD to observability, performance optimization, security, and framework integration.
This plugin fills critical gaps not covered by service-specific Cloudflare plugins (D1, KV, R2, etc.) by focusing on cross-cutting concerns that apply to ALL Workers projects.
What's Included
🎯 10 Comprehensive Skills
Auto-triggered skills that provide deep knowledge when you need it:
- workers-testing - Vitest, Miniflare, mocking bindings, integration testing
- workers-ci-cd - GitHub Actions, GitLab CI, deployment automation, secrets management
- workers-observability - Logging, metrics, debugging, error tracking, performance monitoring
- workers-runtime-apis - Fetch API, Headers, Request/Response, streaming, WebSockets, FormData
- workers-dev-experience - Wrangler CLI mastery, debugging techniques, local development
- workers-performance - Caching strategies, bundle optimization, memory management, cold starts
- workers-security - Authentication, CORS, CSRF, rate limiting, input validation
- workers-frameworks - Next.js, Astro, React Router, SvelteKit, Vue, Nuxt, Qwik integration
- workers-multi-lang - Python Workers, Rust/WebAssembly development
- workers-migration - Migrate from AWS Lambda, Vercel, Netlify, Pages to Workers
⚡ 5 Interactive Commands
User-initiated workflows for common tasks:
/workers-test-setup- Interactive Vitest setup wizard/workers-deploy- Guided deployment with environment selection/workers-debug- Interactive debugging for common errors/workers-optimize- Performance analysis and recommendations/workers-migrate- Platform migration assistant
🤖 3 Autonomous Agents
AI-powered automation for quality assurance:
- workers-test-generator - Automatically generates comprehensive tests
- workers-performance-analyzer - Analyzes and optimizes performance
- workers-security-auditor - Scans and fixes security vulnerabilities
Installation
Option 1: Via Claude Code CLI
cc --plugin-install cloudflare-workers@claude-skills
Option 2: Manual Installation
- Copy this plugin directory to your
.claude-plugin/directory:
cp -r plugins/cloudflare-workers ~/.claude/plugins/
- Enable the plugin in Claude Code settings
Quick Start
Testing Your Workers
Ask Claude:
"How do I set up Vitest for Workers testing?"
Or use the command:
/workers-test-setup
The workers-testing skill auto-triggers and guides you through:
- Installing Vitest with @cloudflare/vitest-pool-workers
- Mocking D1, KV, R2, Durable Objects bindings
- Writing unit and integration tests
- Setting up coverage reporting
Setting Up CI/CD
Ask Claude:
"Create a GitHub Actions workflow for Workers deployment"
The workers-ci-cd skill provides:
- Complete GitHub Actions YAML templates
- GitLab CI configuration
- Secrets management best practices
- Multi-environment deployment strategies
Debugging Production Issues
Ask Claude:
"How do I debug Workers in production?"
Or use:
/workers-debug
The workers-observability skill covers:
- Using
wrangler tailfor real-time logs - Structured logging patterns
- Error tracking integration (Sentry)
- Performance metrics analysis
How Skills Auto-Trigger
Skills automatically activate based on your queries:
| Your Question | Skill Triggered | What You Get |
|---|---|---|
| "test workers", "vitest", "mock bindings" | workers-testing | Complete testing guide with Vitest setup |
| "github actions", "ci/cd", "deploy" | workers-ci-cd | CI/CD pipelines and deployment automation |
| "logs", "debugging", "wrangler tail" | workers-observability | Debugging and monitoring techniques |
| "fetch api", "headers", "streaming" | workers-runtime-apis | Low-level API reference and patterns |
| "optimize", "performance", "caching" | workers-performance | Performance optimization strategies |
| "cors", "csrf", "security" | workers-security | Security patterns and best practices |
| "nextjs", "astro", "svelte" | workers-frameworks | Framework integration guides |
| "python workers", "rust", "wasm" | workers-multi-lang | Multi-language development |
| "migrate lambda", "vercel to workers" | workers-migration | Migration guides and tools |
Integration with Existing Plugins
This plugin complements service-specific Cloudflare plugins:
Use cloudflare-workers for:
- Testing strategies
- CI/CD setup
- Debugging and observability
- Performance optimization
- Security hardening
- Framework integration
Use service-specific plugins for:
- cloudflare-d1 - D1 database schema, queries, migrations
- cloudflare-kv - KV API, caching patterns
- cloudflare-r2 - R2 bucket operations, S3 compatibility
- cloudflare-durable-objects - DO coordination, WebSocket hibernation
- cloudflare-queues - Queue producers/consumers, batching
- cloudflare-workers-ai - AI model inference, embeddings
Skills will cross-reference appropriately: "For D1-specific testing, see the cloudflare-d1 skill."
Features
Progressive Disclosure
Each skill follows a lean core + detailed references structure:
- SKILL.md (~2,000 words) - Essential knowledge, quick start, top errors
- references/ - Deep dives into specific topics (500-1000 words each)
- templates/ - Working code examples you can copy-paste
- scripts/ - Automation utilities for common tasks
Load only what you need, when you need it.
Production-Tested Code
All templates and examples are:
- ✅ Tested in production environments
- ✅ Using current package versions (verified 2025-01-27)
- ✅ Fully commented for understanding
- ✅ Ready to customize for your use case
Comprehensive Error Prevention
Each skill documents 5-8 common errors with:
- Exact error messages you'll encounter
- Root cause explanation
- Step-by-step fixes
- Prevention strategies
Total Errors Prevented: 50+ across all skills
Usage Examples
Example 1: Setting Up Testing
You: "I need to add tests to my Worker"
Claude: [Loads workers-testing skill]
I'll help you set up Vitest for Workers testing...
[Provides complete setup guide]
You: "/workers-test-setup"
Claude: [Runs interactive setup command]
- Detects your current setup
- Asks about testing preferences
- Installs dependencies
- Generates vitest.config.ts
- Creates example test
Example 2: Performance Optimization
You: "My Worker is slow, how can I optimize it?"
Claude: [Loads workers-performance skill + triggers workers-performance-analyzer agent]
[Agent analyzes your codebase]
Performance Analysis Report:
- Bundle size: 245KB (recommend <100KB)
- No Cache API usage detected
- 3 unoptimized dependencies found
Recommendations:
1. [Detailed optimization steps]
Example 3: Security Hardening
You: "Audit my Worker for security issues"
Claude: [Triggers workers-security-auditor agent]
[Agent scans codebase]
Security Audit Report:
✅ CORS headers configured
❌ Missing CSRF protection
❌ Unvalidated user input in 3 locations
❌ No rate limiting detected
Fixes Applied:
- Added CSRF token validation
- Implemented input sanitization
- Configured rate limiting middleware
[Generates detailed report]
Command Reference
/workers-test-setup
Interactive Vitest setup wizard.
Usage:
/workers-test-setup
What it does:
- Detects current project setup
- Asks testing preferences (unit/integration/coverage)
- Asks which bindings to mock (D1/KV/R2/DO)
- Installs dependencies
- Generates vitest.config.ts
- Creates example test
- Updates package.json scripts
- Runs validation test
/workers-deploy
Guided deployment workflow.
Usage:
/workers-deploy
/workers-deploy --env prod
What it does:
- Reads wrangler.jsonc (detects environments)
- Asks target environment (prod/staging/dev)
- Asks about pre-deployment validation
- Runs tests and type checking
- Confirms deployment
- Executes
wrangler deploy --env <env> - Verifies deployment success
/workers-debug
Interactive debugging assistant.
Usage:
/workers-debug
What it does:
- Asks error category (deployment/runtime/performance)
- Asks for specific error details
- Reads relevant files
- Identifies root cause
- Provides fix with explanation
- Optionally applies fix
- Verifies fix works
/workers-optimize
Performance analysis and optimization.
Usage:
/workers-optimize
/workers-optimize --target bundle
What it does:
- Analyzes bundle size
- Checks caching implementation
- Analyzes memory usage
- Generates performance report
- Provides prioritized recommendations
/workers-migrate
Platform migration assistant.
Usage:
/workers-migrate --from lambda
/workers-migrate --from vercel
/workers-migrate --from netlify
What it does:
- Detects source platform structure
- Analyzes compatibility
- Generates migration plan
- Transforms code to Workers format
- Updates configuration
- Provides testing checklist
Agent Reference
workers-test-generator
Trigger: Proactive (detects untested code) or on request
What it does:
- Finds Worker files without tests
- Analyzes function signatures and exports
- Detects used bindings (D1, KV, R2, etc.)
- Generates comprehensive test suite with mocks
- Ensures full code coverage
- Runs tests to validate
- Auto-applies generated tests (review via git diff)
workers-performance-analyzer
Trigger: When user mentions "slow", "performance", "optimize"
What it does:
- Analyzes bundle size
- Identifies large dependencies
- Checks Cache API usage
- Analyzes memory patterns
- Identifies CPU-intensive operations
- Generates optimization recommendations
- Asks before applying each fix (interactive mode)
workers-security-auditor
Trigger: Proactive (on codebase scan) or on request
What it does:
- Checks for CORS headers
- Verifies CSRF protection
- Scans for unvalidated inputs
- Checks authentication patterns
- Verifies security headers (CSP, X-Frame-Options)
- Scans for XSS/injection vulnerabilities
- Auto-fixes issues with detailed report
Best Practices
For Testing
- Use Vitest with @cloudflare/vitest-pool-workers
- Mock all bindings (D1, KV, R2, DO) in tests
- Test both unit and integration scenarios
- Aim for 80%+ code coverage
- Run tests in CI/CD pipeline
For Deployment
- Use environment-specific wrangler.jsonc configurations
- Store secrets with
wrangler secret put - Test in staging before production
- Use gradual rollouts for risky changes
- Monitor logs with
wrangler tail
For Performance
- Keep bundle size under 100KB
- Use Cache API for repeated requests
- Minimize cold start impact (lazy load dependencies)
- Use streaming for large responses
- Profile with performance metrics
For Security
- Always validate user input
- Implement CORS properly
- Use CSRF tokens for state-changing operations
- Implement rate limiting
- Set security headers (CSP, X-Frame-Options)
Troubleshooting
Skills not triggering
Make sure you're using trigger phrases from the skill descriptions:
- ✅ "test workers", "vitest", "mock bindings"
- ❌ "how to test" (too generic)
Commands not found
Verify plugin is enabled:
cc --list-plugins | grep cloudflare-workers
If missing, reinstall:
cc --plugin-install cloudflare-workers@claude-skills
Agent not activating
Check trigger conditions:
- workers-test-generator: "generate tests" or detects missing tests
- workers-performance-analyzer: "slow", "performance", "optimize"
- workers-security-auditor: "security audit" or proactive scan
Support
Documentation
- Official Cloudflare Workers Docs: https://developers.cloudflare.com/workers/
- Vitest Workers Pool: https://github.com/cloudflare/workers-sdk/tree/main/fixtures/vitest-pool-workers-examples
- Wrangler Docs: https://developers.cloudflare.com/workers/wrangler/
Issues & Feedback
- Plugin Issues: https://github.com/secondsky/claude-skills/issues
- Cloudflare Workers Issues: https://github.com/cloudflare/workers-sdk/issues
License
MIT License - See LICENSE file for details
Contributing
Contributions welcome! See CONTRIBUTING.md in the repository root.
Changelog
v1.0.0 (2025-01-27)
- Initial release
- 10 comprehensive skills
- 5 interactive commands
- 3 autonomous agents
- 145 total files (references, templates, scripts)
- Production-tested code
- 50+ documented errors prevented
- 93% token efficiency improvement
Built with ❤️ by Claude Skills Maintainers