Install Workers Profiling
Pick your agent. Every command is ready to paste.
npx skills add cloudflare/skills --skill workers-profilingThe open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.
01
Install it
Run the command above, or upload the folder in Claude.
02
Ask naturally
Describe the task. Your agent loads workers-profiling when the request matches its description.
03
Name it if needed
If it does not trigger, say “use the workers-profiling skill”. In Codex, type $workers-profiling.
The skill itself
SKILL.md
Workers profiling
Find expensive functions or memory allocations in deployed code and come up with ways to fix them.
Retrieve the docs
Start with the production profiling guide to understand how Workers and Durable Objects profiling works.
Profiling steps
- Identify the symptom and affected workload: CPU usage, latency, allocation pressure, or memory growth.
- Confirm the account, Worker, environment, and deployed version with the user.
- For a Durable Object, also confirm its owning Worker, namespace, and instance.
- Choose CPU or heap profiling from the current guide's supported types and meanings.
Where possible, use the cf CLI to capture profiles. If the user requests cf, inspect the installed version's command help and schema where available.
If cf isn't available, consider prompting the user whether they would like to install it.
The profiling API will return a pprof file which you can analyze directly, or using appropriate tools like Go's pprof utility.
Inspect the evidence
- Read the pprof file and analyse it for hotspots
- Map hotspots to functions and source locations when evidence supports it; report missing symbols or source mappings.
- If filenames and function names are pointing at the generated JavaScript, consider suggesting to the user to enable source maps and re-do the profiling.
Optimise
Propose the smallest code change supported by the capture which resolves the issues identified.
Report findings
Return a concise report with:
- Evidence for each finding: file, function, source location, and metric with units, where available.
- The smallest actionable change and how to check its effect.
Skill feedback
If the user reports that this skill gave incorrect or outdated guidance, or is missing information, read references/skill-feedback.md.
Tips for Workers Profiling
- • Start a fresh session after installing so your agent picks up the new skill.
- • It bundles reference files. The agent reads them only when needed, so they cost no context until then.
- • It is part of a pack with 22 skills. Install only the ones you need with --skill to keep triggers precise.
- • If two skills overlap, mention the one you want by name.
Questions about Workers Profiling
What does the Workers Profiling skill do?
Profile or debug CPU usage and memory allocation in deployed Cloudflare Workers and Durable Objects. Then use this information to optimize your code.
How do I install Workers Profiling?
Run "npx skills add cloudflare/skills --skill workers-profiling" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.
Does Workers Profiling work in Cursor and Codex?
Yes. Workers Profiling uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.
Is Workers Profiling free?
Workers Profiling is open source on GitHub under the Apache-2.0 license. It is free to install; check the license before commercial use.
Who made Workers Profiling?
Workers Profiling is published by Cloudflare in the cloudflare/skills repository, together with 21 other skills.

