/llm-observability:validate-genai-spansfrom llm-observability
Validates OpenTelemetry GenAI spans for spec compliance, checking required fields like gen_ai.provider.name and gen_ai.operation.name. Ships a Python validator script for instrumentation tests to catch missing token/cost fields before they break dashboards.
Ships in llm-observability. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Broken instrumentation fails silently: the app works, the dashboards just quietly miss the model, the tokens, or the cost. This skill ships a validator that asserts your spans carry the required OpenTelemetry gen_ai.* fields, so you catch gaps in a test instead of in a half-empty dashboard.
scripts/validate_span.py is pure Python, no install needed:
from validate_span import validate_gen_ai_span, is_valid_gen_ai_span
problems = validate_gen_ai_span(span_attributes) # [] means valid
validate_gen_ai_span(span_attributes, strict=True) # also flag recommended fields
assert is_valid_gen_ai_span(span_attributes) # use in an instrumentation test
It checks the required fields (gen_ai.provider.name, gen_ai.operation.name, gen_ai.request.model) and, in strict mode, the recommended usage fields (gen_ai.usage.input_tokens/output_tokens, gen_ai.response.model) that cost analysis depends on. Spans still using the pre-2025 gen_ai.system name pass but get a deprecation note, so you can migrate at your own pace.
is_valid_gen_ai_span(attrs).Pairs with instrument-llm-observability (which gets the spans emitted in the first place).
Run the tests: pytest skills/validate-genai-spans/tests/. They cover a valid span, each missing required field, empty/wrong-typed values, the deprecated gen_ai.system alias, strict-mode recommended checks, and non-dict input.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub contextjet-ai/awesome-llm-observability --plugin llm-observability26 skills in this plugin
/add-llm-evalsUse this when adding evaluation to an LLM/agent app - measuring output quality (correctness, faithfulness, relevance, safety) rather than just watching traces. Trigger on "add evals", "test my prompt", "is my RAG accurate", "catch regressions", "score outputs", or setting up an eval suite in CI. Covers offline (CI) and online (production LLM-as-a-judge) evaluation./add-llm-fallbacksUse this to make an LLM app resilient to provider failures, rate limits, timeouts, and outages. Trigger on "handle LLM API errors", "add retries/fallbacks", "the app breaks when OpenAI is down", "rate limit errors", "make my LLM calls reliable", "timeout handling". Add retries, timeouts, and model/provider fallbacks, and observe them so failures are visible./add-llm-guardrailsUse this to add safety and security guardrails to an LLM/agent app - blocking prompt injection, PII leakage, jailbreaks, toxic output, off-topic responses, or invalid structured output. Trigger on "add guardrails", "prevent prompt injection", "stop PII leaks", "validate the model's output", "make this safe for production", especially for regulated/finance/enterprise use./annotate-traces-for-reviewUse this to set up human review and annotation of LLM traces, so people (often domain experts) can label outputs, do error analysis, and build a trustworthy golden dataset. Trigger on "review my LLM outputs", "have an expert label these", "error analysis", "annotate traces", "build a golden dataset", or when automated evals are not enough for a high-stakes or specialized domain. Looking at your data is the highest-ROI thing you can do./build-eval-datasetUse this to build a good evaluation dataset for an LLM app, the part everyone underestimates. Trigger on "make an eval set", "what should I test my LLM on", "I don't have test data for my prompt", "build a golden dataset", or before setting up evals. A great eval set beats a great metric; garbage-in means your evals lie to you./check-answer-consistencyUse this to get a cheap, reference-free signal that an LLM answer might be made up, by sampling the same prompt a few times and measuring agreement. Trigger on "is this answer reliable", "flag low-confidence answers", "cheap hallucination check", "confidence score without a ground truth", "self-consistency check". Ships a runnable, tested scorer you can put inline or on sampled traffic.Other plugins' skills for the same job