Official agent skill

Pyroscope

by grafana in grafana/skills

Continuously profile applications with Grafana Pyroscope and read the result as flame graphs.

OfficialApache-2.0Auto-check passedDevOps & Cloud

Install Pyroscope

skills CLI
$ npx skills add grafana/skills --skill pyroscope -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install grafana/skills pyroscope --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/grafana/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/grafana-lgtm/pyroscope .claude/skills/pyroscope && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pyroscope
GitHub stars
278
Token cost
~1.2k tokens
SKILL.md length
208 words
Files
3 (incl. references)
Skills in repo
51
Repo updated
First seen
Licence
Apache-2.0

At a glance

Continuously profile applications with Grafana Pyroscope and read the result as flame graphs.

  • Works in 3 steps: Instrument an app with the SDK… → Cluster-wide eBPF profiling with Alloy → Query with ProfileQL
  • Adding profiling to a service
  • SKILL.md covers Prerequisites, Instrumentation paths, Common Workflows and Troubleshooting, plus 1 more section
  • Calls curl, jq and pip; reaches profiles-prod-xxx.grafana.net; needs GRAFANA_API_KEY

What it does

Pyroscope is an agent skill from grafana/skills, published by the product's own GitHub organization. Continuously profile applications with Grafana Pyroscope and read the result as flame graphs. Covers three instrumentation paths — language SDK push (Go / Java / Python / Ruby / Node / .NET / Rust), Alloy eBPF auto-instrumentation (no code change, requires kernel 5.8+ with BTF), and SDK → Alloy receiver — plus ProfileQL queries, profile types (CPU / memory / allocations / goroutines / mutex), Grafana Cloud Profiles endpoint, and Span Profiles trace-to-profile linking. Use when adding profiling to a service…

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/ebpf-and-query.md` and `references/sdks.md`).

It sits in DevOps & Cloud, covering Performance optimization and Monitoring and alerting. It works with Grafana, Python, Java and Ruby. The licence is Apache-2.0.

When your agent uses it

  • Adding profiling to a service
  • Deploying Alloy as a cluster-wide eBPF profiler
  • Hunting CPU / memory hotspots from a flame graph
  • Comparing two profiles to find a regression

Example prompts

  • “find what”
  • “flame graph this app”
  • “continuous profiling”
  • “/pyroscope”

Requirements

  • Python 3
  • A credential in GRAFANA_API_KEY

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Instrument an app with the SDK (representative: Python)
  2. Cluster-wide eBPF profiling with Alloy
  3. Query with ProfileQL

What it can do on your machine

Read from SKILL.md and the folder at commit 1ccacf2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • jq
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • profiles-prod-xxx.grafana.net

    Also links to:

    • grafana.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GRAFANA_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pyroscope loads about 1.2k tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 223 tokens; SKILL.md has 208 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~223
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from grafana/skills at commit 1ccacf2, republished under its Apache-2.0 licence (© grafana). 208 words, ~1,189 tokens.

Download SKILL.mdSave it as .claude/skills/pyroscope/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
pyroscope
description
Continuously profile applications with Grafana Pyroscope and read the result as flame graphs. Covers three instrumentation paths — language SDK push (Go / Java / Python / Ruby / Node / .NET / Rust), Alloy eBPF auto-instrumentation (no code change, requires kernel 5.8+ with BTF), and SDK → Alloy receiver — plus ProfileQL queries, profile types (CPU / memory / allocations / goroutines / mutex), Grafana Cloud Profiles endpoint, and Span Profiles trace-to-profile linking. Use when adding profiling to a service, deploying Alloy as a cluster-wide eBPF profiler, hunting CPU / memory hotspots from a flame graph, comparing two profiles to find a regression, or correlating a slow Tempo trace to its profile — even when the user says "find what's burning CPU", "flame graph this app", "continuous profiling", "heap hotspots", or "why is allocation so high" without naming Pyroscope.
license
Apache-2.0

Grafana Pyroscope

Docs: https://grafana.com/docs/pyroscope/latest/

Continuous profiling — flame graphs of CPU, memory, allocations, mutex contention, goroutines.

Prerequisites

  • Pyroscope server (OSS) or Grafana Cloud Profiles endpoint
  • For Cloud: numeric Pyroscope user (stack id) + API key
  • For eBPF via Alloy: root + host PID + Linux ≥ 5.8 with BTF (or RHEL 4.18+)

Instrumentation paths

  1. Alloy eBPF (preferred) — auto-instrument, no code change
  2. SDK direct push — application calls Pyroscope API
  3. SDK → Alloy — SDK posts to pyroscope.receive_http, Alloy forwards

Common Workflows

1. Instrument an app with the SDK (representative: Python)
bash
pip install pyroscope-io==1.0.11
python
import pyroscope, os
pyroscope.configure(
    application_name="my.python.app",
    server_address="http://pyroscope:4040",
    sample_rate=100, oncpu=True,
    tags={"region": os.getenv("REGION"), "env": "prod"},
)
# Dynamic tag for a hot path
with pyroscope.tag_wrapper({"controller": "slow_controller"}):
    slow_code()
bash
# Verify the app is pushing — Pyroscope ingests samples in a few seconds
curl -s http://pyroscope:4040/ready                                    # → "ready"
curl -s http://pyroscope:4040/api/v1/labels | jq '.data | index("service_name")'  # → not null

# Verify the service shows up in Grafana → Explore → Profiles → service dropdown.

Other SDKs (Java agent, Node, Ruby, .NET, Rust) + Cloud auth + tunable env vars: references/sdks.md.

2. Cluster-wide eBPF profiling with Alloy
alloy
# config.alloy — full block in references/ebpf-and-query.md
pyroscope.ebpf "local_pods" {
  forward_to       = [pyroscope.write.cloud.receiver]
  targets          = discovery.relabel.local_pods.output
  sample_rate      = 97
  collect_interval = "15s"
}
pyroscope.write "cloud" {
  endpoint {
    url = "https://profiles-prod-xxx.grafana.net"
    basic_auth { username = sys.env("PYROSCOPE_USER")
                 password = sys.env("GRAFANA_API_KEY") }
  }
}
bash
# 1. Reload Alloy
curl -X POST http://localhost:12345/-/reload

# 2. Verify the eBPF component is healthy
curl -s http://localhost:12345/api/v0/web/components \
  | jq '.[] | select(.id|contains("pyroscope.ebpf")) | {id,health:.health.state}'
# Expect: health.state == "healthy"

# 3. Verify profiles arriving in Pyroscope
#    Grafana → Explore → Profiles datasource → query:
#      {namespace="default", __profile_type__="process_cpu:cpu:nanoseconds:cpu:nanoseconds"}
#    Expect flame graph to render with frames from the target pods.
3. Query with ProfileQL
{service_name="myapp", env="prod",
 __profile_type__="process_cpu:cpu:nanoseconds:cpu:nanoseconds"}

Profile-type list + full ProfileQL grammar: references/ebpf-and-query.md.

Troubleshooting

  • SDK starts but no flame graph → check the app actually called start() / configure() (some SDKs are lazy); check server_address reachable from inside the container
  • Alloy eBPF component unhealthy with BPF errors → kernel < 5.8 or BTF missing; ls /sys/kernel/btf/vmlinux
  • Cloud push 401 → wrong basic_auth_username (must be the numeric stack id, not the slug)
  • Profile shows up but with no frames → for Java, set PYROSCOPE_FORMAT=jfr; for Python on Alpine, ensure procfs and glibc compatibility

Resources

© grafana, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/grafana-lgtm/pyroscope of grafana/skills.

  • SKILL.md
  • references/ebpf-and-query.md
  • references/sdks.md

Open the folder on GitHubat commit 1ccacf2

Compare with similar skills

Pyroscope next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pyroscope compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pyroscope this skillgrafana/skills278—~1.2kAutomated safety check: PassApache-2.0
Syncmetapawurb/hotpath-rs1.9k—~1.2kAutomated safety check: NotesMIT
Qdrant Advisorqdrant/skills253—~1.7kAutomated safety check: PassApache-2.0
Supercovsupercorp-ai/supercov1481 repos~415Automated safety check: PassMIT
Audit FiltersAzure/azure-sdk-tools134—~2.7kAutomated safety check: PassMIT
Find Untested Sourcesdotnet/skills5.6k1 repos~3.3kAutomated safety check: PassMIT

Similar skills

  • Syncmeta

    pawurb/hotpath-rs

    Sync changes from the hotpath, hotpath-macros and hotpath-drain crates to their meta counterparts (hotpath-meta, hotpath-macros-meta and hotpath-drain-meta).

    1.9k GitHub stars~1.2k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Qdrant Advisor

    qdrant/skills

    Official

    Diagnose, troubleshoot, and advise on any Qdrant deployment by loading the latest official Qdrant skills live from skills.qdrant.tech.

    253 GitHub stars~1.7k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Supercov

    supercorp-ai/supercov

    Measures test coverage and code quality in a repository with the supercov CLI, and turns what it finds into small, focused tests or fixes.

    148 GitHub starsUsed in 1 repo~415 tokens
    Testing & QAAuto-check passed
  • Audit Filters

    Azure/azure-sdk-tools

    Official

    Analyze feedback and memories to suggest filter.yaml additions, then open a PR.

    134 GitHub stars~2.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    Statically pairs source files with test files to list code that no test references, using Roslyn for C# or tree-sitter for many languages, with no build.

    5.6k GitHub starsUsed in 1 repo~3.3k tokens
    Testing & QAAuto-check passed
  • Run profile-driven bottleneck optimization across Apache Fory implementations (Java, C++, Python/Cython, Go, Rust, Swift, C, JavaScript/TypeScript, Dart, Kotlin, Scala).

    4.6k GitHub stars~2.2k tokensUpdated today
    MobileAuto-check passed

More from grafana/skills

All 51 skills in this repo
  • K6 Docs

    grafana/skills

    Official

    Write or review k6 documentation across the three k6 repositories - k6-DefinitelyTyped (TypeScript types), k6-docs (user documentation), and k6 (release notes / changelog).

    278 GitHub stars~678 tokensUpdated today
    Auto-check passed
  • Alerting Irm

    grafana/skills

    Official

    Configure Grafana Alerting, Incident Response Management (IRM), and SLOs end-to-end — provisions Grafana-managed and data-source-managed alert rules, contact points (Slack/PagerDuty/email/webhook)…

    278 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Dashboarding

    grafana/skills

    Official

    Build, modify, and ship Grafana dashboards as JSON via the HTTP API — panel types (timeseries / stat / gauge / table / heatmap / logs / traces / node-graph), gridPos 24-column layout, units…

    278 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • K6 Perf Test Website

    grafana/skills

    Official

    A skill your agent uses when the user wants to performance-test, load-test, or stress-test a public website end-to-end with k6.

    278 GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Promql

    grafana/skills

    Official

    Write, validate, and optimize PromQL for Prometheus / Grafana Mimir / Grafana Cloud Metrics.

    278 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Adaptive Metrics

    grafana/skills

    Official

    Cut Grafana Cloud Metrics cost by shrinking active-series count with Adaptive Metrics aggregation rules — auto-recommendations from query history, custom exact/regex rules, label-drop config…

    278 GitHub stars~1.3k tokensUpdated today
    Auto-check passed

Questions about Pyroscope

What does Pyroscope do?

Continuously profile applications with Grafana Pyroscope and read the result as flame graphs. Pyroscope is an agent skill from grafana/skills, published by the product's own GitHub organization. Continuously profile applications with Grafana Pyroscope and read the result as flame graphs.

When should I use Pyroscope?

Pyroscope fits situations like: adding profiling to a service; deploying Alloy as a cluster-wide eBPF profiler; hunting CPU / memory hotspots from a flame graph; comparing two profiles to find a regression.

How do I install Pyroscope in Claude Code?

Run `npx skills add grafana/skills --skill pyroscope -a claude-code`. Or copy the skill folder (skills/grafana-lgtm/pyroscope in grafana/skills) into .claude/skills/pyroscope in your project. Claude Code loads it when a task matches its description.

How do I install Pyroscope in Codex?

Run `npx skills add grafana/skills --skill pyroscope -a codex`. Or copy the skill folder (skills/grafana-lgtm/pyroscope in grafana/skills) into .agents/skills/pyroscope in your project. Codex loads it when a task matches its description.

Can I use Pyroscope in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add grafana/skills --skill pyroscope -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pyroscope, .gemini/skills/pyroscope, .github/skills/pyroscope and .opencode/skills/pyroscope in your project.

What does Pyroscope need to run?

Going by SKILL.md and its folder, Pyroscope needs the command-line tools its instructions call (curl, jq and pip) and credentials named GRAFANA_API_KEY. Our summary lists: Python 3; A credential in GRAFANA_API_KEY.

Does Pyroscope access the network?

SKILL.md names 2 domains. In commands or code: profiles-prod-xxx.grafana.net; the agent is likely to contact it when it follows the instructions. As links in the text: grafana.com. This is read from the text; nothing was executed.

Is Pyroscope safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pyroscope use?

Pyroscope is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pyroscope use?

About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.5k tokens, read only when the agent opens those files.

What are the alternatives to Pyroscope?

Skills that share tags, products or a category with Pyroscope: Syncmeta (pawurb/hotpath-rs, 1.9k stars), Qdrant Advisor (qdrant/skills, 253 stars), Supercov (supercorp-ai/supercov, 148 stars) and Audit Filters (Azure/azure-sdk-tools, 134 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pyroscope?

grafana (a GitHub organization, an official publisher) maintains it in grafana/skills, which has 278 GitHub stars. The repository holds 51 skills in this directory. The repository was last updated on October 6, 2026.

Source: grafana/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.