Agent skill

Cloudflare Workers Migration

by secondsky in secondsky/claude-skills

Migrate to Cloudflare Workers from AWS Lambda, Vercel, Express, and Node.js.

MITAuto-check passedBackend & APIs

Install Cloudflare Workers Migration

skills CLI
$ npx skills add secondsky/claude-skills --skill cloudflare-workers-migration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install secondsky/claude-skills cloudflare-workers-migration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/cloudflare-workers/skills/cloudflare-workers-migration .claude/skills/cloudflare-workers-migration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cloudflare-workers-migration
GitHub stars
227
Token cost
~1.3k tokens
SKILL.md length
324 words
Files
10 (incl. scripts, references)
Skills in repo
169
Repo updated
First seen
Licence
MIT

At a glance

Migrate to Cloudflare Workers from AWS Lambda, Vercel, Express, and Node.js.

  • Works in 7 steps: Analyze Dependencies: Check for… → Convert to ESM: Replace require() with… → Update Env Access: Use env parameter… → …
  • Porting existing applications to the edge
  • SKILL.md covers Migration Decision Tree, Platform Comparison, Top 10 Migration Errors and Quick Migration Patterns, plus 4 more sections
  • Runs TypeScript and Shell scripts from its folder; needs API_KEY

What it does

Cloudflare Workers Migration is an agent skill from secondsky/claude-skills. 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.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 12 other files, including scripts and reference files (for example `references/express-migration.md`, `references/lambda-migration.md` and `references/node-compatibility.md`).

It sits in Backend & APIs, covering Serverless and Code migrations. It works with Cloudflare Workers, Node.js, AWS Lambda and Vercel. The repository describes itself as: Production-ready skills for Claude Code CLI - Cloudflare, React, Tailwind v4, and AI integrations. The licence is MIT.

When your agent uses it

  • Porting existing applications to the edge
  • Adapting serverless functions
  • Resolving Node.js API compatibility issues

Example prompts

  • “/cloudflare-workers-migration”

Requirements

  • Python 3
  • Node.js
  • A Bash shell
  • A credential in API_KEY

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Analyze Dependencies: Check for unsupported Node.js APIs
  2. Convert to ESM: Replace require() with import
  3. Update Env Access: Use env parameter instead of process.env
  4. Replace File System: Use R2/KV for storage
  5. Handle Async: Use ctx.waitUntil() for background tasks
  6. Test Locally: Verify with wrangler dev
  7. Performance Test: Ensure CPU limits aren't exceeded

What it can do on your machine

Read from SKILL.md and the folder at commit 8837836. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (TypeScript and Shell), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cloudflare Workers Migration loads about 1.3k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 59 tokens; SKILL.md has 324 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~13k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from secondsky/claude-skills at commit 8837836, republished under its MIT licence (© secondsky). 324 words, ~1,284 tokens.

Download SKILL.mdSave it as .claude/skills/cloudflare-workers-migration/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
cloudflare-workers-migration
description
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.
metadata.version
1.0.0
license
MIT

Workers Migration Guide

Migrate existing applications to Cloudflare Workers from various platforms.

Migration Decision Tree

What are you migrating from?
├── AWS Lambda
│   └── Node.js handler? → Lambda adapter pattern
│   └── Python? → Consider Python Workers
│   └── Container/custom runtime? → May need rewrite
├── Vercel/Next.js
│   └── API routes? → Minimal changes with adapter
│   └── Full Next.js app? → Use OpenNext adapter
│   └── Middleware? → Direct Workers equivalent
├── Express/Node.js
│   └── Simple API? → Hono (similar API)
│   └── Complex middleware? → Gradual migration
│   └── Heavy node: usage? → Compatibility layer
└── Other Edge (Deno Deploy, Fastly)
    └── Standard Web APIs? → Minimal changes
    └── Platform-specific? → Targeted rewrites

Platform Comparison

FeatureWorkersLambdaVercelExpress
Cold Start~0ms100-500ms10-100msN/A
CPU Limit50ms/10ms15 min10sNone
Memory128MB10GB1GBSystem
Max Response6MB (stream unlimited)6MB4.5MBNone
Global Edge300+ PoPsRegional~20 PoPsManual
Node.js APIsPartialFullFullFull

Top 10 Migration Errors

ErrorFromCauseSolution
fs is not definedLambda/ExpressFile system accessUse KV/R2 for storage
Buffer is not definedNode.jsNode.js globalsImport from node:buffer
process.env undefinedAllEnv access patternUse env parameter
setTimeout not returningLambdaAsync patternsUse ctx.waitUntil()
require() not foundExpressCommonJSConvert to ESM imports
Exceeded CPU timeAllLong computationChunk or use DO
body already consumedExpressRequest bodyClone before read
Headers not iterableLambdaHeaders APIUse Headers constructor
crypto.randomBytesNode.jsNode cryptoUse crypto.getRandomValues
Cannot find moduleAllMissing polyfillCheck Workers compatibility

