agent-health

agent-health is a skill for Claude Code from tranhieutt/software_development_department. It costs 41 tokens per session (1,343 once invoked), scanned A, original, MIT.

A reporting skill that reads agent performance logs and current circuit-breaker states. A circuit breaker is a safeguard that can stop an unreliable agent from continuing to run.

In plain words
What is it for?
Use it to view performance by session, agent, or date, identify high error rates and open circuit breakers, and optionally save a new metrics snapshot.
Why use it?
It makes agent errors and availability visible so problems can be investigated for a session or individual agent.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to view performance by session, agent, or date, identify high error rates and open circuit breakers, and optionally save a new metrics snapshot.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tranhieutt/software_development_department/agent-health
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.

Any agent
npx skills add tranhieutt/software_development_department --skill agent-health
Clone the repo
git clone --depth 1 https://github.com/tranhieutt/software_development_department

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 agent-health

README.md
[![agentmods](https://agentmods.dev/badge/skills/tranhieutt/software_development_department/agent-health/github.svg)](https://agentmods.dev/skills/tranhieutt/software_development_department/agent-health)
Your own site
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/agent-health"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/agent-health/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 agent-health

Your own site · 80×15
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/agent-health"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/agent-health.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,343 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.00041 $0.01343
Opus 5 $0.00020 $0.00672
Sonnet 5 $0.00008 $0.00269
Haiku 4.5 $0.00004 $0.00134

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

Security

Grade A, and why

agent-health 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.

.claude/skills/agent-health/SKILL.md · 150 lines

How it starts

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

Agent Health

Display a performance summary table from production/traces/agent-metrics.jsonl, cross-referenced with production/session-state/circuit-state.json for live circuit breaker states.

Steps

1. Parse arguments

Flag Default Description
--session <branch> current branch Filter entries by session field
--agent <name> all Show only this agent
--since <date> no limit Only entries with date >= YYYY-MM-DD
--log false If set, append a fresh metrics snapshot to agent-metrics.jsonl

Get current branch: git branch --show-current.

2. Read data sources

Read both files in parallel:

  • production/traces/agent-metrics.jsonl — historical metrics per agent per session
  • production/session-state/circuit-state.json — live circuit breaker states

If agent-metrics.jsonl contains only the schema header line (no actual entries):

📭 No agent metrics recorded yet for this session.
   Metrics are written when agents use /agent-health --log
   or at the end of a session via /save-state.

Circuit breaker states (live):
[show table from circuit-state.json only]

3. Aggregate metrics

For each agent, compute across the filtered entries:

  • total_tasks = tasks_completed + tasks_failed + tasks_blocked
  • success_rate = tasks_completed / total_tasks * 100 (0 if no tasks)
  • error_rate = latest error_rate field value
  • circuit_state = from circuit-state.json (live, not from log)

4. Render health table

🏥 Agent Health Report — session: <branch> · <date range>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Agent                  Tasks  ✅ Done  ❌ Failed  ⛔ Blocked  Success%  Circuit
──────────────────────────────────────────────────────────────────────────────
backend-developer          8       7          1          0      87.5%   🟢 CLOSED
frontend-developer         5       5          0          0     100.0%   🟢 CLOSED
qa-engineer                  6       4          2          0      66.7%   🟡 HALF-OPEN
data-engineer              2       2          0          0     100.0%   🟢 CLOSED
diagnostics                1       0          1          0       0.0%   🔴 OPEN
──────────────────────────────────────────────────────────────────────────────
TOTAL                     22      18          4          0      81.8%

⚠️  Agents needing attention:
  🔴 diagnostics      — Circuit OPEN · fallback: surface to user
  🟡 qa-engineer        — Circuit HALF-OPEN · 2 failures this session

Read the full file on GitHub · 150 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 · 150 lines · 41 tokens per session scan A 386888d6594b

Subscribe to this mod's changes

agent-health is a skill published in the GitHub repository tranhieutt/software_development_department (72 stars, last pushed 3mo ago), licensed MIT. It adds 41 tokens to every session and 1,343 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories