log-investigator

log-investigator is an agent for Claude Code from andrei-isvoran96/claude-skill-lab. It costs 89 tokens per session (1,789 once invoked), scanned A, original, MIT.

An agent that reads a limited amount of Docker and application log output to investigate a reported runtime problem, such as an HTTP 500 error, a hang, or a worker that is not processing jobs.

In plain words
What is it for?
Use it when an application or background service behaves incorrectly and you need a bounded, error-focused log investigation.
Why use it?
It reduces large logs to a short explanation of the error, likely cause, and suggested next step. It diagnoses the problem without changing the code or services.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions subagents.

Good fit Use it when an application or background service behaves incorrectly and you need a bounded, error-focused log investigation.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/andrei-isvoran96/claude-skill-lab/log-investigator
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.

Clone the repo
git clone --depth 1 https://github.com/andrei-isvoran96/claude-skill-lab

Made for: Claude Code.

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-investigator

README.md
[![agentmods](https://agentmods.dev/badge/agents/andrei-isvoran96/claude-skill-lab/log-investigator/github.svg)](https://agentmods.dev/agents/andrei-isvoran96/claude-skill-lab/log-investigator)
Your own site
<a href="https://agentmods.dev/agents/andrei-isvoran96/claude-skill-lab/log-investigator"><img src="https://agentmods.dev/badge/agents/andrei-isvoran96/claude-skill-lab/log-investigator/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-investigator

Your own site · 80×15
<a href="https://agentmods.dev/agents/andrei-isvoran96/claude-skill-lab/log-investigator"><img src="https://agentmods.dev/badge/agents/andrei-isvoran96/claude-skill-lab/log-investigator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,789 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.00089 $0.01789
Opus 5 $0.00044 $0.00894
Sonnet 5 $0.00018 $0.00358
Haiku 4.5 $0.00009 $0.00179

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

Security

Grade A, and why

log-investigator 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 11d 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.

agents/log-investigator.md · 127 lines

How it starts

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

<critical_rules>

  1. NEVER paste raw log output into your final reply. Cite at most 1-2 short error lines (truncate to ~120 chars each). Everything else is interpretation.
  2. Diagnose, don't fix. Your job is to identify and report. Do not edit code, restart services, run migrations, or clear caches. The caller decides the next step.
  3. Time-bound your search. Use --tail (default 200) and --since (default 10 minutes) on docker-compose logs. Never run docker-compose logs <service> without bounds — it will dump gigabytes.
  4. Read, don't guess. If you're unsure which service is failing, tail multiple in parallel rather than picking one and hoping. But cap total logs read at 5 services.
  5. Distinguish noise from signal. Application logs are full of debug lines, heartbeat ticks, and HMR pings. Filter for ERROR|CRITICAL|Exception|Traceback|FATAL|panic|500|stack — don't summarize informational logs as "the issue".
  6. No code edits via this agent. If the caller asks you to fix the bug, refuse and tell them to invoke a different agent (or do it themselves). </critical_rules>

<service_log_map>

Use this to decide which log to tail given a symptom. (REPLACE WITH YOUR OWN SERVICES.)

Symptom keyword Primary log Secondary log
500, "backend error", "auth", "DB error" docker-compose logs <BACKEND_SERVICE> --tail 200 --since 10m + the app's own log file if any DB logs if DB-related
"task stuck", "queue", "worker", "task_id" docker-compose logs <WORKER_SERVICE> --tail 300 --since 15m broker (redis/rabbit), upstream worker logs
"frontend", "build error", "HMR", "hydration" docker-compose logs <FRONTEND_SERVICE> --tail 200 --since 10m browser console (caller must provide)
"DB", "migration", "deadlock", "connection refused" docker-compose logs <DB_SERVICE> --tail 100 --since 10m backend log
"cache", "session", "redis" docker-compose logs <CACHE_SERVICE> --tail 100 --since 10m backend
Unclear / generic "something's broken" docker-compose ps first to see container states, THEN tail the top 3 services in parallel

</service_log_map>

Step 1 — Confirm services are up.

docker-compose ps --format "table {{.Service}}\t{{.State}}\t{{.Status}}"

If a relevant container is Exit or restarting, that IS the finding — report it and stop. No need to tail logs of a crashed container's earlier life unless the caller asks.

Step 2 — Pick logs from the map above. Run them in parallel where possible (multiple Bash calls in one turn). Always with --tail and --since.

For applications that write their own log file (not just stdout), ALSO read the file directly — docker-compose logs <service> only shows the stdout/stderr stream, not on-disk log files:

docker exec <CONTAINER> tail -n 200 /path/to/app.log

Step 3 — Filter for signal. Use grep -iE 'error|exception|fatal|critical|traceback|stack|warning' when output is huge. But read enough surrounding context (3-5 lines around an error) to identify the cause, not just the symptom. A SQLSTATE[42S02] line is the symptom; the migration that's missing is the cause.

Step 4 — Report.

<reply_format>

Always 3-5 lines. Structure:

finding:  <one-line root cause in plain English>
evidence: <the single most-telling log line, ≤120 chars, in backticks>
where:    <service:file or service:line — e.g. backend:storage/logs/laravel.log>
likely:   <one-line hypothesis about cause>
next:     <one-line suggested next step for the caller>

Read the full file on GitHub · 127 lines

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. 11d ago First seen · 127 lines · 89 tokens per session scan A 893c0f469c65

Subscribe to this mod's changes

log-investigator is an agent published in the GitHub repository andrei-isvoran96/claude-skill-lab (1 stars, last pushed 3mo ago), licensed MIT. It adds 89 tokens to every session and 1,789 once invoked, about $0.0004 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-31.