Quick Migration Patterns

AWS Lambda Handler
typescript
// Before: AWS Lambda
export const handler = async (event, context) => {
  const body = JSON.parse(event.body);
  return {
    statusCode: 200,
    body: JSON.stringify({ message: 'Hello' }),
  };
};

// After: Cloudflare Workers
export default {
  async fetch(request: Request, env: Env): Promise<Response> {
    const body = await request.json();
    return Response.json({ message: 'Hello' });
  },
};
Express Middleware
typescript
// Before: Express
app.use((req, res, next) => {
  if (!req.headers.authorization) {
    return res.status(401).json({ error: 'Unauthorized' });
  }
  next();
});

// After: Hono Middleware
app.use('*', async (c, next) => {
  if (!c.req.header('Authorization')) {
    return c.json({ error: 'Unauthorized' }, 401);
  }
  await next();
});
Environment Variables
typescript
// Before: Node.js
const apiKey = process.env.API_KEY;

// After: Workers
export default {
  async fetch(request: Request, env: Env): Promise<Response> {
    const apiKey = env.API_KEY;
    // ...
  },
};

Node.js Compatibility

Workers support many Node.js APIs via compatibility flags:

jsonc
// wrangler.jsonc
{
  "compatibility_flags": ["nodejs_compat_v2"],
  "compatibility_date": "2024-12-01"
}

Supported with nodejs_compat_v2:

  • crypto (most methods)
  • buffer (Buffer class)
  • util (promisify, types)
  • stream (Readable, Writable)
  • events (EventEmitter)
  • path (all methods)
  • string_decoder
  • assert

Not Supported (need alternatives):

  • fs → Use R2/KV
  • child_process → Not possible
  • cluster → Not applicable
  • dgram → Not supported
  • net → Use fetch/WebSocket
  • tls → Handled by platform

When to Load References

ReferenceLoad When
references/lambda-migration.mdMigrating AWS Lambda functions
references/vercel-migration.mdMigrating from Vercel/Next.js
references/express-migration.mdMigrating Express/Node.js apps
references/node-compatibility.mdNode.js API compatibility issues

Migration Checklist

  1. Analyze Dependencies: Check for unsupported Node.js APIs
  2. Convert to ESM: Replace require() with import
  3. Update Env Access: Use env parameter instead of process.env
  4. Replace File System: Use R2/KV for storage
  5. Handle Async: Use ctx.waitUntil() for background tasks
  6. Test Locally: Verify with wrangler dev
  7. Performance Test: Ensure CPU limits aren't exceeded

See Also

  • workers-runtime-apis - Available APIs in Workers
  • workers-performance - Optimization techniques
  • cloudflare-worker-base - Basic Workers setup

© secondsky, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (scripts, references) in plugins/cloudflare-workers/skills/cloudflare-workers-migration of secondsky/claude-skills.

  • SKILL.md
  • references/express-migration.md
  • references/lambda-migration.md
  • references/node-compatibility.md
  • references/vercel-migration.md
  • scripts/analyze-migration.sh
  • templates/express-adapter.ts
  • templates/lambda-adapter.ts
  • templates/node-compat.ts
  • templates/vercel-adapter.ts

Open the folder on GitHubat commit 8837836

Compare with similar skills

Cloudflare Workers Migration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cloudflare Workers Migration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cloudflare Workers Migration this skillsecondsky/claude-skills227—~1.3kAutomated safety check: PassMIT
Frontmcp Deploymentagentfront/frontmcp146—~9.2kAutomated safety check: NotesApache-2.0
Olore Hono Latestolorehq/olore103—~1.1kAutomated safety check: PassMIT
Upstash Redisgithub/awesome-copilot40k—~1.7kAutomated safety check: PassMIT
AWS Sam Bootstrapgiuseppe-trisciuoglio/developer-kit355—~954Automated safety check: NotesMIT
Frontmcp Production Readinessagentfront/frontmcp146—~6.5kAutomated safety check: PassApache-2.0

Similar skills

  • Frontmcp Deployment

    agentfront/frontmcp

    A skill your agent uses when deploying, building for production, packaging, or shipping a FrontMCP server.

    146 GitHub stars~9.2k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Olore Hono Latest

    olorehq/olore

    Local Hono documentation reference (latest). An agent skill from olorehq/olore.

    103 GitHub stars~1.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Upstash Redis

    github/awesome-copilot

    Official

    Use Redis over HTTP from serverless and edge runtimes with @upstash/redis, and add rate limiting with @upstash/ratelimit.

    40k GitHub stars~1.7k tokensUpdated today
    Backend & APIsAuto-check passed
  • AWS Sam Bootstrap

    giuseppe-trisciuoglio/developer-kit

    Provides AWS SAM bootstrap patterns: generates template.yaml and samconfig.toml for new projects via sam init, creates SAM templates for existing Lambda/CloudFormation code migration, validates…

    355 GitHub stars~954 tokensUpdated 27 days ago
    Backend & APIsAuto-check: notes
  • Pre-production audit, hardening, and go-live checklists for FrontMCP servers.

    146 GitHub stars~6.5k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Deploying Applications

    ancoleman/ai-design-components

    Deployment patterns from Kubernetes to serverless and edge functions.

    526 GitHub stars~3.1k tokensUpdated 10 mo ago
    DevOps & CloudAuto-check passed

More from secondsky/claude-skills

All 169 skills in this repo
  • Tanstack AI

    secondsky/claude-skills

    TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.

    227 GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check: notes
  • Auto Animate

    secondsky/claude-skills

    AutoAnimate (@formkit/auto-animate) zero-config animations for React.

    227 GitHub stars~2.9k tokensUpdated 9 days ago
    Auto-check passed
  • Base UI React

    secondsky/claude-skills

    MUI Base UI unstyled React components with Floating UI. An agent skill from secondsky/claude-skills.

    227 GitHub stars~1.9k tokensUpdated 9 days ago
    Auto-check passed
  • Cloudflare Images

    secondsky/claude-skills

    This skill should be used when the user asks to "upload images to Cloudflare", "implement direct creator upload", "configure image transformations", "optimize WebP/AVIF", "create image variants"…

    227 GitHub stars~3.6k tokensUpdated 9 days ago
    Auto-check: notes
  • Cloudflare Nextjs

    secondsky/claude-skills

    Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare).

    227 GitHub stars~5.3k tokensUpdated 9 days ago
    Auto-check: notes
  • Cloudflare Sandbox

    secondsky/claude-skills

    Cloudflare Sandboxes SDK for secure code execution in Linux containers at edge.

    227 GitHub stars~4.5k tokensUpdated 9 days ago
    Auto-check passed

Categories

Questions about Cloudflare Workers Migration

What does Cloudflare Workers Migration do?

Migrate to Cloudflare Workers from AWS Lambda, Vercel, Express, and Node.js. Cloudflare Workers Migration is an agent skill from secondsky/claude-skills.js.

When should I use Cloudflare Workers Migration?

Cloudflare Workers Migration fits situations like: porting existing applications to the edge; adapting serverless functions; resolving Node.js API compatibility issues.

How do I install Cloudflare Workers Migration in Claude Code?

Run `npx skills add secondsky/claude-skills --skill cloudflare-workers-migration -a claude-code`. Or copy the skill folder (plugins/cloudflare-workers/skills/cloudflare-workers-migration in secondsky/claude-skills) into .claude/skills/cloudflare-workers-migration in your project. Claude Code loads it when a task matches its description.

How do I install Cloudflare Workers Migration in Codex?

Run `npx skills add secondsky/claude-skills --skill cloudflare-workers-migration -a codex`. Or copy the skill folder (plugins/cloudflare-workers/skills/cloudflare-workers-migration in secondsky/claude-skills) into .agents/skills/cloudflare-workers-migration in your project. Codex loads it when a task matches its description.

Can I use Cloudflare Workers Migration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add secondsky/claude-skills --skill cloudflare-workers-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cloudflare-workers-migration, .gemini/skills/cloudflare-workers-migration, .github/skills/cloudflare-workers-migration and .opencode/skills/cloudflare-workers-migration in your project.

What does Cloudflare Workers Migration need to run?

Going by SKILL.md and its folder, Cloudflare Workers Migration needs TypeScript and a shell for the scripts in its folder and credentials named API_KEY. Our summary lists: Python 3; Node.js; A Bash shell; A credential in API_KEY.

Does Cloudflare Workers Migration access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cloudflare Workers Migration safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Cloudflare Workers Migration use?

Cloudflare Workers Migration is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cloudflare Workers Migration use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 12k tokens, read only when the agent opens those files.

What are the alternatives to Cloudflare Workers Migration?

Skills that share tags, products or a category with Cloudflare Workers Migration: Frontmcp Deployment (agentfront/frontmcp, 146 stars), Olore Hono Latest (olorehq/olore, 103 stars), Upstash Redis (github/awesome-copilot, 40k stars) and AWS Sam Bootstrap (giuseppe-trisciuoglio/developer-kit, 355 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cloudflare Workers Migration?

secondsky (a GitHub user) maintains it in secondsky/claude-skills, which has 227 GitHub stars. The repository holds 169 skills in this directory. The repository was last updated on September 28, 2026.

Source: secondsky/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.