Automatically optimizes Cloudflare Workers performance during development, focusing on cold starts, bundle size, edge caching, and global latency
View on GitHubhirefrank/hirefrank-marketplace
edge-stack
January 16, 2026
Select agents to install to:
npx add-skill https://github.com/hirefrank/hirefrank-marketplace/blob/main/plugins/edge-stack/skills/edge-performance-optimizer/SKILL.md -a claude-code --skill edge-performance-optimizerInstallation paths:
.claude/skills/edge-performance-optimizer/# Edge Performance Optimizer SKILL ## Activation Patterns This SKILL automatically activates when: - New dependencies are added to package.json - Large files or heavy imports are detected - Sequential operations that could be parallelized - Missing edge caching opportunities - Bundle size increases significantly - Storage operations without optimization patterns ## Expertise Provided ### Edge-Specific Performance Optimization - **Cold Start Optimization**: Minimizes bundle size and heavy dependencies - **Global Distribution**: Ensures edge caching for global performance - **CPU Time Optimization**: Identifies CPU-intensive operations - **Storage Performance**: Optimizes KV/R2/D1 access patterns - **Parallel Operations**: Suggests parallelization opportunities - **Bundle Analysis**: Monitors and optimizes bundle size ### Specific Checks Performed #### ❌ Performance Anti-Patterns ```typescript // These patterns trigger immediate alerts: import axios from 'axios'; // Heavy dependency (13KB) import moment from 'moment'; // Heavy dependency (68KB) import _ from 'lodash'; // Heavy dependency (71KB) // Sequential operations that could be parallel const user = await env.USERS.get(id); const settings = await env.SETTINGS.get(id); const prefs = await env.PREFS.get(id); ``` #### ✅ Performance Best Practices ```typescript // These patterns are validated as correct: // Native Web APIs instead of heavy libraries const response = await fetch(url); // Built-in fetch (0KB) const now = new Date(); // Native Date (0KB) // Parallel operations const [user, settings, prefs] = await Promise.all([ env.USERS.get(id), env.SETTINGS.get(id), env.PREFS.get(id), ]); ``` ## Integration Points ### Complementary to Existing Components - **edge-performance-oracle agent**: Handles comprehensive performance analysis, SKILL provides immediate optimization - **workers-runtime-validator SKILL**: Complements runtime checks with