exception-root-cause-investigation

exception-root-cause-investigation is a skill for Claude Code, Codex from last9/last9-mcp-server. It costs 23 tokens per session (757 once invoked), scanned A, original, Apache-2.0.

A workflow for investigating whether aggregated server exceptions point to an underlying cause. Server exceptions are errors raised while a service handles requests; aggregate data groups them by service and type.

In plain words
What is it for?
Use it to find the most common exception groups, inspect related traces, and determine whether exceptions are the root cause or a symptom.
Why use it?
It helps distinguish the actual cause from a downstream symptom, such as a span error caused by another service. It limits the investigation to the available evidence and avoids presenting aggregates as exact trace samples.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to find the most common exception groups, inspect related traces, and determine whether exceptions are the root cause or a symptom.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/last9/last9-mcp-server/exception-root-cause-investigation
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 last9/last9-mcp-server --skill exception-root-cause-investigation
Clone the repo
git clone --depth 1 https://github.com/last9/last9-mcp-server

Made for: Claude Code, Codex.

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 exception-root-cause-investigation

README.md
[![agentmods](https://agentmods.dev/badge/skills/last9/last9-mcp-server/exception-root-cause-investigation/github.svg)](https://agentmods.dev/skills/last9/last9-mcp-server/exception-root-cause-investigation)
Your own site
<a href="https://agentmods.dev/skills/last9/last9-mcp-server/exception-root-cause-investigation"><img src="https://agentmods.dev/badge/skills/last9/last9-mcp-server/exception-root-cause-investigation/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 exception-root-cause-investigation

Your own site · 80×15
<a href="https://agentmods.dev/skills/last9/last9-mcp-server/exception-root-cause-investigation"><img src="https://agentmods.dev/badge/skills/last9/last9-mcp-server/exception-root-cause-investigation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 757 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.
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.00023 $0.00757
Opus 5.5 $0.00009 $0.00303
Sonnet 5.5 $0.00005 $0.00151
Haiku 4.5 $0.00002 $0.00076

Measured yesterday against content hash a64ff22fe803, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

exception-root-cause-investigation 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 yesterday.

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.

plugins/amp/last9/references/skills/exception-root-cause-investigation/SKILL.md · 56 lines

What it actually says

Workflow: exception root-cause investigation.

Use this workflow when investigating server-side exceptions, especially when span errors may be a downstream symptom rather than the root cause.

Do not repeat a successful call or broaden an empty query. If a call fails, correct its arguments once; stop after the bounded line read and report what the data supports.

Steps:

  1. Call get_exceptions to identify the hottest aggregate service and exception type group. Its rows are metric aggregates, not trace samples or exact time bounds.
  2. Call get_service_profile(service_name=<service from step 1>). Use the result for all routing below — do not re-derive telemetry shape via PromQL or attribute probing.
  3. Unless telemetry.traces == "absent", call get_service_traces (service_name, the same requested start/end window, env when present) to inspect contextual traces. Do not represent those traces as exact samples of the aggregate exception row. Skip this step only when traces are absent.
  4. Decide whether the exceptions are the ANSWER or a SYMPTOM. This is a verdict on what step 3 returned, not a second gate on fetching traces:
    • severity_set == "all" AND telemetry.traces != "absent" → exceptions are likely the answer; report and stop.
    • telemetry.logs != "absent" AND (severity_set in ("none", "partial") OR telemetry.traces == "absent") → exceptions are likely symptoms; continue to logs (step 5).
    • telemetry.logs == "absent" AND telemetry.traces == "absent" → report from get_exceptions only; do not call trace or log tools.
    • derivation.log_tier == "failed" OR signal fields == "unknown" → proceed with caution; use get_log_attributes_for_pipeline as fallback.
    • Results contradict profile → apply contradiction clause.
  5. Continue into logs when step 4 routes to logs and telemetry.logs != "absent", AGGREGATE FIRST: build the get_logs count pipeline using profile.signal_shape — use signal_shape.level_field when the profile reports one; when it does not, discover the field with get_log_attributes_for_pipeline rather than guessing a name (never SeverityText when severity_set is none or partial); if log_format is "json", add parse stage per signal_shape.parse_hint; gate on ERROR/FATAL/CRITICAL using the level field; aggregate $count grouped by logger. This is cheap and wide-window-safe. Never raw-fetch lines before this aggregate — an unnarrowed fetch times out over wide windows.
  6. Once the aggregate isolates the hot logger, READ THE LINES: filter to that logger and always pass a limit (a handful of lines is enough). Use a non-aggregate get_logs pipeline for this bounded read — never get_service_logs during or after this investigation flow (HTTP status-class log search is a separate task, and does use get_service_logs). Report the actual root-cause error text you read — the count locates the problem, the lines explain it.

When error_detection.recommended_ingest_fix is present in the profile, include it in the investigation report.

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. yesterday First seen · 56 lines · 23 tokens per session scan A a64ff22fe803

Subscribe to this mod's changes

exception-root-cause-investigation is a skill published in the GitHub repository last9/last9-mcp-server (62 stars, last pushed today), licensed Apache-2.0. It adds 23 tokens to every session and 757 once invoked, about $0.0001 per session on Opus 5.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-12-05.

Related

exception-root-cause-investigation compared with skills from other repositories

exception-root-cause-investigation next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
exception-root-cause-investigationlast9/last9-mcp-serverSkill62todayApache-2.0A23Claude Code, Codex
observability-phoenixdavila7/claude-code-templatesSkill35ktodayMITA47Claude Code, Codex
langsmith-observabilitysynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A45Claude Code, Codex
detecting-process-injection-techniquesadriannoes/awesome-agentic-aiSkill1118d agoMITA78Claude Code, Codex
systematic-debuggingmonoscope-tech/monoscopeSkill2.2ktodayAGPL-3.0A21Claude Code, Codex
investigating-ransomware-attack-artifactsadriannoes/awesome-agentic-aiSkill1118d agoMITB36Claude Code, Codex
signoz-investigating-alertsSigNoz/agent-skillsSkill229d agoMITA138Claude Code