Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
Claude Skills Maintainers avatar

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-skills

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
repo stars196
Last updatedJuly 25, 2026
Repositorysecondsky/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:

  1. workers-testing - Vitest, Miniflare, mocking bindings, integration testing
  2. workers-ci-cd - GitHub Actions, GitLab CI, deployment automation, secrets management
  3. workers-observability - Logging, metrics, debugging, error tracking, performance monitoring
  4. workers-runtime-apis - Fetch API, Headers, Request/Response, streaming, WebSockets, FormData
  5. workers-dev-experience - Wrangler CLI mastery, debugging techniques, local development
  6. workers-performance - Caching strategies, bundle optimization, memory management, cold starts
  7. workers-security - Authentication, CORS, CSRF, rate limiting, input validation
  8. workers-frameworks - Next.js, Astro, React Router, SvelteKit, Vue, Nuxt, Qwik integration
  9. workers-multi-lang - Python Workers, Rust/WebAssembly development
  10. 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

  1. Copy this plugin directory to your .claude-plugin/ directory:
cp -r plugins/cloudflare-workers ~/.claude/plugins/
  1. 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 tail for 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:

  1. Detects current project setup
  2. Asks testing preferences (unit/integration/coverage)
  3. Asks which bindings to mock (D1/KV/R2/DO)
  4. Installs dependencies
  5. Generates vitest.config.ts
  6. Creates example test
  7. Updates package.json scripts
  8. Runs validation test

/workers-deploy

Guided deployment workflow.

Usage:

/workers-deploy
/workers-deploy --env prod

What it does:

  1. Reads wrangler.jsonc (detects environments)
  2. Asks target environment (prod/staging/dev)
  3. Asks about pre-deployment validation
  4. Runs tests and type checking
  5. Confirms deployment
  6. Executes wrangler deploy --env <env>
  7. Verifies deployment success

/workers-debug

Interactive debugging assistant.

Usage:

/workers-debug

What it does:

  1. Asks error category (deployment/runtime/performance)
  2. Asks for specific error details
  3. Reads relevant files
  4. Identifies root cause
  5. Provides fix with explanation
  6. Optionally applies fix
  7. Verifies fix works

/workers-optimize

Performance analysis and optimization.

Usage:

/workers-optimize
/workers-optimize --target bundle

What it does:

  1. Analyzes bundle size
  2. Checks caching implementation
  3. Analyzes memory usage
  4. Generates performance report
  5. Provides prioritized recommendations

/workers-migrate

Platform migration assistant.

Usage:

/workers-migrate --from lambda
/workers-migrate --from vercel
/workers-migrate --from netlify

What it does:

  1. Detects source platform structure
  2. Analyzes compatibility
  3. Generates migration plan
  4. Transforms code to Workers format
  5. Updates configuration
  6. Provides testing checklist

Agent Reference

workers-test-generator

Trigger: Proactive (detects untested code) or on request

What it does:

  1. Finds Worker files without tests
  2. Analyzes function signatures and exports
  3. Detects used bindings (D1, KV, R2, etc.)
  4. Generates comprehensive test suite with mocks
  5. Ensures full code coverage
  6. Runs tests to validate
  7. Auto-applies generated tests (review via git diff)

workers-performance-analyzer

Trigger: When user mentions "slow", "performance", "optimize"

What it does:

  1. Analyzes bundle size
  2. Identifies large dependencies
  3. Checks Cache API usage
  4. Analyzes memory patterns
  5. Identifies CPU-intensive operations
  6. Generates optimization recommendations
  7. Asks before applying each fix (interactive mode)

workers-security-auditor

Trigger: Proactive (on codebase scan) or on request

What it does:

  1. Checks for CORS headers
  2. Verifies CSRF protection
  3. Scans for unvalidated inputs
  4. Checks authentication patterns
  5. Verifies security headers (CSP, X-Frame-Options)
  6. Scans for XSS/injection vulnerabilities
  7. Auto-fixes issues with detailed report

Best Practices

For Testing

  1. Use Vitest with @cloudflare/vitest-pool-workers
  2. Mock all bindings (D1, KV, R2, DO) in tests
  3. Test both unit and integration scenarios
  4. Aim for 80%+ code coverage
  5. Run tests in CI/CD pipeline

For Deployment

  1. Use environment-specific wrangler.jsonc configurations
  2. Store secrets with wrangler secret put
  3. Test in staging before production
  4. Use gradual rollouts for risky changes
  5. Monitor logs with wrangler tail

For Performance

  1. Keep bundle size under 100KB
  2. Use Cache API for repeated requests
  3. Minimize cold start impact (lazy load dependencies)
  4. Use streaming for large responses
  5. Profile with performance metrics

For Security

  1. Always validate user input
  2. Implement CORS properly
  3. Use CSRF tokens for state-changing operations
  4. Implement rate limiting
  5. 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

Issues & Feedback

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

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.