Official agent skill

Profilecli Insights

by grafana in grafana/skills

Query live Pyroscope profiles with profilecli, analyze them with pprof, and correlate hot functions with checked-out source code.

OfficialApache-2.0Auto-check passedDevOps & Cloud

Install Profilecli Insights

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

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

GitHub CLI
$ gh skill install grafana/skills profilecli-insights --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/profilecli-insights .claude/skills/profilecli-insights && 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
profilecli-insights
GitHub stars
281
Token cost
~1.8k tokens
SKILL.md length
770 words
Files
1
Skills in repo
51
Repo updated
First seen
Licence
Apache-2.0

At a glance

Query live Pyroscope profiles with profilecli, analyze them with pprof, and correlate hot functions with checked-out source code.

  • Works in 7 steps: Ensure profilecli is available → Verify connectivity and data exists → Discover services → …
  • The user asks to investigate a service with a configured Pyroscope server
  • SKILL.md covers Step 1: Ensure profilecli is…, Step 2: Verify connectivity…, Step 3: Discover services and Step 4: Query the relevant…, plus 4 more sections
  • Calls git; reaches github.com; needs PROFILECLI_TOKEN

What it does

Profilecli Insights is an agent skill from grafana/skills, published by the product's own GitHub organization. Query live Pyroscope profiles with profilecli, analyze them with pprof, and correlate hot functions with checked-out source code. Use when the user asks to investigate a service with a configured Pyroscope server, profilecli, and pprof.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Requires profilecli and pprof, or Go with go tool pprof, on PATH plus access to a Pyroscope-compatible server.

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

When your agent uses it

  • The user asks to investigate a service with a configured Pyroscope server
  • Tasks that involve Monitoring and alerting

Example prompts

  • “/profilecli-insights”

Requirements

  • A credential in PROFILECLI_TOKEN
  • Compatibility (from SKILL.md): Requires profilecli and pprof, or Go with go tool pprof, on PATH plus access to a Pyroscope-compatible server.
  • Pre-approved tools (allowed-tools): Bash(profilecli:*), Bash(pprof:*), Bash(go tool pprof:*), Bash(git:*), Bash(mktemp:*), Read, Grep, Glob

Workflow steps

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

  1. Ensure profilecli is available
  2. Verify connectivity and data exists
  3. Discover services
  4. Query the relevant profile type
  5. Identify hot functions
  6. Map hot functions to source code
  7. Deliver analysis

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 these tools, so the agent can use them without asking each time:

    • Bash(profilecli:*)
    • Bash(pprof:*)
    • Bash(go tool pprof:*)
    • Bash(git:*)
    • Bash(mktemp:*)
    • Read
    • Grep
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    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:

    • github.com

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

  • Credentials

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

    • PROFILECLI_TOKEN

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

  • Compatibility

    Requires profilecli and pprof, or Go with go tool pprof, on PATH plus access to a Pyroscope-compatible server.

    From compatibility in the SKILL.md frontmatter.

Context cost

Profilecli Insights loads about 1.8k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 770 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

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). 770 words, ~1,803 tokens.

