log-detective

log-detective is a skill for Claude Code, Codex from microsoft/aibast-agents-library. It costs 44 tokens per session (10,469 once invoked), scanned A, original, MIT.

A command-line tool for turning plain-text or JSON-lines log files into summaries, grouped error patterns, timelines, or filtered lines. Logs are records of events produced by software while it runs.

In plain words
What is it for?
Use it to count log levels, find the busiest minute, group near-identical errors, build time buckets, or search with surrounding context.
Why use it?
Large logs are difficult to read because the same failure may appear with different IDs, times, or paths. Grouping similar errors and showing when they happened makes incident investigation easier without uploading the data.

Skill for Claude CodeCodex ✓ vendor

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

Good fit Use it to count log levels, find the busiest minute, group near-identical errors, build time buckets, or search with surrounding context.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/microsoft/aibast-agents-library/log_detective
About the project

AIBAST Agents Library is a collection of industry-focused AI agent templates accompanied by a local server that connects agents to GitHub Copilot for language-model inference. It helps developers create and run tool-using agents and isolated project environments, with an optional cloud-backed path for persistent memory. The catalogue entries provide the repository's agents, skills, commands, hooks, and instructions.

microsoft/aibast-agents-library · 8 stars · on GitHub

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 microsoft/aibast-agents-library --skill log_detective
Clone the repo
git clone --depth 1 https://github.com/microsoft/aibast-agents-library

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 log-detective

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/aibast-agents-library/log_detective/github.svg)](https://agentmods.dev/skills/microsoft/aibast-agents-library/log_detective)
Your own site
<a href="https://agentmods.dev/skills/microsoft/aibast-agents-library/log_detective"><img src="https://agentmods.dev/badge/skills/microsoft/aibast-agents-library/log_detective/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 log-detective

Your own site · 80×15
<a href="https://agentmods.dev/skills/microsoft/aibast-agents-library/log_detective"><img src="https://agentmods.dev/badge/skills/microsoft/aibast-agents-library/log_detective.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,469 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.00044 $0.10469
Opus 5.5 $0.00018 $0.04188
Sonnet 5.5 $0.00009 $0.02094
Haiku 4.5 $0.00004 $0.01047

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

Security

Grade A, and why

log-detective 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (log_detective_agent.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

beta/store/log_detective/SKILL.md · 213 lines

How it starts

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

Log Detective — turn a wall of log lines into the three things you needed.

summarise   level counts, time span, busiest minute, top error signatures
signatures  cluster near-identical errors by shape, not text
timeline    events per bucket, so a spike has a timestamp
grep        filtered lines with surrounding context

No network, no credentials, no parsing config. Handles plain text, and reads JSON-lines logs structurally when it detects them.

WHY IT CLUSTERS BY SIGNATURE INSTEAD OF COUNTING LINES

Ten thousand errors are usually four errors. Raw counts hide that: every line differs by a request id, a timestamp, a port number, so nothing groups and you scroll. Normalising the variable parts — numbers, hex ids, UUIDs, paths, quoted strings — collapses them into a handful of shapes, and the shape is the bug.

WHY 'BUSIEST MINUTE' IS ITS OWN NUMBER

An incident is a spike, and a spike is invisible in a total. Knowing that 80% of the day's errors landed inside one minute changes what you go and look at.

WHY IT NEVER PHONES HOME

Logs are the single most PII-dense artifact most systems produce. Anything that uploads them to be "analysed" is a data-egress decision disguised as a feature. This reads local files and returns local results.

Parameters

The typed contract this capability answers to (JSON Schema — the deterministic layer):

{
  "type": "object",
  "properties": {
    "action": {
      "type": "string",
      "enum": [
        "summarise",
        "signatures",
        "timeline",
        "grep"
      ],
      "description": "What to do."
    },
    "path": {
      "type": "string",
      "description": "Path to the log file."
    },
    "pattern": {
      "type": "string",
      "description": "For grep: a regular expression."
    },
    "context": {
      "type": "integer",
      "description": "For grep: lines of context. Default 1."
    },
    "top": {
      "type": "integer",
      "description": "How many signatures/buckets. Default 10."
    }
  },
  "required": [
    "action",
    "path"
  ]
}

Read the full file on GitHub · 213 lines

Files

What ships with it

3 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.

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. 2d ago First seen · 213 lines · 44 tokens per session scan A 163d659d4873

Subscribe to this mod's changes

log-detective is a skill published in the GitHub repository microsoft/aibast-agents-library (8 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 10,469 once invoked, about $0.0002 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-11-06.

Related

log-detective compared with skills from other repositories

log-detective next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
log-detectivemicrosoft/aibast-agents-librarySkill8yesterdayMITA44Claude Code, Codex
systematic-debuggingopen-metadata/OpenMetadataSkill16ktodayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7kyesterdayMITA71Claude Code, Codex
cwv-optimizeradobe/skillsSkill321todayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2ktodayApache-2.0A15Claude Code, Codex
incident-response-incident-responsermyndharis/antigravity-skillsSkill2.0kyesterdayMITA36Claude Code, Codex
diagnosing-missing-recordingsPostHog/posthogSkill41ktodaynoneA76Claude Code, Codex