agento11y-instrument

agento11y-instrument is a skill for Claude Code from grafana/gcx. It costs 422 tokens per session (7,091 once invoked), scanned A, original, Apache-2.0.

A setup and troubleshooting guide for connecting an AI application or agent to Grafana Agent Observability, a service that records its model calls and workflow activity.

In plain words
What is it for?
Adding new instrumentation, repairing broken or partial setup, and confirming that agents, conversations, and model calls appear in the observability system.
Why use it?
It checks the actual code for missing instrumentation and verifies that data reaches Grafana, helping avoid silent gaps where nothing is recorded.

Skill for Claude Code ✓ vendor

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents; mentions Claude Code.

Part of the gcx plugin — 24 skills, 1 agent shipped together

Good fit Adding new instrumentation, repairing broken or partial setup, and confirming that agents, conversations, and model calls appear in the observability system.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/grafana/gcx/agento11y-instrument
About the project

gcx is a command-line tool that lets people and AI coding agents manage and inspect Grafana Cloud, Enterprise, and open-source instances. It provides access to dashboards, alerts, SLOs, metrics, logs, and traces, with workflows for alert investigation, dashboard management, GitOps, and observability setup. Its catalogue entries provide agent instructions and extensions for using gcx.

grafana/gcx · 597 stars · on GitHub · grafana.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add grafana/gcx --skill agento11y-instrument
Clone the repo
git clone --depth 1 https://github.com/grafana/gcx

Made for: Claude Code.

Or install gcx, the plugin that ships this one along with the rest of its 24 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agento11y-instrument

