anomaly-investigation

anomaly-investigation is a skill for Claude Code from gaasher/Agent-Loop-Skills. It costs 153 tokens per session (1,986 once invoked), scanned A, original, MIT.

A data-investigation workflow for finding the confirmed cause of an observed anomaly, such as a sudden spike, drop, outlier, or unexpected value. It tests possible explanations and removes those the data disproves.

In plain words
What is it for?
It helps investigate known data problems, compare candidate causes, test them against the data, narrow the possibilities, and confirm a root cause.
Why use it?
It replaces plausible stories with evidence by requiring each proposed cause to survive attempts to refute it and make a prediction that comes true.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: names the AskUserQuestion tool; mentions Claude Code.

Part of the Agent-Loop-Skills plugin — 25 skills shipped together

Good fit It helps investigate known data problems, compare candidate causes, test them against the data, narrow the possibilities, and confirm a root cause.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gaasher/agent-loop-skills/anomaly-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 gaasher/Agent-Loop-Skills --skill anomaly-investigation
Clone the repo
git clone --depth 1 https://github.com/gaasher/Agent-Loop-Skills

Made for: Claude Code.

Or install Agent-Loop-Skills, the plugin that ships this one along with the rest of its 25 skills.

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 anomaly-investigation

README.md
[![agentmods](https://agentmods.dev/badge/skills/gaasher/agent-loop-skills/anomaly-investigation/github.svg)](https://agentmods.dev/skills/gaasher/agent-loop-skills/anomaly-investigation)
Your own site
<a href="https://agentmods.dev/skills/gaasher/agent-loop-skills/anomaly-investigation"><img src="https://agentmods.dev/badge/skills/gaasher/agent-loop-skills/anomaly-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 anomaly-investigation

Your own site · 80×15
<a href="https://agentmods.dev/skills/gaasher/agent-loop-skills/anomaly-investigation"><img src="https://agentmods.dev/badge/skills/gaasher/agent-loop-skills/anomaly-investigation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 153 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,986 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 pass 7 Sept 2026
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.00153 $0.01986
Opus 5 $0.00077 $0.00993
Sonnet 5 $0.00031 $0.00397
Haiku 4.5 $0.00015 $0.00199

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

Security

Grade A, and why

anomaly-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 10d 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.

loops/anomaly-investigation/SKILL.md · 133 lines

How it starts

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

Anomaly Investigation Loop

A form → test → eliminate → confirm loop — root-cause analysis as a search. The artifact is an investigation log; the feedback signal is the count of live candidate explanations, driven down toward a single cause that is confirmed, not merely consistent. Each iteration you test one candidate against the data and drop the ones the data refutes, narrowing the field until one survives.

The discipline this enforces: a cause is "root" only when it both survives an honest attempt to refute it and makes a positive prediction that checks out (e.g. "if this is the cause, removing it restores normal" — and it does). A story that merely could explain the anomaly is a hypothesis, not a finding.

When to use

Use this when an anomaly is already in hand — you know roughly what looks wrong and want the cause diagnosed by elimination against the data. Default to a broad initial slate of mutually distinguishable causes, then test the one that splits the field fastest; if the anomaly is vague, your first job is to make it precise (iteration 0). Not for open-ended exploration of a dataset with no anomaly to chase (use data-analysis), and not for verifying an external claim against the literature (use claim-verify).

Setup

Resolve bindings interactively. If loop.run.yaml exists in the working dir, load it, confirm the values in one line, and skip to the loop. Otherwise: on Claude Code (the AskUserQuestion tool is available) infer a likely value for each binding and present it as the recommended option; on other hosts ask each as a quoted plain-text prompt. Then write loop.run.yaml (format: examples/run.example.yaml) and confirm the values before creating any other files.

binding meaning default how to infer
<dataset> data (or logs) to investigate; read-only ground truth scan the working dir for a data/log file
<anomaly> what looks wrong: the metric, where/when, and how big the deviation is ask the user; make precise in iter 0
<analysis_cmd> interpreter that runs analysis snippets in the user's env python3 pyproject.toml/.venv/uv in the working dir
<log> output investigation log <sandbox_root>/investigation.md
<sandbox_root> where snippets + ledger live ./sandbox
<budget> max iterations 8

Read the full file on GitHub · 133 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. 10d ago First seen · 133 lines · 153 tokens per session scan A ee7ce06f7d6e

Subscribe to this mod's changes

anomaly-investigation is a skill published in the GitHub repository gaasher/Agent-Loop-Skills (169 stars, last pushed 2mo ago), licensed MIT. It adds 153 tokens to every session and 1,986 once invoked, about $0.0008 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

sn-image-base

Base-layer skill for the SenseNova-Skills project, providing low-level APIs for image generation, recognition (VLM), and text optimization (LLM). This skill does not preprocess inputs; it only calls backend services and returns results. This skill is not user-facing and is intended for upper-layer skills only.

OpenSenseNova/SenseNova-Skills · 66 tokens

sn-search-academic

An academic research tool for finding papers and encyclopedia entries, reading papers in full or by section, and tracing references and citations. It supports structured literature research.

OpenSenseNova/SenseNova-Skills · 31 tokens

ppt-analysis

A parser for PowerPoint presentations in .pptx or older .ppt format that extracts their contents and flags slides needing image-based inspection.

OpenSenseNova/SenseNova-Skills · 51 tokens

excel-data-analysis-and-report-generation

A skill for extracting, categorising, counting, and comparing data from Excel spreadsheets. It can produce summary tables with totals, percentages, and cross-tabulations.

OpenSenseNova/SenseNova-Skills · 30 tokens

sn-da-non-spreadsheet-analysis

A skill for extracting and analysing content from Word files, PDFs, and PowerPoint presentations. It can work with text, tables, numbers, charts, formatting, and information across multiple documents.

OpenSenseNova/SenseNova-Skills · 234 tokens

large-file-conditional-formatting

An Excel analysis step that counts rows, calculates average values for a selected entity over time, and creates a styled report with color-based formatting. It can switch to Parquet, a column-based data format, for larger files.

OpenSenseNova/SenseNova-Skills · 60 tokens