Agent skill · grafana
profilecli-insights
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.
What it needs
About 4k tokens when loaded.
What this skill does
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: 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: Step 2: Verify connectivity and data exists Run a series query to validate the connection and discover profile types: If this succeeds, parse the JSON output and retain the available profiletype values. Common types include: processcpu:cpu:nanoseconds:cpu:nanoseconds (CPU) memory:allocspace:bytes:space:bytes (memory allocations) memory:inusespace: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. PROFILECLIURL is required. Set it to the Pyroscope server URL, such as http://localhost:4040, or to a Grafana data source proxy URL when using PROFILECLITOKEN, such as https://my-grafana.example.com/api/datasources/proxy/uid/<datasource-uid>. PROFILECLITOKEN is required for Grafana Cloud. It must be a Grafana service account token in glsa... format with the Viewer role. PROFILECLITENANTID 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: Parse the JSON output for servicename and servicerepository. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills grafana/profilecli-insights