Skip to content
Back to skills

Workers Profiling

ASecurity

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

  • 509 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
ai-agentsjavascriptgojavaapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 7, 2026

npx -y skills add aiskillstore/marketplace --skill workers-profiling --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Workers Profiling?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Workers Profiling
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aiskillstore-workers-profiling/badge)](https://www.skillsdirectory.com/skills/aiskillstore-workers-profiling)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: workers-profiling
description: Profile or debug CPU usage and memory allocation in deployed Cloudflare Workers and Durable Objects. Then use this information to optimize your code.
---

# 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](https://developers.cloudflare.com/workers/observability/profiling-in-production/index.md) to understand how
Workers and Durable Objects profiling works.

## Profiling steps

1. Identify the symptom and affected workload: CPU usage, latency, allocation pressure, or memory growth.
2. Confirm the account, Worker, environment, and deployed version with the user.
3. For a Durable Object, also confirm its owning Worker, namespace, and instance.
4. Choose CPU or heap profiling from the current guide's supported types and meanings.

Where possible, use the [`cf` CLI](/cf/) 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.

Files in this skill

  • SKILL.md1.9 KB
  • skill-report.json12.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.