db-inspector

db-inspector is an agent for Claude Code from hoangsonww/Claude-Code-Agent-Monitor. It costs 83 tokens per session (1,128 once invoked), scanned A, original, MIT.

A read-only inspector that checks whether Agent Monitor data is complete, consistent, and up to date through its dashboard API.

In plain words
What is it for?
Use it to audit monitoring data integrity and investigate whether event collection or imports are working correctly.
Why use it?
It can reveal missing sessions, unmatched events, stale activity, and differences between reported data counts.

Agent for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: model in frontmatter; mentions subagents; mentions Claude Code.

Part of the ccam-devtools plugin — 6 skills, 3 commands, 2 agents shipped together

Good fit Use it to audit monitoring data integrity and investigate whether event collection or imports are working correctly.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/hoangsonww/claude-code-agent-monitor/db-inspector
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/hoangsonww/Claude-Code-Agent-Monitor

Made for: Claude Code.

Or install ccam-devtools, the plugin that ships this one along with the rest of its 6 skills, 3 commands, 2 agents.

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 db-inspector

README.md
[![agentmods](https://agentmods.dev/badge/agents/hoangsonww/claude-code-agent-monitor/db-inspector/github.svg)](https://agentmods.dev/agents/hoangsonww/claude-code-agent-monitor/db-inspector)
Your own site
<a href="https://agentmods.dev/agents/hoangsonww/claude-code-agent-monitor/db-inspector"><img src="https://agentmods.dev/badge/agents/hoangsonww/claude-code-agent-monitor/db-inspector/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 db-inspector

Your own site · 80×15
<a href="https://agentmods.dev/agents/hoangsonww/claude-code-agent-monitor/db-inspector"><img src="https://agentmods.dev/badge/agents/hoangsonww/claude-code-agent-monitor/db-inspector.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 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,128 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00083 $0.01128
Opus 5 $0.00042 $0.00564
Sonnet 5 $0.00017 $0.00226
Haiku 4.5 $0.00008 $0.00113

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

Security

Grade A, and why

db-inspector scanned grade A with 1 finding 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 8d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

the dashboard API at `http://localhost:4820` using `curl -s http://localhost:4820/api/...`
plugins/ccam-devtools/agents/db-inspector.md · 90 lines

How it starts

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

Database Inspector

You are a data-integrity inspector for the Claude Code Agent Monitor. You query the dashboard API at http://localhost:4820 using curl -s http://localhost:4820/api/... to verify that ingested data is internally consistent and fresh. You read only — you never mutate data.

Available Data Sources

Endpoint Returns
GET /api/stats total_sessions, active_sessions, active_agents, total_agents, total_events, events_today, ws_connections, agents_by_status, sessions_by_status
GET /api/sessions?limit=N session list (id, status, model, cwd, started_at, ended_at, cost, metadata)
GET /api/events?session_id=X events for a session (event_type, tool_name, summary, data, timestamp)
GET /api/events recent events across all sessions
GET /api/settings/info DB path/size, counts, last import time, hook config summary
GET /api/analytics overview, tokens, tool_usage, daily_events(365d), daily_sessions(365d), agent_types, event_types, avg_events_per_session, total_subagents, sessions_by_status, agents_by_status

Analysis Framework

  1. Baseline the counts. Read /api/stats and /api/settings/info. Record total_sessions, total_agents, total_events, active_sessions, and the reported DB size and last-import timestamp. These are the ground-truth totals.

  2. Orphaned events. Pull /api/events (and per-session via /api/events?session_id=X for suspect sessions). Flag any event whose session_id does not resolve to a session in /api/sessions?limit=1000. Orphaned events indicate ingestion that outran session creation, or deleted sessions that left events behind.

  3. Sessions missing agents. For each session, compare the session-level subagent count against /api/analytics total_subagents and the agent_types distribution. A session whose events contain SubagentStop but which has zero agent records is a structural gap — report the session id.

Read the full file on GitHub · 90 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. 8d ago First seen · 90 lines · 83 tokens per session scan A 33958122429d

Subscribe to this mod's changes

db-inspector is an agent published in the GitHub repository hoangsonww/Claude-Code-Agent-Monitor (989 stars, last pushed 2d ago), licensed MIT. It adds 83 tokens to every session and 1,128 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other agents, from other repositories

challenger

Use when: before the lead reports a root-cause conclusion, a 'done/verified' claim, an irreversible action about to run (commit/deploy/rm/push), or a 2nd-time fix — in APEX or plain conversation; also every eLicit round and Verify gate. Do NOT use for: code correctness/lint/types/API usage (sniper's job), or as a veto…

fusengine/agents · 92 tokens

sniper

Use when: after ANY code modification (mandatory post-edit validation). Do NOT use for: new features, quick fixes already identified (use sniper-faster), read-only analysis.

fusengine/agents · 38 tokens

sniper-faster

Use when: applying already-identified fixes (linter output, sniper report, user-specified) of 1-10 lines. Do NOT use for: new features, refactoring, analysis, or any task requiring understanding — use sniper (full 7-phase) instead.

fusengine/agents · 61 tokens

explore-codebase

Use when: unknown project structure, mapping dependencies, finding existing patterns before coding, architectural analysis. Do NOT use for: documentation lookup (use research-expert), code fixes (use sniper), UI tasks (use design-expert).

fusengine/agents · 51 tokens

changelog-watcher

Use when: checking for Claude Code updates (/watch command), detecting breaking changes in our plugins, monitoring community feedback (/watch --pulse). Do NOT use for: code fixes (use sniper), general web research (use research-expert).

fusengine/agents · 52 tokens

perf

Performance audit for web applications. Bundle size, Core Web Vitals, runtime bottlenecks, N+1 queries, memory leaks, rendering inefficiencies. Framework-aware (Next.js, Vite, Webpack). Use before deploys or when things feel slow.

stuartshields/claude-setup · 55 tokens