Workers Profiling
CloudflareOfficialPublished by Cloudflare
- Skill
- Review and audit
- Cloud and DevOps
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured approach to identifying and resolving performance bottlenecks in deployed Cloudflare Workers and Durable Objects. It guides users through capturing CPU and heap profiles, analyzing the resulting pprof files for hotspots, and mapping those findings back to source code to implement targeted optimizations.
What it does
- Identifies performance symptoms like high CPU usage, latency, or memory growth.
- Captures CPU and heap profiles from deployed Workers and Durable Objects.
- Analyzes pprof files to pinpoint function-level hotspots.
- Maps performance data to source code locations for easier debugging.
- Recommends actionable code changes to resolve identified performance issues.
- Provides a feedback loop for reporting skill inaccuracies or improvements.
When to use it
- When a Worker or Durable Object experiences unexpected latency or high CPU usage.
- When investigating memory leaks or high allocation pressure in production.
- When you need to optimize specific functions within your serverless code.
- When you have captured a profile and need help interpreting the results.
Advantages
- Enables data-driven performance tuning based on actual production metrics.
- Provides a clear, step-by-step workflow for complex profiling tasks.
- Helps bridge the gap between raw pprof data and actionable code improvements.
- Supports source map integration to make profiling data human-readable.
Usage examples
- “My Worker is hitting CPU limits, how can I find the cause?”
- The agent will guide you through identifying the affected Worker, capturing a CPU profile, and analyzing the pprof file to find the specific functions consuming the most resources.
- “I have a memory leak in my Durable Object, what should I do?”
- The agent will assist you in capturing a heap profile to identify memory allocation hotspots and suggest code changes to reduce memory pressure.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/cloudflare/workers-profiling/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip workers-profiling.zip -d .agents/skills
Documentation by Cloudflare
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.
Files
- ATTRIBUTION.mdAdded by AutoGineer870 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md2.2 KiB
- references/skill-feedback.md2.7 KiB
references/skill-feedback.md
Skill feedback
GitHub issues are public: anyone can read an issue once it is posted. Never include sensitive information, and never post an issue until the user has seen the exact title and body and approved it.
Use this when the user reports that the workers-profiling skill gave incorrect or outdated guidance, is missing information, or could be improved. This is about the skill (agent instructions), not about Cloudflare products.
What not to include
The issue is drafted from the conversation, so remove the following before drafting and describe the problem in general terms instead:
Credentials, API tokens, secrets, and passwords
Account IDs, zone IDs, and other resource identifiers
Customer or personal data, such as names, email addresses, and IP addresses
Internal hostnames and URLs
Private code, configuration, and logs
Steps
Ask permission – Ask the user if they would like to submit feedback to the skill maintainers. If they decline, move on.
Draft the issue – Fill in the table below from the conversation and use it as the issue body. Always identify which specific file and section caused the problem. Leave out everything listed in What not to include.
Review with the user – Show the user the exact title and body, then ask a yes/no question, such as "Post this as a public issue on cloudflare/skills?" Submit only after the user answers yes. If they ask for changes, apply them and ask again. If they answer no, do not post. Agreeing to send feedback in step 1 is not approval of the text.
Submit – Create a GitHub issue on the
cloudflare/skillsrepository with the approved draft as the body, for example withgh issue create --repo cloudflare/skills. The title must follow this format:skill-feedback: workers-profiling: <summary of the problem>.Share the result – Share the issue URL with the user after submission. If submission fails, give the user the approved title and body, and this link to create the issue manually: https://github.com/cloudflare/skills/issues/new
Issue body
| Field | Value |
|---|---|
| Type | bug (incorrect guidance), outdated, missing, or improvement |
| Skill | workers-profiling |
| Source | File and section, e.g. SKILL.md > "Section name" or references/<file>.md > "Section name" |
| Agent | The agent and model in use, if known |
| Task | What the user was trying to do, e.g. "deploy a preview" |
| Expected | What should have happened, e.g. "Create a Preview deployment" |
| Actual | What the skill said or what happened, e.g. "Unknown option: --preview" |
| Impact | The effect on the user, e.g. "Time spent finding the correct syntax" |
| Suggested fix | How the skill should change; leave blank if unsure |
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Cloudflare
- Publisher
- Cloudflare (Official)
- Source
- cloudflare/skills · skills/workers-profiling · commit 6eb6c78
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Cloudflare or Cloudflare.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download workers-profiling.zip