workers-profiling
Profile or debug CPU usage and memory allocation in deployed Cloudflare Workers and Durable Objects. Then use this information to optimize your code.
Install this skill
No account required. Pick your tool, or use the command that detects it for you.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install cloudflare-workers-profilingManual setup by platform
Claude Code
~/.claude/skills/cloudflare-workers-profiling/SKILL.md
Signing
SignedSLSA L2- Signed by
- skills-hub.ai distributor
- Method
- Distributor-signed by skills-hub.aiCryptographically signed by the skills-hub.ai distributor key at publish time.
- Signed
Instructions
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.
Security
Reviews (0)
Related skills
Browse all →More from Cloudflare
View source →More Build skills
Browse category →Frequently asked 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. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the workers-profiling skill?
Run `npx @skills-hub-ai/cli install cloudflare-workers-profiling` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/cloudflare-workers-profiling/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does workers-profiling work with?
workers-profiling runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the workers-profiling skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use workers-profiling after installing it?
In Claude Code, type `/cloudflare-workers-profiling` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the workers-profiling skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.