focus-analyst

focus-analyst is an agent for Claude Code from hoangsonww/Claude-Code-Agent-Monitor. It costs 58 tokens per session (856 once invoked), scanned A, original, MIT.

An analysis assistant that studies session length, turn timing, thinking blocks, and activity times to describe coding focus patterns.

In plain words
What is it for?
Use it to build a focus profile, compare sessions, and suggest practical blocks of time for concentrated coding.
Why use it?
It makes it easier to see when deep work happens and where sessions may be interrupted or inefficient.

Agent for Claude Code

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

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

Good fit Use it to build a focus profile, compare sessions, and suggest practical blocks of time for concentrated coding.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/hoangsonww/claude-code-agent-monitor/focus-analyst
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-productivity, 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 focus-analyst

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/hoangsonww/claude-code-agent-monitor/focus-analyst"><img src="https://agentmods.dev/badge/agents/hoangsonww/claude-code-agent-monitor/focus-analyst.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 856 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.00058 $0.00856
Opus 5 $0.00029 $0.00428
Sonnet 5 $0.00012 $0.00171
Haiku 4.5 $0.00006 $0.00086

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

Security

Grade A, and why

focus-analyst 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 9d 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.

dashboard API at `http://localhost:4820` using `curl -s http://localhost:4820/api/...`
plugins/ccam-productivity/agents/focus-analyst.md · 69 lines

How it starts

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

Focus Analyst

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.

Available Data Sources

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

Analysis Framework

  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:
    • Avg turn duration = total_turn_duration_ms / turn_count (ms → seconds). Longer, steadier turns suggest sustained focus; many tiny turns suggest churn.
    • Thinking depth = thinking_blocks per session, and per turn (thinking_blocks / turn_count) — higher = deeper reasoning engaged.
    • Session span = ended_at − started_at vs. summed turn duration to gauge idle gaps (long span, short turn time = fragmented attention).
  3. Bucket by time-of-day and day-of-week. Use started_at (and event timestamps 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).

Read the full file on GitHub · 69 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. 9d ago First seen · 69 lines · 58 tokens per session scan A d7ff1bb01153

Subscribe to this mod's changes

focus-analyst is an agent published in the GitHub repository hoangsonww/Claude-Code-Agent-Monitor (991 stars, last pushed 4d ago), licensed MIT. It adds 58 tokens to every session and 856 once invoked, about $0.0003 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

legal

General Counsel who runs the six-skill legal department, finds the path to yes, and keeps deals moving without signing away the company. Use PROACTIVELY for any legal-adjacent task: contract review, NDA triage, compliance checks, risk assessment, vendor vetting, signature routing. MUST BE USED when a contract or NDA…

alebgl77/claude-inc · 127 tokens

social-media

Head of Social who runs the six-skill social department — post-writer, profile-optimizer, reels-scripting, hook-generator, voice-builder, youtube-thumbnail — triaging every request and routing it to the right specialist. Use PROACTIVELY for any social content task — LinkedIn/X posts, profile optimisation, short-video…

alebgl77/claude-inc · 129 tokens

react-expert

Use when: package.json has React but NO next.config., Vite/CRA bundler, SPA architecture. Do NOT use for: Next.js projects (use nextjs-expert), UI design (use design-expert), Laravel+Inertia (use laravel-expert).

fusengine/agents · 60 tokens

modifier-agent

Use this agent when quick, mechanical edits are needed across multiple files in the repository or /.claude/ folder — spelling corrections, minor reformatting, updating references after renames, reflecting small structural changes across documentation, version number updates, or simple find-and-replace changes. Handles…

isvlasov/rageatc-oss · 76 tokens

fact-checker-agent

Use this agent when you need to verify claims, sources, and assertions in research documents, reports, or any content where factual accuracy is critical. Operates in two modes: proactive verification (default) checks claims via web search and real-time source evaluation; retrospective verification checks documents…

isvlasov/rageatc-oss · 97 tokens

computer-use-operator

Desktop automation specialist. Controls native macOS apps via Computer Use MCP. Handles Finder, System Settings, Preview, Notes, and cross-app workflows.

heymegabyte/claude-skills · 34 tokens