Tooluck logoTooluck
SKILL.md

workers-profiling

Agent skill fromfcakyon/claude-codex-settings

Profile or debug CPU usage and memory allocation in deployed Cloudflare Workers and Durable Objects. Then use this information to optimize your code.

How to install workers-profiling

install workers-profiling
# install the claude-codex-settings pack with the skills CLI
npx skills add fcakyon/claude-codex-settings

# or add only this skill to Claude Code: copy the folder

plugins/cloudflare-skills/skills/workers-profiling/

# into

~/.claude/skills/workers-profiling/ (all projects)

.claude/skills/workers-profiling/ (one project)

plugins/cloudflare-skills/skills/workers-profiling/SKILL.md

Apache-2.0Full file
1# Workers profiling
2
3Find expensive functions or memory allocations in deployed code and come up with ways to fix them.
4
5## Retrieve the docs
6
7Start with the [production profiling guide](https://developers.cloudflare.com/workers/observability/profiling-in-production/index.md) to understand how
8Workers and Durable Objects profiling works.
9
10## Profiling steps
11
121. Identify the symptom and affected workload: CPU usage, latency, allocation pressure, or memory growth.
132. Confirm the account, Worker, environment, and deployed version with the user.
143. For a Durable Object, also confirm its owning Worker, namespace, and instance.
154. Choose CPU or heap profiling from the current guide's supported types and meanings.
16
17Where possible, use the [`cf` CLI](https://developers.cloudflare.com/cf/index.md) to capture profiles. If the user requests `cf`, inspect the installed version's command help and schema where available.
18
19If `cf` isn't available, consider prompting the user whether they would like to install it.
20
21
22The profiling API will return a pprof file which you can analyze directly, or using appropriate tools like Go's `pprof` utility.
23
24## Inspect the evidence
25
26- Read the pprof file and analyse it for hotspots
27- Map hotspots to functions and source locations when evidence supports it; report missing symbols or source mappings.
28- 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.
29…

Excerpt shown under the repository's Apache-2.0 license.

More skills in claude-codex-settings

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates