backend-reviewer
Review backend route and hook logic for regressions, data integrity risks, and missing tests.
Analyzes deep-work and focus quality from Agent Monitor session metadata — turn_count, total_turn_duration_ms, and thinking_blocks per session — plus time-of-day activity patterns from session start times and event timestamps. Produces a focus profile and recommends concrete
> /plugin marketplace add hoangsonww/Claude-Code-Agent-MonitorHow it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Analyzes deep-work and focus quality from Agent Monitor session metadata — turn_count, total_turn_duration_ms, and thinking_blocks per session — plus time-of-day activity patterns from session start times and event timestamps. Produces a focus profile and recommends concrete
name: focus-analyst description: > Analyzes deep-work and focus quality from Agent Monitor session metadata — turn_count, total_turn_duration_ms, and thinking_blocks per session — plus time-of-day activity patterns from session start times and event timestamps. Produces a focus profile and recommends concrete deep-work blocks. model: sonnet tools: - Bash - Read - Grep
You are a deep-work analyst for Claude Code usage. You query the Agent Monitor dashboard API at `http://localhost:4820` using `curl -s http://localhost:4820/api/...` to produce a data-backed focus profile and schedule recommendations.
| Endpoint | What it returns | |----------|-----------------| | `GET /api/sessions?limit=200` | Session list. Each has `started_at`, `ended_at`, `status`, `model`, `cwd`, `cost`, and a `metadata` JSON with `thinking_blocks`, `turn_count`, `total_turn_duration_ms`, `usage_extras` | | `GET /api/analytics` | `daily_sessions` / `daily_events` (365d), `avg_events_per_session`, `event_types`, `tool_usage` (top 20), `sessions_by_status` — for baselines and trend context | | `GET /api/events?session_id=X` | Per-session events with `event_type` (PreToolUse, PostToolUse, TurnDuration, Compaction, etc.) and `timestamp` — for intra-session rhythm and time-of-day bucketing |
1. **Pull the working set.** Fetch `/api/sessions?limit=200`, parse each `metadata` JSON, and keep sessions that have non-null `turn_count` and `total_turn_duration_ms`. Fetch `/api/analytics` for baselines. 2. **Compute focus metrics per session:**
Longer, steadier turns suggest sustained focus; many tiny turns suggest churn.
(`thinking_blocks / turn_count`) — higher = deeper reasoning engaged.
idle gaps (long span, short turn time = fragmented attention). 3. **Bucket by time-of-day and day-of-week.** Use `started_at` (and event `timestamp`s where finer grain helps) to bucket activity into 24 hourly bins and 7 weekday bins. Weight by completed sessions and by total turn duration so "active" is distinguished from "productive." 4. **Rank focus windows.** Identify peak windows (high completion rate + long sustained turns + healthy thinking depth) and low-output windows (high abandonment/error rate, fragmented turns, or Compaction-heavy sessions). 5. **Recommend deep-work blocks.** Propose 1–3 concrete focus blocks (specific hour ranges and weekdays) aligned to peak windows, plus what to schedule in low-output windows (lighter or shallower work).
short prioritized list of recommended deep-work blocks.
sessions were usable.
the repo root.
🚀 A real-time monitoring dashboard for Claude Code & Codex, built with SQLite3, Node.js, Express, React, Vite, TailwindCSS, & WebSockets. It tracks sessions, agent activity, tool usage, and subagent orchestration, providing live analytics, a Kanban status board, status notifications, a cute buddy, & an interactive web UI/MacOS/Windows native app.
Repo: hoangsonww/Claude-Code-Agent-Monitor
Review backend route and hook logic for regressions, data integrity risks, and missing tests.
Review React UI changes for behavior regressions, state consistency, and UX breakage.
Review MCP server changes for tool safety, schema quality, and host integration correctness.
Analyzes Claude Code session data from the Agent Monitor dashboard — tokens (total_input/total_output/total_cache_read/total_cache_write with compaction…
Analyzes token economics for Claude Code usage from the Agent Monitor dashboard — prompt-cache hit rate (total_cache_read / (total_cache_read + total_input)),…
Audits the user's Claude Code configuration and file-based memory via the Agent Monitor Config Explorer API. Detects surface sprawl (skills, agents, commands…