Agent skill

Mecatl Perf MCP Interpretation

by stacklok in stacklok/mecatl

Guides reading mecatl's perf MCP data to find why a running harness is slow, leaking goroutines or growing in memory, using cheap reads before any CPU capture.

Apache-2.0Auto-check passedDevelopment

Install Mecatl Perf MCP Interpretation

skills CLI
$ npx skills add stacklok/mecatl --skill perf-mcp-interpretation -a claude-code

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

GitHub CLI
$ gh skill install stacklok/mecatl perf-mcp-interpretation --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/stacklok/mecatl.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/perf-mcp-interpretation .claude/skills/perf-mcp-interpretation && 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
perf-mcp-interpretation
GitHub stars
218
Token cost
~2.3k tokens
SKILL.md length
1,035 words
Files
3 (incl. references)
Skills in repo
7
Repo updated
First seen
Licence
Apache-2.0

At a glance

Guides reading mecatl's perf MCP data to find why a running harness is slow, leaking goroutines or growing in memory, using cheap reads before any CPU capture.

  • Works in 4 steps: Start cheap, read state.… → Cheap tools next. query_metric (one… → Perturbing tools last. top_cpu_functions… → …
  • Investigating why a running mecatl harness is slow or growing in memory
  • SKILL.md covers Cost discipline — what to…, The MCP surface (what is…, Honest-precision caveat — do… and Interpreting the signatures, plus 2 more sections
  • Calls go

What it does

mecatl is a streaming agentic loop whose time goes mostly to off-CPU waiting on the model and on tool I/O, so reaching for a CPU profile first tends to measure the wrong thing. The skill sets a cost order. First come the free point-in-time reads `perf://runtime/summary` (goroutines, heap, GC, RSS, uptime) and `perf://metrics/summary` (latency quantiles), re-read a few times to see trends. Next come the cheap tools `query_metric`, `top_allocations` and `list_slow_turns`.

Last are `top_cpu_functions` and `capture_cpu_profile`, which perturb the process for `duration_seconds` and are limited to one capture per cooldown window, so they serve only to confirm a hypothesis. Raw profile and flight-recorder artifacts come back as links for a human to open with `go tool pprof` or `go tool trace`; the agent works from the reduced summary and can filter large JSON results in memory with `CallMcpWithQuery`. Reference files describe output shapes and the leak, contention and GC signatures. It is not for generic Go profiling or other MCP servers.

When your agent uses it

  • Investigating why a running mecatl harness is slow or growing in memory
  • Telling a goroutine leak apart from GC pressure or allocation churn
  • Choosing which perf MCP tool to call first without perturbing the process

Example prompts

  • “mecatl feels slow on long turns. Read the perf summaries and tell me where the time goes.”
  • “Goroutine count keeps climbing. Check the runtime summary a few times and look for a leak signature.”
  • “Which allocation hotspots does top_allocations show right now?”

Requirements

  • A connection to the mecatl perf MCP server (started with `--perf-mcp`)
  • Compatibility (from SKILL.md): Requires a connection to the mecatl perf MCP server (mecated/mecatui --perf-mcp, mounted at /mcp on the loopback admin listener).

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Start cheap, read state. perf://runtime/summary (goroutines, heap, GC,
  2. Cheap tools next. query_metric (one curated metric; omit metric_name to
  3. Perturbing tools last. top_cpu_functions and capture_cpu_profile start a
  4. Never ingest raw blobs. capture_cpu_profile (with include_raw_link) and

What it can do on your machine

Read from SKILL.md and the folder at commit e731897. 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:

    • go

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

  • Network

    No URLs in SKILL.md.

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

  • Credentials

    Names no API keys, tokens, secrets or passwords.

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

  • Compatibility

    Requires a connection to the mecatl perf MCP server (mecated/mecatui --perf-mcp, mounted at /mcp on the loopback admin listener).

    From compatibility in the SKILL.md frontmatter.

Context cost

Mecatl Perf MCP Interpretation loads about 2.3k tokens when it runs, and up to ~5.3k if it reads all its reference files. Until then it costs about 153 tokens; SKILL.md has 1,035 words of instructions outside code blocks.

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

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 stacklok/mecatl at commit e731897, republished under its Apache-2.0 licence (© stacklok). 1,035 words, ~2,326 tokens.

Download SKILL.mdSave it as .claude/skills/perf-mcp-interpretation/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
perf-mcp-interpretation
description
Interpret the mecatl perf MCP server's output to diagnose latency, goroutine leaks, GC pressure, allocation churn, and memory growth in a running mecatl harness. Use when connected to the mecatl perf MCP server (the perf:// resources or the query_metric / top_cpu_functions / capture_cpu_profile / top_allocations / list_slow_turns / capture_flight_recorder tools) and investigating why mecatl is slow, leaking, or growing. Covers tool routing/cost, reading pprof rankings and runtime metrics, and the leak/contention/GC signatures. NOT for generic Go profiling or non-mecatl MCP servers.
compatibility
Requires a connection to the mecatl perf MCP server (mecated/mecatui --perf-mcp, mounted at /mcp on the loopback admin listener).
metadata.audience
an AI agent driving or debugging a mecatl harness over the perf MCP server

Interpreting mecatl perf MCP output

mecatl is a streaming agentic loop. Its time is dominated by off-CPU waiting (on the model and on tool I/O), so the usual "run a CPU profile first" instinct measures the wrong thing. Diagnose by reading cheap numeric state first, and reach for the perturbing CPU tools only with a hypothesis to confirm.

Cost discipline — what to call, in what order

  1. Start cheap, read state. perf://runtime/summary (goroutines, heap, GC, RSS, uptime) and perf://metrics/summary (latency-histogram quantiles) are free, point-in-time reads. Read them first, and re-read perf://runtime/summary a few times to see trends — a single snapshot rarely diagnoses anything.
  2. Cheap tools next. query_metric (one curated metric; omit metric_name to list names), top_allocations (heap rankings, no profiling window), list_slow_turns (per-turn timing) are all cheap and unlimited.
  3. Perturbing tools last. top_cpu_functions and capture_cpu_profile start a live CPU profile that PERTURBS the process for duration_seconds, and are rate limited to one capture per cooldown window across both tools. Call them only to confirm a hypothesis, not to explore. A rate-limit hit comes back as an isError result saying to retry — wait, do not retry-spam.
  4. Never ingest raw blobs. capture_cpu_profile (with include_raw_link) and capture_flight_recorder return a user-audience resource_link to a loopback /debug/... endpoint. That link now surfaces as a TYPED BLOCK the model can see (URI + name + description) rather than a bare URI — but the model still receives only the reduced summary, never the raw blob bytes. A human downloads the linked artifact (with go tool pprof / go tool trace); if the link is https:// the model MAY fetch it via the FetchMcpResource tool (SSRF-validated through ValidateMediaURL). The perf:// resources on this server are NOT https and stay server-readonly via ReadMcpResource. Do NOT try to read a linked raw artifact into model context; report the summary and point the user at the link (or fetch an https link only if you genuinely need its contents). If a perf tool's JSON result is large and you only need a subset of fields, filter it in memory with CallMcpWithQuery (server + tool + jq_filter) rather than narrowing the call — it runs the remote tool and applies a jq filter before the result enters context (ADR 0063).

The MCP surface (what is actually there)

Resources (cheap, read-only, JSON):

  • perf://runtime/summary — goroutines, num_cpu, gomaxprocs, heap_allocs_total_bytes, heap_objects, total_memory_bytes, heap_object_bytes, gc_pause_count, gc_pause_p99_upper_bound_ns, rss_bytes, uptime_seconds, available[]. Note: heap_allocs_total_bytes is a cumulative COUNTER (bytes ever allocated) — a huge value (100+ GB on a long-lived process) is normal, not a leak; the leak signal is the rss_bytes / heap_object_bytes slope.
  • perf://runtime/memstats — memory-focused projection (heap_allocs_total_bytes, heap_objects, heap_object_bytes, total_memory_bytes, rss_bytes, available[]).
  • perf://metrics/summary — every curated metric reduced: histograms → count + p50/p90/p99 bucket upper bounds (seconds); counters/gauges → a scalar value. Histograms and the tool_calls_total/tokens/turns_total/turn_empty_total/ active_runs counters also carry a bounded by_role breakdown over the CLOSED engine role family main|subagent|member|parallel|usermodel|child (the main engine vs the delegation children — the axis for "which agent family is burning latency/tokens"; never a session id or agent-def name).
  • perf://pprof/{profile} — template, {profile} ∈ heap|goroutine|allocs|mutex|block; reduced top-15 functions (function, file basename, flat/cum values).

Tools (all read-only):

  • query_metric{metric_name?, quantile?, role?} — one curated metric; aggregated across all roles by default, or one role family's share with role.
  • top_cpu_functions{duration_seconds?, limit?} — perturbs, rate-limited.
  • capture_cpu_profile{duration_seconds?, limit?, include_raw_link?} — perturbs, rate-limited.
  • top_allocations{limit?} — heap top-N + total_heap_bytes.
  • list_slow_turns{threshold_ms?, limit?, cursor?, role?} — cursor-paginated, newest first; each turn carries its bounded role family.
  • capture_flight_recorder{} — size + one-line summary + user link (needs --flight-recorder).

See references/output-shapes.md for the exact field names of every tool's output (FuncStat, AllocStat, SlowTurn, MetricSummaryEntry).

Honest-precision caveat — do not over-trust the numbers

Every histogram quantile this server returns (in perf://metrics/summary, query_metric, and gc_pause_p99_upper_bound_ns) is the upper bound of the bucket the quantile rank falls in — NOT an interpolated exact quantile. The field is literally named upper_bound for this reason. Read p99 as "at worst this bucket's ceiling," not an exact value. Report it as an upper bound.

Show full SKILL.md (402 more words)Show less

Interpreting the signatures

The full signature → diagnosis → next-step table is in references/signatures.md. Read it when you have a symptom to match. The essentials:

  • Off-CPU workload. This loop mostly waits on the model/IO, so high CPU in JSON decode/marshal, markdown render, or chunk decode is the real signal in a CPU profile — that is on-CPU work on the hot streaming path. Rank by flat (self time) for the hot leaf; use cum (includes callees) to find the responsible caller.
  • Goroutine leak. goroutines rising monotonically across successive perf://runtime/summary reads (not just spiking during a run) = a leak. Read perf://pprof/goroutine to see which functions hold the stuck goroutines; this corroborates the live goroutine watchdog.
  • Off-heap growth (the WASM-leak signature). rss_bytes climbing while heap_object_bytes / total_memory_bytes stay flat = growth off the Go heap, invisible to pprof/heap and runtime metrics. (The historical cause was the RepoMap/tree-sitter WASM tool, since removed, but the pattern still stands for any off-heap consumer.)
  • GC-driven jitter. gc_pause_p99_upper_bound_ns spikes and a rising gc_pause_count, alongside high top_allocations on the streaming/chunk-decode path, explain inter-token jitter — GC pauses land between tokens.
  • User-felt latency = TTFT vs inter-token, split. Read ttft_seconds and inter_token_max_seconds separately (the mean hides both). High ttft = slow first byte; high inter_token_max = stutter the user feels mid-stream.
  • Dispatch contention. mecatl_tool_queue_seconds (short name tool_queue_seconds) rising together with tool_duration_seconds p99 = the read-parallel / mutate-serial dispatcher is queueing: a slow mutating tool serially blocks queued mutations. Queue time without duration is just load; both together is the contention signal.
  • Tail latency. Averages lie. Use list_slow_turns to find the actual tail turns, then capture_flight_recorder right after a slow turn to hand the human a trace window covering it.

Presence vs a real zero

available[] in the runtime/memstats snapshots lists which runtime/metrics fields were actually published by this toolchain. A field absent from available[] was not measured; a field present with value 0 is a real zero. gc_pause_count is legitimately 0 before the first GC. query_metric returns an isError "not present yet" for a metric with no observations — that means no relevant activity has happened, not that the metric is broken.

Workflow

  1. Read perf://runtime/summary and perf://metrics/summary.
  2. Match the symptom against the signatures above / references/signatures.md.
  3. Confirm with the cheap tool for that signature (top_allocations, query_metric, list_slow_turns, perf://pprof/goroutine).
  4. Only if you need function-level CPU attribution, spend the rate-limited top_cpu_functions / capture_cpu_profile once.
  5. Report findings as numbers + an upper-bound caveat; point the user at any raw resource_link rather than ingesting it.

© stacklok, 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 .claude/skills/perf-mcp-interpretation of stacklok/mecatl.

  • SKILL.md
  • references/output-shapes.md
  • references/signatures.md

Open the folder on GitHubat commit e731897

Compare with similar skills

Mecatl Perf MCP Interpretation 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.

Mecatl Perf MCP Interpretation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mecatl Perf MCP Interpretation this skillstacklok/mecatl218—~2.3kAutomated safety check: PassApache-2.0
Dotnet Debuggingnovotnyllc/dotnet-artisan233—~2.1kAutomated safety check: PassMIT
LoopX Performance Diagnosisloopx-project/loopx6.2k—~880Automated safety check: PassApache-2.0
Engineering Advanced Skillsalirezarezvani/claude-skills28k—~1.1kAutomated safety check: PassMIT
AI Operationsmajiayu000/claude-skill-registry6661 repos~1.4kAutomated safety check: PassApache-2.0
LangBot Plugin Developmentlangbot-app/LangBot18k—~3.9kAutomated safety check: PassApache-2.0

Similar skills

  • Dotnet Debugging

    novotnyllc/dotnet-artisan

    Debugs Windows and Linux/macOS applications (native, .NET/CLR, mixed-mode) with WinDbg MCP (crash dumps, !analyze, !syncblk, !dlk, !runaway, !dumpheap, !gcroot, BSOD), dotnet-dump, lldb with SOS…

    233 GitHub stars~2.1k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • LoopX Performance Diagnosis

    loopx-project/loopx

    Profiles a slow command or runtime you own with the right profiler for its language, using uninstrumented baseline timings and keeping raw profiling evidence local and private.

    6.2k GitHub stars~880 tokensUpdated today
    DevelopmentAuto-check passed
  • Engineering Advanced Skills

    alirezarezvani/claude-skills

    Index of 37 advanced engineering agent skills for Claude Code, Codex, Gemini CLI, Cursor, OpenClaw.

    28k GitHub stars~1.1k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • AI Operations

    majiayu000/claude-skill-registry

    Configure Harness AI-powered operations (AIDA) via MCP. An agent skill from majiayu000/claude-skill-registry.

    666 GitHub starsUsed in 1 repo~1.4k tokens
    DevOps & CloudAuto-check passed
  • LangBot Plugin Development

    langbot-app/LangBot

    Guides building, debugging and testing LangBot plugins: components, SDK calls, README and locale rules, SDK pitfalls and WebSocket-based testing.

    18k GitHub stars~3.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Extension Puppeteer Debugging

    mengxi-ream/read-frog

    Debug the built Read Frog extension in real Chrome. An agent skill from mengxi-ream/read-frog.

    10k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check: notes

More from stacklok/mecatl

  • Interviews you about provider, cost, openness and image needs, then designs the models section of a mecatl settings file with aliases, slots and router categories.

    218 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Runs mecatl's offline benchmark and scenario harness to measure, profile with pprof, optimize and prove a performance win with benchstat, then adds a regression benchmark.

    218 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Mecatl Release Cutting

    stacklok/mecatl

    Cuts a tagged mecatl release by dispatching the release-PR workflow, merging the bot's pull request and verifying the tag, images, Helm chart, signed archives and Homebrew formula.

    218 GitHub stars~4k tokensUpdated today
    Auto-check passed
  • mecatl Learning Config

    stacklok/mecatl

    Designs, validates and writes the learning section of a mecatl settings file, covering mode, sensitivity, reflection budgets and validated or evaluated activation.

    218 GitHub stars~3.8k tokensUpdated today
    Auto-check passed
  • Rebuilds the mecak8s image into the local mecatl-dev Kind cluster and builds mecatui, so you can try in-progress mecatl changes against a real Kubernetes deployment.

    218 GitHub stars~927 tokensUpdated today
    Auto-check passed
  • Panel Review

    stacklok/mecatl

    Review completed non-trivial code across four independent axes: Spec, Standards, Test adequacy, and installed Domain specialists.

    218 GitHub stars~5.8k tokensUpdated today
    Auto-check passed

Questions about Mecatl Perf MCP Interpretation

What does Mecatl Perf MCP Interpretation do?

Guides reading mecatl's perf MCP data to find why a running harness is slow, leaking goroutines or growing in memory, using cheap reads before any CPU capture. mecatl is a streaming agentic loop whose time goes mostly to off-CPU waiting on the model and on tool I/O, so reaching for a CPU profile first tends to measure the wrong thing. The skill sets a cost order.

When should I use Mecatl Perf MCP Interpretation?

Mecatl Perf MCP Interpretation fits situations like: investigating why a running mecatl harness is slow or growing in memory; telling a goroutine leak apart from GC pressure or allocation churn; choosing which perf MCP tool to call first without perturbing the process.

How do I install Mecatl Perf MCP Interpretation in Claude Code?

Run `npx skills add stacklok/mecatl --skill perf-mcp-interpretation -a claude-code`. Or copy the skill folder (.claude/skills/perf-mcp-interpretation in stacklok/mecatl) into .claude/skills/perf-mcp-interpretation in your project. Claude Code loads it when a task matches its description.

How do I install Mecatl Perf MCP Interpretation in Codex?

Run `npx skills add stacklok/mecatl --skill perf-mcp-interpretation -a codex`. Or copy the skill folder (.claude/skills/perf-mcp-interpretation in stacklok/mecatl) into .agents/skills/perf-mcp-interpretation in your project. Codex loads it when a task matches its description.

Can I use Mecatl Perf MCP Interpretation 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 stacklok/mecatl --skill perf-mcp-interpretation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/perf-mcp-interpretation, .gemini/skills/perf-mcp-interpretation, .github/skills/perf-mcp-interpretation and .opencode/skills/perf-mcp-interpretation in your project.

What does Mecatl Perf MCP Interpretation need to run?

Going by SKILL.md and its folder, Mecatl Perf MCP Interpretation needs the command-line tools its instructions call (go). Our summary lists: A connection to the mecatl perf MCP server (started with `--perf-mcp`). Compatibility (from SKILL.md): Requires a connection to the mecatl perf MCP server (mecated/mecatui --perf-mcp, mounted at /mcp on the loopback admin listener)..

Does Mecatl Perf MCP Interpretation access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Mecatl Perf MCP Interpretation 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 Mecatl Perf MCP Interpretation use?

Mecatl Perf MCP Interpretation is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mecatl Perf MCP Interpretation use?

About 2.3k tokens (SKILL.md is roughly 9.3k 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 3k tokens, read only when the agent opens those files.

What are the alternatives to Mecatl Perf MCP Interpretation?

Skills that share tags, products or a category with Mecatl Perf MCP Interpretation: Dotnet Debugging (novotnyllc/dotnet-artisan, 233 stars), LoopX Performance Diagnosis (loopx-project/loopx, 6.2k stars), Engineering Advanced Skills (alirezarezvani/claude-skills, 28k stars) and AI Operations (majiayu000/claude-skill-registry, 666 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mecatl Perf MCP Interpretation?

stacklok (a GitHub organization) maintains it in stacklok/mecatl, which has 218 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 6, 2026.

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