focus-report — Claude Code command: what it does, how to install
focus-report generates a one-screen Agent Monitor focus snapshot showing average turn speed, thinking blocks, and longest sessions.
MIT ★ 1,198 updated 2026-10-23
/plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor
/plugin install ccam-productivity@claude-code-agent-monitor-pluginsWhat focus-report does
The command queries a local Agent Monitor instance running at http://localhost:4820. It retrieves session records via /api/sessions (inspecting 100 sessions by default) alongside baseline metrics from /api/analytics. From session metadata, it extracts turn_count, total_turn_duration_ms, and thinking_blocks.
It computes the average turn duration in seconds and tracks thinking block counts per session and per turn. The report also highlights the top 3–5 longest sessions sorted by duration, listing project working directories cwd and duration in minutes. Without an active Agent Monitor on port 4820, execution stops: you must start it first with npm start in the repo root.
What it helps with
- Measure average agent turn duration in seconds across recent sessions
- Track thinking-block frequency per turn and per session
- Inspect top 3–5 longest agent sessions with working directories
- Produce a compact single-screen workload summary in the CLI
Example prompts for the agent
- /focus-report
- /focus-report 50
- Run /focus-report 200 to inspect the last 200 sessions
How to install focus-report
1Plugin marketplace
/plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor/plugin install ccam-productivity@claude-code-agent-monitor-plugins2Manually: put the files in place
.claude/commands/focus-report.mdCall it with /focus-report. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/focus-report.mdCall it with /prompts:focus-report. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/focus-report.prompt.mdManually: put the files in place
.gemini/commands/focus-report.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about focus-report
How to install focus-report in Claude Code?
Run /plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor, then run /plugin install ccam-productivity@claude-code-agent-monitor-plugins.
What does focus-report do?
It calculates average turn duration, measures thinking-block usage, and lists the 3–5 longest sessions from local Agent Monitor data.
What if the Agent Monitor dashboard is unreachable?
If http://localhost:4820 does not respond, start the local server by running npm start from the Agent Monitor repository root.
Source text
focus-report.md · MIT
--- description: One-screen focus snapshot — avg turn duration, thinking-block usage, and longest sessions. argument-hint: "[limit]" --- Print a one-screen focus snapshot from Agent Monitor data at `http://localhost:4820`. If the dashboard is unreachable, tell the user to start it with `npm start` from the repo root. Optional **$ARGUMENTS**: a session count to inspect (default 100). 1. Fetch sessions: `curl -s 'http://localhost:4820/api/sessions?limit=100'` (use the $ARGUMENTS limit if given). Parse each `metadata` JSON for `turn_count`, `total_turn_duration_ms`, and `thinking_blocks`. 2. Fetch baselines: `curl -s http://localhost:4820/api/analytics` for `avg_events_per_session` and `sessions_by_status`. Compute and print (over sessions that have the focus metadata): - **Avg turn duration** = `total_turn_duration_ms / turn_count`, reported in seconds (averaged across sessions). - **Thinking-block usage** = average `thinking_blocks` per session and per turn (`thinking_blocks / turn_count`). - **Longest sessions**: top 3–5 by `total_turn_duration_ms`, each with project (`cwd`), duration in minutes, turn count, and thinking blocks. Show the three metrics as a compact table plus the longest-sessions list. State how many sessions had usable metadata. Durations from ms; cite only numbers returned by the API. Keep it to one screen.
© Son Nguyen · MIT · hoangsonww/Claude-Code-Agent-Monitor