comeonoliver/skillshub/cloudflare-workers-performance
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 performance optimization with CPU, memory, caching, bundle size. Use for slow workers, high latency, cold starts, or encountering CPU limits, memory issues, timeout errors.
Install
npx vskill@latest install comeonoliver/skillshub/cloudflare-workers-performanceSKILL.md
The same SKILL.md was published earlier as elogic360/software-factory/cloudflare-workers-performance.
Cloudflare Workers Performance Optimization
Techniques for maximizing Worker performance and minimizing latency.
Quick Wins
Critical Rules
- Stay under CPU limits - 10ms (free), 30ms (paid), 50ms (unbound)
- Minimize cold starts - Keep bundles < 1MB, avoid dynamic imports
- Use Cache API - Cache responses at the edge
- Stream large payloads - Don't buffer entire responses
- Batch operations - Combine multiple KV/D1 calls
Top 10 Performance Errors
| Error | Symptom | Fix | |
|---|---|---|---|
| CPU limit exceeded | Worker terminated | Optimize hot paths, use streaming | |
| Cold start latency | First request slow | Reduce bundle size, avoid top-level await | |
| Memory pressure | Slow GC, timeouts | Stream data, avoid large arrays | |
| KV latency | Slow reads | Use Cache API, batch reads | |
| D1 slow queries | High latency | Add indexes, optimize SQL | |
| Large bundles | Slow cold starts | Tree-shake, code split | |
| Blocking operations | Request timeouts | Use Promise.all, streaming | |
| Unnecessary cloning | Memory spike | Only clone when needed | |
| Missing cache | Repeated computation | Implement caching layer | |
| Sync operations | CPU spikes | Use async alternatives |
CPU Optimization
Profile Hot Paths
Optimize JSON Operations
Memory Optimization
Avoid Large Arrays
Caching Strategies
Multi-Layer Cache
Bundle Optimization
When to Load References
Load specific references based on the task:
- Optimizing CPU usage? → Load
references/cpu-optimization.md - Memory issues? → Load
references/memory-optimization.md - Implementing caching? → Load
references/caching-strategies.md - Reducing bundle size? → Load
references/bundle-optimization.md - Cold start problems? → Load
references/cold-starts.md
Templates
| Template | Purpose | Use When | |
|---|---|---|---|
templates/performance-middleware.ts | Performance monitoring | Adding timing/profiling | |
templates/caching-layer.ts | Multi-layer caching | Implementing cache | |
templates/optimized-worker.ts | Performance patterns | Starting optimized worker |
Scripts
| Script | Purpose | Command | |
|---|---|---|---|
scripts/benchmark.sh | Load testing | ./benchmark.sh <url> | |
scripts/profile-worker.sh | CPU profiling | ./profile-worker.sh |
Resources
- Performance: https://developers.cloudflare.com/workers/platform/performance/
- Limits: https://developers.cloudflare.com/workers/platform/limits/
- Caching: https://developers.cloudflare.com/workers/runtime-apis/cache/
Security
- Security scanPassed, 95 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-performance/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-performance)