Automatically validates Cloudflare Workers runtime compatibility during development, preventing Node.js API usage and ensuring proper Workers patterns
Automatically validates Cloudflare Workers runtime compatibility during development, preventing Node.js API usage and ensuring proper Workers patterns. Triggers on file creation, import changes, and code modifications to catch runtime violations before deployment.
/plugin marketplace add hirefrank/hirefrank-marketplace/plugin install edge-stack@hirefrank-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
This SKILL automatically activates when:
.ts or .js files are created in Workers projectsprocess.env, require(), or Node.js APIs are detectedenv parameter usage vs process.envrequire())// These patterns trigger immediate alerts:
import fs from 'fs'; // Node.js API
import { Buffer } from 'buffer'; // Node.js API
const secret = process.env.API_KEY; // process doesn't exist
const data = require('./module'); // require() not supported
// These patterns are validated as correct:
import { z } from 'zod'; // Web-compatible package
const secret = env.API_KEY; // Proper env parameter
const hash = await crypto.subtle.digest(); // Web Crypto API
workers-runtime-guardian agentedge-performance-oracle agentcloudflare-architecture-strategist agentfs, path, os, crypto, process, bufferrequire(), module.exportsprocess.env, process.exit()// ❌ Critical: Node.js crypto
import crypto from 'crypto';
const hash = crypto.createHash('sha256');
// ✅ Correct: Web Crypto API
const encoder = new TextEncoder();
const hash = await crypto.subtle.digest('SHA-256', encoder.encode(data));
// ❌ Critical: process.env
const apiKey = process.env.API_KEY;
// ✅ Correct: env parameter
export default {
async fetch(request: Request, env: Env) {
const apiKey = env.API_KEY;
}
}
// ❌ Critical: CommonJS
const utils = require('./utils');
// ✅ Correct: ES modules
import { utils } from './utils';
When Cloudflare MCP server is available:
// Developer types: import fs from 'fs';
// SKILL immediately activates: "❌ CRITICAL: 'fs' is a Node.js API not available in Workers runtime. Use Web APIs or Workers-specific alternatives."
// Developer changes: const secret = process.env.API_KEY;
// SKILL immediately activates: "❌ CRITICAL: 'process.env' doesn't exist in Workers. Use the 'env' parameter passed to your fetch handler instead."
// SKILL runs comprehensive check: "✅ Runtime validation passed. No Node.js APIs detected, all environment access uses proper env parameter."
This SKILL ensures Workers runtime compatibility by providing immediate, autonomous validation of code patterns, preventing common migration mistakes and runtime failures.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.