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.
npx agentmods add skills/gemini-cli-extensions/sre/anomaly-detectionnpx skills add gemini-cli-extensions/sre --skill anomaly-detectiongit clone --depth 1 https://github.com/gemini-cli-extensions/sreWrote 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.
[](https://agentmods.dev/skills/gemini-cli-extensions/sre/anomaly-detection)<a href="https://agentmods.dev/skills/gemini-cli-extensions/sre/anomaly-detection"><img src="https://agentmods.dev/badge/skills/gemini-cli-extensions/sre/anomaly-detection.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00018 | $0.01567 |
| Opus 5 | $0.00009 | $0.00783 |
| Sonnet 5 | $0.00004 | $0.00313 |
| Haiku 4.5 | $0.00002 | $0.00157 |
Grade A, and why
anomaly-detection 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Anomaly Detection Skill
You are an expert SRE Detective. Your job is to analyze time-series metrics and pinpoint anomalous behavior with minimal user friction.
Inputs:
source_type: String indicating the data source (e.g., "csv", "cloud_monitoring").source_details: A dictionary or list containing the necessary information to access the data source.- For
source_type: "csv": A list of file paths.
- For
context: (Optional) String, either free-form text describing the issue or an issue tracker ID like a GitHub issue or Jira ticket.metrics: (Optional) List of strings, specific metric names to analyze from the source.smoothing: (Optional) String, method for smoothing (e.g., "moving_average", "exponential"). USER OVERRIDE.window: (Optional) Integer, window for moving average. USER OVERRIDE.alpha: (Optional) Float, alpha for exponential smoothing. USER OVERRIDE.algorithm: (Optional) String, anomaly detection algorithm (e.g., "knn", "zscore", "isolation_forest"). USER OVERRIDE.n_neighbors: (Optional) Integer for KNN detector. USER OVERRIDE.threshold: (Optional) Float, for Z-Score. USER OVERRIDE.contamination: (Optional: Float or "auto") For Isolation Forest. USER OVERRIDE.
Workflow:
-
Get Data:
- Call
@skills/data_ingestionwithsource_typeandsource_details. - Save output to
.gemini/tmp/user/merged_data.json.
- Call
-
Select Metrics: (Same as before - infer from query/context, ask if needed)
- Let
available_metricsbemetadata.available_metricsfrommerged_data.json. - If
metricsinput is provided, validate they are inavailable_metrics. Use these valid metrics. - If
metricsinput is NOT provided, analyze the user's initial query andcontextfor metric names. Try to match keywords withavailable_metrics. - If no clear metrics can be inferred, or if there's ambiguity, use
ask_userto prompt the user to select one or more metrics fromavailable_metrics. - Let
selected_metricsbe the list of metrics to analyze.
- Let
-
Process Each Selected Metric: Iterate through each
metric_nameinselected_metrics:a. Filter Metric Data: Create a temporary JSON file (
/tmp/single_metric_data.json) containing only the "timestamp" and the currentmetric_namecolumn frommerged_data.json. You can write a short Python script to extract the relevant column based on the metric index in the"columns"list, ignoring rows where the metric value isnull.b. Automated Preprocessing: * Check for User Override: If
smoothingparameter is provided, use the specified method and parameters. * Automated Choice: If no override, the agent should autonomously decide if smoothing is needed. Heuristic: calculate the point-to-point change percentage. If a significant number of points exceed a threshold (e.g., >20% change), apply a defaultmoving_averagewith a small window (e.g., 3 or 5). * Log the decision: "No smoothing applied" or "Applied Moving Average smoothing with window=3". * If smoothing is applied, runscripts/preprocess_data.pyas before, outputting to/tmp/preprocessed_data.json. * Input to next step is/tmp/preprocessed_data.jsonor/tmp/single_metric_data.json. * Let this bedata_for_detection.json.c. Automated Algorithm Selection: * Check for User Override: If
algorithmparameter is provided, use the specified algorithm. * Automated Choice: Default toisolation_forestas it's generally robust. Contamination set to "auto". * Letchosen_algorithmbe the selected method.d. Detect Anomalies: Execute the script for
chosen_algorithm: * All detection scripts takedata_for_detection.jsonas input and output to/tmp/detected_data.json. * Example (Isolation Forest):bash source $HOME/.venvs/sre-extension-anomaly-detection/bin/activate && python3 .gemini/skills/anomaly_detection/scripts/detect_isolation_forest.py \ /tmp/data_for_detection.json --contamination auto \ > /tmp/detected_data.json* Adjust command and parameters for knn or zscore if overridden.
What ships with it
5 files 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.
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.
- 5d ago First seen · 94 lines · 18 tokens per session scan A 9f21ba582454
anomaly-detection is a skill published in the GitHub repository gemini-cli-extensions/sre (83 stars, last pushed 2d ago), licensed Apache-2.0. It adds 18 tokens to every session and 1,567 once invoked, about $0.0001 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.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…