Download SKILL.mdSave it as .claude/skills/profilecli-insights/SKILL.md (or your agent's skills folder).
name
profilecli-insights
description
Query live Pyroscope profiles with profilecli, analyze them with pprof, and correlate hot functions with checked-out source code. Use when the user asks to investigate a service with a configured Pyroscope server, profilecli, and pprof.
allowed-tools
Bash(profilecli:*), Bash(pprof:*), Bash(go tool pprof:*), Bash(git:*), Bash(mktemp:*), Read, Grep, Glob
compatibility
Requires profilecli and pprof, or Go with go tool pprof, on PATH plus access to a Pyroscope-compatible server.
license
Apache-2.0

Profilecli Insights

You are a performance analysis assistant. Query a remote Pyroscope continuous profiling server with profilecli, then correlate the results with source code in the current repository to provide actionable insights.

Follow these steps in order. Do not skip steps.

Step 1: Ensure profilecli is available

Check that profilecli is on PATH:

bash
profilecli --version

If it is not found, instruct the user to download it from https://github.com/grafana/pyroscope/releases/latest/download/.

Select the command to use for all later profile analysis:

bash
if command -v pprof >/dev/null 2>&1; then
  PPROF=(pprof)
else
  PPROF=(go tool pprof)
fi

Step 2: Verify connectivity and data exists

Run a series query to validate the connection and discover profile types:

bash
profilecli query series --label-names=__profile_type__ --output json

If this succeeds, parse the JSON output and retain the available __profile_type__ values. Common types include:

  • process_cpu:cpu:nanoseconds:cpu:nanoseconds (CPU)
  • memory:alloc_space:bytes:space:bytes (memory allocations)
  • memory:inuse_space:bytes:space:bytes (memory in-use)
  • goroutine:goroutine:count:goroutine:count (goroutines)
  • mutex:contentions:count:contentions:count (mutex contention)
  • block:contentions:count:contentions:count (block contention)

You need these profile types in Step 4.

If the query fails, help the user configure the connection:

  • Run a local Pyroscope server on port 4040.
  • Or connect to Grafana with a service account token.

PROFILECLI_URL is required. Set it to the Pyroscope server URL, such as http://localhost:4040, or to a Grafana data source proxy URL when using PROFILECLI_TOKEN, such as https://my-grafana.example.com/api/datasources/proxy/uid/<datasource-uid>.

PROFILECLI_TOKEN is required for Grafana Cloud. It must be a Grafana service account token in glsa_... format with the Viewer role. PROFILECLI_TENANT_ID is optional for multi-tenant setups.

Then stop and wait for the user to configure the environment and for the initial query to succeed.

Step 3: Discover services

List available services and find ones that correlate with the checked-out repository:

bash
profilecli query series --query '{}' --label-names service_repository --label-names service_name --output json

Parse the JSON output for service_name and service_repository. Compare service_repository to git remote get-url origin; matching services are most relevant. Match the user's question to one or more service names.

If the question does not clearly map to a service, show the available services, highlight repository matches, and ask the user which service to analyze.

Step 4: Query the relevant profile type

Query the target service with an appropriate type discovered in Step 2. The query must be a valid ProfileQL label selector.

bash
PROFILE="$(mktemp -t profilecli-insights)"

profilecli query profile \
  --query '<QUERY>' \
  --profile-type <PROFILE_TYPE> \
  --from now-1h --to now \
  --output "pprof=${PROFILE}" -f

If the output is empty, broaden the range to --from now-6h or --from now-24h.

Analyze the generated profile:

bash
"${PPROF[@]}" -lines -top -cum "${PROFILE}"

Step 5: Identify hot functions

Extract the functions with the most flat and cumulative samples. Highlight:

  • High flat time, which identifies self time.
  • High cumulative time, which includes callees.
  • Significant runtime and standard-library functions: runtime.mallocgc suggests allocation pressure, runtime.futex or runtime.lock suggests lock contention, runtime.gcBgMarkWorker or runtime.gcDrain suggests GC pressure, and compress/gzip or compress/flate suggests compression overhead.
Show full SKILL.md (362 more words)Show less

Step 6: Map hot functions to source code

The pprof -lines -top -cum output lists functions in this format:

<flat> <flat%> <sum%> <cum> <cum%>  <function-name> <source-file>:<line>

For example:

1859.03s 23.50%  ...  github.com/grafana/pyroscope/pkg/distributor.(*Distributor).PushBatch.func1 github.com/grafana/pyroscope/pkg/distributor/distributor.go:380

Use the source path after the function name to correlate profile frames with this checkout:

  1. Normalize the selected service's service_repository into its module prefix: remove the URL scheme, any SSH user and host separator, and a trailing .git. For example, https://github.com/grafana/pyroscope.git becomes github.com/grafana/pyroscope.
  2. Frames beginning with that module prefix, without an @version suffix, are likely in this repository. Third-party Go dependencies typically include @v... in their module path.
  3. Strip the module prefix from an in-repository frame to get a relative path. For example, github.com/grafana/pyroscope/pkg/distributor/distributor.go:380 becomes pkg/distributor/distributor.go at line 380.
  4. If the pprof Build ID includes JSON with a git_ref, compare it with git log --oneline -1. If they differ, warn that line numbers may be stale. Use git log --oneline <git_ref>..HEAD -- <file> to see whether the mapped file changed. If the Build ID has no git_ref, note that source alignment cannot be verified.
  5. Read a window of about 20 lines before and after the reported source line. Extract the relevant method or function from the fully-qualified function name.

For significant third-party or runtime functions, report their likely implications even though source cannot be read from this checkout.

Step 7: Deliver analysis

Present a structured report with these sections:

Summary

Give a two- to three-sentence overview of the profile.

Top Hot Functions

Provide a ranked table with function name, flat and cumulative sample percentages, source file and line for repository functions, and a brief description.

Source Code Analysis

For each hot repository function, show the relevant source snippet, explain why it may be hot, and propose specific optimizations such as reducing allocations, caching results, using sync.Pool, or reducing lock contention.

Recommendations

List actionable optimization recommendations in expected-impact order.

Error Handling

  • If profilecli is missing, direct the user to https://github.com/grafana/pyroscope/releases/latest.
  • For connection errors, verify PROFILECLI_URL and network access.
  • For 401 or 403 errors, verify PROFILECLI_TOKEN and PROFILECLI_TENANT_ID.
  • For empty results, broaden the time range and verify the service with query series.
  • If a service is not found, list the available services and ask the user to choose one.

© 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

Just SKILL.md in skills/grafana-lgtm/profilecli-insights of grafana/skills.

Open the folder on GitHubat commit 1ccacf2

Compare with similar skills

Profilecli Insights 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.

Profilecli Insights compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Profilecli Insights this skillgrafana/skills281—~1.8kAutomated safety check: PassApache-2.0
Mz Release SignoffMaterializeInc/materialize6.4k—~7.2kAutomated safety check: PassCustom licence
Axiom Dashboard Builderopenclaw/clawhub9.5k—~4.9kAutomated safety check: PassMIT
Happy Infra Metrics and Grafanaslopus/happy24k—~2kAutomated safety check: NotesMIT
Syncmetapawurb/hotpath-rs1.9k—~1.2kAutomated safety check: NotesMIT
Optimize Slurm TopologyNVlabs/alpasim1.3k—~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Mz Release Signoff

    MaterializeInc/materialize

    Verify a release candidate on the Grafana dashboards and sign off in release.

    6.4k GitHub stars~7.2k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Axiom Dashboard Builder

    openclaw/clawhub

    Designs and deploys Axiom dashboards through the API, choosing chart types and writing APL or metrics queries, with templates and migration notes for Splunk and Grafana.

    9.5k GitHub stars~4.9k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Queries live Prometheus metrics and manages Grafana dashboards as code for Happy's infrastructure, using the grafanactl CLI and the Grafana datasource proxy API.

    24k GitHub stars~2k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • 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
  • Optimize AlpaSim Slurm topology throughput using persistent local Prometheus/Grafana telemetry and run artifacts.

    1.3k GitHub stars~1.6k tokensUpdated 21 days ago
    DevOps & CloudAuto-check passed
  • Specifies how to instrument an opik-backend pipeline with per-stage OpenTelemetry metrics for throughput, latency, errors and queue delay by workspace.

    22k GitHub stars~3.2k tokensUpdated today
    DevOps & CloudAuto-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).

    281 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)…

    281 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…

    281 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.

    281 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.

    281 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…

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