README.md
[![agentmods](https://agentmods.dev/badge/skills/grafana/gcx/agento11y-instrument/github.svg)](https://agentmods.dev/skills/grafana/gcx/agento11y-instrument)
Your own site
<a href="https://agentmods.dev/skills/grafana/gcx/agento11y-instrument"><img src="https://agentmods.dev/badge/skills/grafana/gcx/agento11y-instrument/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agento11y-instrument

Your own site · 80×15
<a href="https://agentmods.dev/skills/grafana/gcx/agento11y-instrument"><img src="https://agentmods.dev/badge/skills/grafana/gcx/agento11y-instrument.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 422 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,091 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 89
    Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.
    Fix: Set explicit rate limits, timeouts, and resource quotas for API calls, file operations, and compute. Implement circuit breakers for runaway loops.
  • medium Excessive Agency · line 267
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00422 $0.07091
Opus 5 $0.00211 $0.03546
Sonnet 5 $0.00084 $0.01418
Haiku 4.5 $0.00042 $0.00709

Measured 11d ago against content hash 4dfcd8ea6d6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

agento11y-instrument scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude-plugin/skills/agento11y-instrument/SKILL.md · 336 lines

How it starts

The opening of the file, as written. The whole thing — 336 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Observability — instrument an LLM app

Help a developer wire their own LLM app or agent to Grafana Agent Observability, from zero or from a broken/partial state, and keep going until data actually lands in the stack. The value this skill adds over the static instrumentation prompt is two things a prompt can't do:

  1. A mechanical gap checklist run against the real code — headed by the one failure that is completely silent (missing OTel providers → every metric lost, no error).
  2. A verification loop through gcx: after each change, run the app and check the gcx agento11y agents / conversations / generations commands to confirm generations arrived. Diagnose the next gap from what's missing, not from guesswork.

The SDK reference (env vars, provider snippets, field lists, framework adapters, workflow steps) lives in agento11y's llms.txt "Path B". Fetch it rather than restating it here; this file holds the flow and the decision logic. A minimal fallback lives in references/instrumentation.md for when the fetch is unavailable.

Rules

  • Reference, don't restate. Fetch SDK detail from https://raw.githubusercontent.com/grafana/agento11y/main/llms.txt (Path B). Only inline decision logic here. If the fetch fails, fall back to references/instrumentation.md.
  • Never invent an endpoint or a token. Read them from the environment (AGENTO11Y_ENDPOINT, AGENTO11Y_PROTOCOL, AGENTO11Y_AUTH_MODE, AGENTO11Y_AUTH_TENANT_ID, AGENTO11Y_AUTH_TOKEN, OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS) or ask the developer. Never fabricate a URL or mint a token.
  • Target is Grafana Cloud. The developer supplies the endpoint + token (Step 0), and the gcx verification loop (Step 5) confirms data landing against the Cloud tenant. Never fabricate the endpoint or token — read them from the environment or ask.
  • Write AGENTO11Y_* env vars, never SIGIL_*. SIGIL_* is a deprecated legacy fallback. Do this even if sibling apps or existing .env files in the repo use SIGIL_* — matching a stale local convention perpetuates it. If the app already reads SIGIL_*, add the AGENTO11Y_* names (the SDK still honors both) and note the old ones are deprecated. Do not "match the siblings."
  • Gate every code WRITE on explicit confirmation. Report first (Step 4), apply only after the developer says yes (Step 5). Read-only gcx verification and re-running the app happen freely inside the loop; editing files does not.
  • Keep diffs small; do not change app behavior. Instrumentation is additive. No refactors, no prompt rewrites, no dependency upgrades beyond the SDK/adapter packages actually needed.
  • Never change the model, provider, or the app's LLM config — not even with permission, not even "just to run the verify loop." Instrument whatever model the app already uses. This is absolute: changing the model is out of scope for instrumentation, full stop. If a run fails because a provider API key is missing, the only allowed responses are: (a) ask the developer to provide the key for the model the app already uses, or (b) skip the live run and report the wiring as verified-by-construction, telling the developer to run it themselves. Do not offer to switch the provider, do not ask "which provider should I use?", and do not add a new provider dependency (e.g. langchain-anthropic) to make the run succeed. If the developer separately says they want a different model, that is an app change they own — tell them to make it and re-invoke this skill; do not fold it into the instrumentation diff. Swapping the model silently changes what the app does and what gets observed, which defeats the point. The provider API key (ANTHROPIC_API_KEY, OPENAI_API_KEY, …) is the app's own concern, not the instrumentation's — it authenticates the LLM call, not the telemetry export, and the app already has it if it runs at all. So don't ask for it, configure it, or rewire it; if the live verify-run fails on a missing provider key, skip the run and report verified-by-construction (see Step 5). Just don't conflate the two 401s: a 401 on generation ingest is observability auth and is yours to fix (usually a missing AGENTO11Y_PROTOCOL/AGENTO11Y_AUTH_MODE); an auth error from the model provider is not — surface it and let the developer handle their own key.
  • Do not assume language symmetry. Verify the provider wrapper / framework adapter actually exists for the app's language before recommending it (Python has the most adapters, JS fewer, Go only google-adk, Java/.NET core + providers + google-adk). If it doesn't exist, hand-instrument with the core SDK. Prefer, in order: provider wrapper → framework adapter → hand-instrumentation.
  • The loop is bounded. At most ~3–4 instrument→verify iterations. If data still isn't landing, stop and report what's checked and what remains — don't loop forever.
  • Field-name traps: cache_write_input_tokens, NOT cache_creation_input_tokens. agent_version maps to the gen_ai.agent.version label and is required for per-version Performance charts. MessageRole (Python SDK) has only USER, ASSISTANT, TOOL — there is no SYSTEM (or DEVELOPER) member; MessageRole.SYSTEM raises AttributeError. Fold the system prompt into the USER message (or a text_part), and prefer the user_text_message() / assistant_text_message() / tool_result_message() helpers over hand-building Message(role=...). Always confirm enum members and helper names against the installed package before running — do not assume from llms.txt.
  • Out of scope: offline test suites → agento11y-test-starter; tenant eval rules + guards on real traffic → agento11y-prod-setup. Coding-agent telemetry plugins (Claude Code, Cursor, …) → llms.txt "Path A". Any control-plane write.
  • If a required input is missing (entrypoint, framework, endpoint, gcx auth), ask — don't guess.

Read the full file on GitHub · 336 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 336 lines · 422 tokens per session scan A 4dfcd8ea6d6e

Subscribe to this mod's changes

agento11y-instrument is a skill published in the GitHub repository grafana/gcx (597 stars, last pushed today), licensed Apache-2.0. It adds 422 tokens to every session and 7,091 once invoked, about $0.0021 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens