workers-runtime-validator

Detect Node.js API usage and incompatible patterns in Cloudflare Workers projects.

3|Updated Oct 22, 2025
One-click install
npx skills add https://github.com/hirefrank/claude-plugins --skill workers-runtime-validator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: workers-runtime-validator
Source: https://github.com/hirefrank/claude-plugins/tree/main/plugins/edge-stack/skills/workers-runtime-validator
Command: npx skills add https://github.com/hirefrank/claude-plugins --skill workers-runtime-validator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cloudflare Workers require Web APIs and Workers-friendly patterns. This Skill automatically validates runtime compatibility during development, preventing Node.js API usage and ensuring proper Workers patterns to avoid runtime surprises.

Core Features & Use Cases

  • Forbidden Node.js APIs: Detects imports and APIs that do not exist in the Workers environment (e.g., fs, path, process)
  • Environment Access: Encourages using the env parameter instead of process.env
  • Module System: Validates ES module usage (no require)
  • Async I/O Enforcement: Flags synchronous or non-async I/O patterns
  • Package Compatibility: Checks for dependencies requiring Node.js runtime

Quick Start

Activate the skill by creating or editing a Worker script. If you introduce a Node.js API such as import fs from 'fs' or use process.env, the Skill will immediately warn and guide you to Web API alternatives. Use this Skill as you type to catch issues before deployment.

Frequently Asked Questions about workers-runtime-validator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate Node.js API usage in Cloudflare Workers?

Validating Node.js API usage in Cloudflare Workers catches incompatible imports and patterns before deployment. This Skill automatically detects forbidden APIs like fs, buffer, and process during file creation and edits, flagging violations and guiding you toward Web API alternatives that Workers support.

What Node.js APIs don't work in Cloudflare Workers?

Cloudflare Workers don't support Node.js modules like fs, path, buffer, and globals like process.env or require(). This Skill identifies these incompatibilities in real time, explaining why each is blocked and recommending Workers-compliant patterns such as using the env parameter for environment access.

How do I catch runtime errors before deploying a Worker?

Catch runtime errors before deployment by validating Workers compatibility during development. This Skill analyzes your code as you type, detecting forbidden APIs, improper module patterns, and async I/O issues, preventing surprises at deployment and guiding corrections immediately.

Can I use require() in Cloudflare Workers?

require() is not supported in Cloudflare Workers; you must use ES modules instead. This Skill flags require() statements and other CommonJS patterns, helping you migrate to ES module syntax that Workers environment enforces.

How do I access environment variables in a Cloudflare Worker?

In Cloudflare Workers, access environment variables through the env parameter, not process.env. This Skill detects process.env usage and guides you to use the Worker-native env binding pattern for secure, runtime-compatible environment access.

What package dependencies are incompatible with Cloudflare Workers?

Packages requiring Node.js runtime features—file system access, process globals, or CommonJS-only exports—are incompatible with Cloudflare Workers. This Skill validates your dependencies during development, alerting you to packages that won't work and helping you find Web API alternatives.