Works with

Categories

Questions about Profilecli Insights

What does Profilecli Insights do?

Query live Pyroscope profiles with profilecli, analyze them with pprof, and correlate hot functions with checked-out source code. Profilecli Insights is an agent skill from grafana/skills, published by the product's own GitHub organization. Query live Pyroscope profiles with profilecli, analyze them with pprof, and correlate hot functions with checked-out source code.

When should I use Profilecli Insights?

Profilecli Insights fits situations like: the user asks to investigate a service with a configured Pyroscope server; tasks that involve Monitoring and alerting.

How do I install Profilecli Insights in Claude Code?

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

How do I install Profilecli Insights in Codex?

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

Can I use Profilecli Insights 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 profilecli-insights -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/profilecli-insights, .gemini/skills/profilecli-insights, .github/skills/profilecli-insights and .opencode/skills/profilecli-insights in your project.

What does Profilecli Insights need to run?

Going by SKILL.md and its folder, Profilecli Insights needs the command-line tools its instructions call (git) and credentials named PROFILECLI_TOKEN. Our summary lists: A credential in PROFILECLI_TOKEN. Its frontmatter pre-approves these tools: Bash(profilecli:*), Bash(pprof:*), Bash(go tool pprof:*), Bash(git:*), Bash(mktemp:*), Read, Grep, Glob. Compatibility (from SKILL.md): Requires profilecli and pprof, or Go with go tool pprof, on PATH plus access to a Pyroscope-compatible server..

Does Profilecli Insights access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Profilecli Insights 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 Profilecli Insights use?

Profilecli Insights 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 Profilecli Insights use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Profilecli Insights?

Skills that share tags, products or a category with Profilecli Insights: Mz Release Signoff (MaterializeInc/materialize, 6.4k stars), Axiom Dashboard Builder (openclaw/clawhub, 9.5k stars), Happy Infra Metrics and Grafana (slopus/happy, 24k stars) and Syncmeta (pawurb/hotpath-rs, 1.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Profilecli Insights?

grafana (a GitHub organization, an official publisher) maintains it in grafana/skills, which has 281 GitHub stars. The repository holds 51 skills in this directory. The repository was last updated on October 8, 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.