comeonoliver/skillshub/cloudflare-workers-migration
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.
Migrate to Cloudflare Workers from AWS Lambda, Vercel, Express, and Node.js. Use when porting existing applications to the edge, adapting serverless functions, or resolving Node.js API compatibility issues.
Install
npx vskill@latest install comeonoliver/skillshub/cloudflare-workers-migrationSKILL.md
The same SKILL.md was published earlier as comeonoliver/skillshub/cloudflare-workers-migration.
Workers Migration Guide
Migrate existing applications to Cloudflare Workers from various platforms.
Migration Decision Tree
Platform Comparison
| Feature | Workers | Lambda | Vercel | Express | |
|---|---|---|---|---|---|
| Cold Start | ~0ms | 100-500ms | 10-100ms | N/A | |
| CPU Limit | 50ms/10ms | 15 min | 10s | None | |
| Memory | 128MB | 10GB | 1GB | System | |
| Max Response | 6MB (stream unlimited) | 6MB | 4.5MB | None | |
| Global Edge | 300+ PoPs | Regional | ~20 PoPs | Manual | |
| Node.js APIs | Partial | Full | Full | Full |
Top 10 Migration Errors
| Error | From | Cause | Solution | |
|---|---|---|---|---|
fs is not defined | Lambda/Express | File system access | Use KV/R2 for storage | |
Buffer is not defined | Node.js | Node.js globals | Import from node:buffer | |
process.env undefined | All | Env access pattern | Use env parameter | |
setTimeout not returning | Lambda | Async patterns | Use ctx.waitUntil() | |
require() not found | Express | CommonJS | Convert to ESM imports | |
Exceeded CPU time | All | Long computation | Chunk or use DO | |
body already consumed | Express | Request body | Clone before read | |
Headers not iterable | Lambda | Headers API | Use Headers constructor | |
crypto.randomBytes | Node.js | Node crypto | Use crypto.getRandomValues | |
Cannot find module | All | Missing polyfill | Check Workers compatibility |
Quick Migration Patterns
AWS Lambda Handler
Express Middleware
Environment Variables
Node.js Compatibility
Workers support many Node.js APIs via compatibility flags:
Supported with nodejs_compat_v2:
crypto(most methods)buffer(Buffer class)util(promisify, types)stream(Readable, Writable)events(EventEmitter)path(all methods)string_decoderassert
Not Supported (need alternatives):
fs→ Use R2/KVchild_process→ Not possiblecluster→ Not applicabledgram→ Not supportednet→ Use fetch/WebSockettls→ Handled by platform
When to Load References
| Reference | Load When | |
|---|---|---|
references/lambda-migration.md | Migrating AWS Lambda functions | |
references/vercel-migration.md | Migrating from Vercel/Next.js | |
references/express-migration.md | Migrating Express/Node.js apps | |
references/node-compatibility.md | Node.js API compatibility issues |
Migration Checklist
- Analyze Dependencies: Check for unsupported Node.js APIs
- Convert to ESM: Replace require() with import
- Update Env Access: Use env parameter instead of process.env
- Replace File System: Use R2/KV for storage
- Handle Async: Use ctx.waitUntil() for background tasks
- Test Locally: Verify with wrangler dev
- Performance Test: Ensure CPU limits aren't exceeded
See Also
workers-runtime-apis- Available APIs in Workersworkers-performance- Optimization techniquescloudflare-worker-base- Basic Workers setup
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-migration/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-migration)