Automatically validates Cloudflare Workers binding configuration, ensuring code references match wrangler.toml setup and TypeScript interfaces are accurate
Automatically validates Cloudflare Workers binding configuration, ensuring code references match wrangler.toml and TypeScript interfaces are accurate. Activates when you use `env` parameters, modify wrangler.toml, or define `Env` interfaces to prevent runtime binding failures.
/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:
env parameter is used in Workers codeEnv interface is defined or updatedEnv interface matches actual bindings// These patterns trigger immediate alerts:
// Code references binding that doesn't exist in wrangler.toml
const user = await env.USER_DATA.get(id); // USER_DATA not configured
// TypeScript interface doesn't match wrangler.toml
interface Env {
USERS: KVNamespace; // Code expects USERS
// wrangler.toml has USER_DATA (mismatch!)
}
// These patterns are validated as correct:
// Matching wrangler.toml and TypeScript interface
interface Env {
USER_DATA: KVNamespace; // Matches wrangler.toml binding name
API_BUCKET: R2Bucket; // Correct R2 binding type
}
// Proper usage in code
const user = await env.USER_DATA.get(id);
const object = await env.API_BUCKET.get(key);
binding-context-analyzer agentcloudflare-architecture-strategist agentedge-performance-oracle agentremote = true// ❌ Critical: Code references binding not in wrangler.toml
export default {
async fetch(request: Request, env: Env) {
const user = await env.USER_CACHE.get(userId); // USER_CACHE not configured!
}
}
// wrangler.toml (missing binding)
[[kv_namespaces]]
binding = "USER_DATA" # Different name!
id = "user-data"
// ✅ Correct: Matching names
export default {
async fetch(request: Request, env: Env) {
const user = await env.USER_DATA.get(userId); // Matches wrangler.toml
}
}
// wrangler.toml (correct binding)
[[kv_namespaces]]
binding = "USER_DATA" # Matches code!
id = "user-data"
// ❌ Critical: Interface doesn't match wrangler.toml
interface Env {
USERS: KVNamespace; // Code expects USERS
SESSIONS: KVNamespace; // Code expects SESSIONS
}
// wrangler.toml has different names
[[kv_namespaces]]
binding = "USER_DATA" # Different!
id = "user-data"
[[kv_namespaces]]
binding = "SESSION_DATA" # Different!
id = "session-data"
// ✅ Correct: Matching interface and configuration
interface Env {
USER_DATA: KVNamespace; # Matches wrangler.toml
SESSION_DATA: KVNamespace; # Matches wrangler.toml
}
// wrangler.toml (matching names)
[[kv_namespaces]]
binding = "USER_DATA" # Matches interface!
id = "user-data"
[[kv_namespaces]]
binding = "SESSION_DATA" # Matches interface!
id = "session-data"
// ❌ Critical: Wrong binding type
interface Env {
MY_BUCKET: KVNamespace; # Wrong type - should be R2Bucket
MY_DB: D1Database; # Wrong type - should be KVNamespace
}
// wrangler.toml
[[r2_buckets]]
binding = "MY_BUCKET" # R2 bucket, not KV!
[[kv_namespaces]]
binding = "MY_DB" # KV namespace, not D1!
// ✅ Correct: Proper binding types
interface Env {
MY_BUCKET: R2Bucket; # Correct type for R2 bucket
MY_DB: KVNamespace; # Correct type for KV namespace
}
// wrangler.toml (same as above)
[[r2_buckets]]
binding = "MY_BUCKET"
[[kv_namespaces]]
binding = "MY_DB"
// ❌ High: Missing remote binding for development
// wrangler.toml
[[kv_namespaces]]
binding = "USER_DATA"
id = "user-data"
# Missing remote = true for development!
// ✅ Correct: Remote binding configured
[[kv_namespaces]]
binding = "USER_DATA"
id = "user-data"
remote = true # Enables remote binding for development
// ❌ High: Secret in [vars] section (visible in git)
// wrangler.toml
[vars]
API_KEY = "sk_live_12345" # Secret exposed in git!
// ✅ Correct: Secret via wrangler secret command
// wrangler.toml (no secrets in [vars])
[vars]
PUBLIC_API_URL = "https://api.example.com" # Non-secret config only
# Set secret via command line:
# wrangler secret put API_KEY
# (prompt: enter secret value)
// Code accesses both correctly
interface Env {
API_KEY: string; # From wrangler secret
PUBLIC_API_URL: string; # From wrangler.toml [vars]
}
When Cloudflare MCP server is available:
// Developer types: const data = await env.CACHE.get(key);
// SKILL immediately activates: "❌ CRITICAL: CACHE binding not found in wrangler.toml. Add [[kv_namespaces]] binding = 'CACHE' or check spelling."
// Developer types: interface Env { USERS: R2Bucket; }
// SKILL immediately activates: "⚠️ HIGH: USERS binding type mismatch. wrangler.toml shows USERS as KVNamespace, not R2Bucket."
// Developer modifies wrangler.toml binding name
// SKILL immediately activates: "⚠️ HIGH: Binding name changed from USER_DATA to USERS. Update TypeScript interface and code references."
interface Env {
MY_KV: KVNamespace;
}
// Usage: await env.MY_KV.get(key)
interface Env {
MY_BUCKET: R2Bucket;
}
// Usage: await env.MY_BUCKET.get(key)
interface Env {
MY_DB: D1Database;
}
// Usage: await env.MY_DB.prepare(query).bind(params).all()
interface Env {
MY_DO: DurableObjectNamespace;
}
// Usage: env.MY_DO.get(id)
interface Env {
AI: Ai;
}
// Usage: await env.AI.run(model, params)
interface Env {
VECTORS: VectorizeIndex;
}
// Usage: await env.VECTORS.query(vector, options)
This SKILL ensures Workers binding configuration is correct by providing immediate, autonomous validation of binding patterns, preventing runtime failures and configuration mismatches.
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 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 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.