agent-style
Provides the vendored agent-style v0.3.5 prose rule pack as a portable Claude skill. Use when installing, syncing, applying, or auditing SDD Agent-Style…
Reads production/traces/agent-metrics.jsonl and displays a per-agent performance summary table for the current or a specified session. Highlights agents with high error rates or OPEN circuit breaker state.
$ npx -y skills add tranhieutt/software_development_department --skill agent-health --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/agent-healthContext preview
The summary Claude sees to decide when to auto-load this skill.
Reads production/traces/agent-metrics.jsonl and displays a per-agent performance summary table for the current or a specified session. Highlights agents with high error rates or OPEN circuit breaker state.
name: agent-health type: workflow description: "Reads production/traces/agent-metrics.jsonl and displays a per-agent performance summary table for the current or a specified session. Highlights agents with high error rates or OPEN circuit breaker state." argument-hint: "[--session <branch>] [--agent <name>] [--since <YYYY-MM-DD>] [--log]" user-invocable: true allowed-tools: Read, Write, Bash effort: 1 when_to_use: "Run at the end of a session, sprint, or after repeated agent failures to identify which agents are struggling. Also useful before dispatching a multi-agent workflow to check circuit breaker states."
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.
| 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`.
Read both files in parallel:
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]
For each agent, compute across the filtered entries:
🏥 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
Circuit state icons:
Flag agents as needing attention if:
If `--log` flag was passed, append one entry per active agent to `production/traces/agent-metrics.jsonl`:
{"date":"<YYYY-MM-DD>","session":"<branch>","agent":"<agent>","tasks_completed":<N>,"tasks_failed":<N>,"tasks_blocked":<N>,"avg_tokens_est":<N>,"error_rate":<0.0-1.0>,"circuit_state":"CLOSED|OPEN|HALF-OPEN","notes":"<optional>"}Get `circuit_state` from `circuit-state.json`. Estimate `avg_tokens_est` from decision ledger entry count × 800 tokens (rough estimate per entry) if no exact token data is available. Note this is an estimate and mark with `_est` suffix.
Print after logging:
✅ Metrics snapshot logged → production/traces/agent-metrics.jsonl [N] agents recorded · <date>
After the table, if any agents need attention:
💡 Suggested actions: • /resume-from <task_id> — recover failed task checkpoint • /trace-history --risk High — audit high-risk decisions • Check circuit-state.json — update OPEN agents once issue resolved
---
Agents append entries in two ways:
1. **Manual:** Run `/agent-health --log` at end of session 2. **Via `/save-state`:** When saving state with a `task_id`, metrics for the active agent are appended automatically
The file grows one JSON line per agent per session. Use `--since` to filter to recent sessions and avoid reading stale data from weeks ago.
---
# Summary for current session /agent-health # Check one agent across all time /agent-health --agent qa-engineer # Log a fresh snapshot and view it /agent-health --log # Review last 7 days /agent-health --since 2026-04-09
Repo: tranhieutt/software_development_department
Provides the vendored agent-style v0.3.5 prose rule pack as a portable Claude skill. Use when installing, syncing, applying, or auditing SDD Agent-Style…
Provides Angular best practices for components, modules, services, and reactive patterns. Use when working with Angular TypeScript files, component templates,…
Records unexpected API behaviors, undocumented caveats, version bugs, or non-obvious workarounds into .claude/memory/annotations.md. Use immediately when an…
Defines REST and GraphQL API contracts including endpoints, request/response schemas, auth flows, and versioning strategy. Use when designing a new API,…
Manages the ADR (Architecture Decision Record) registry. Use when recording tech-stack choices, design patterns, or infrastructure decisions with context,…
Provides AWS serverless architecture patterns for Lambda, API Gateway, DynamoDB, SQS, and SAM/CDK. Use when working with AWS serverless files (serverless.yml,…