agent-health-monitoring

agent-health-monitoring is a skill for Claude Code, Codex from cosmicstack-labs/mercury-agent-skills. It costs 44 tokens per session (2,474 once invoked), scanned A, original, MIT.

A guide for monitoring AI agents running in production, including whether they respond, how long they take, how often they fail, and whether their behavior changes.

In plain words
What is it for?
Use it to define health metrics, detect unusual behavior, collect performance data, and set up alerts and incident-response practices for systems with multiple agents.
Why use it?
AI agents can stop responding, return empty results, loop, or fail through broken tools without triggering ordinary infrastructure alerts.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to define health metrics, detect unusual behavior, collect performance data, and set up alerts and incident-response practices for systems with multiple agents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cosmicstack-labs/mercury-agent-skills/agent-health-monitoring
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 cosmicstack-labs/mercury-agent-skills --skill agent-health-monitoring
Clone the repo
git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills

Made for: Claude Code, Codex.

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-monitoring

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/cosmicstack-labs/mercury-agent-skills/agent-health-monitoring"><img src="https://agentmods.dev/badge/skills/cosmicstack-labs/mercury-agent-skills/agent-health-monitoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,474 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00044 $0.02474
Opus 5 $0.00022 $0.01237
Sonnet 5 $0.00009 $0.00495
Haiku 4.5 $0.00004 $0.00247

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

Security

Grade A, and why

agent-health-monitoring 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 12d 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.

categories/ai-ml/agent-health-monitoring/SKILL.md · 298 lines

How it starts

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

Agent Health Monitoring & Alerting

Overview

Production multi-agent systems fail silently. An agent that stops responding, returns empty results, or enters an infinite loop can degrade an entire workflow without triggering traditional infrastructure alerts. This skill covers how to build comprehensive health monitoring, metrics collection, and alerting for AI agent fleets.


Core Concepts

Agent Vital Signs

Metric What It Measures Why It Matters
Response Rate % of agent invocations that return a result Dropping rate indicates crashes or context overflows
Latency (P50/P95/P99) Time from invocation to response Spikes indicate context bloat or degraded model performance
Error Rate % of invocations with errors/tool failures Rising rate indicates systemic issues
Step Count Number of reasoning steps per task Unbounded growth indicates looping behavior
Tool Call Success Rate % of tool calls that succeed Drop indicates broken integrations or rate limiting
Token Consumption Tokens used per agent run Budget anomalies indicate runaway agents
Context Utilization % of context window used High utilization risks truncation and quality loss
Hallucination Score Confidence calibration or factuality checks Degrading accuracy undermines trust

Alert Severity Levels

Level Color Response Time Examples
P0 (Critical) 🔴 Red < 5 min Agent completely down, data loss, security breach
P1 (High) 🟠 Orange < 15 min Error rate > 20%, latency 5x baseline
P2 (Medium) 🟡 Yellow < 1 hour Error rate > 5%, slow degradation
P3 (Low) 🔵 Blue < 24 hours Single agent underperforming, minor drift

Step-by-Step Implementation

Step 1: Instrument Every Agent

Wrap every agent invocation with telemetry:

class MonitoredAgent:
    """Agent wrapper that collects metrics on every invocation."""
    
    def __init__(self, agent, agent_name: str, metrics_client):
        self.agent = agent
        self.agent_name = agent_name
        self.metrics = metrics_client
    
    async def run(self, task: str) -> str:
        start_time = time.time()
        step_count = 0
        token_usage = 0
        
        try:
            result = await self.agent.run(task)
            
            # Collect metrics
            duration = time.time() - start_time
            self.metrics.timing(f"agent.{self.agent_name}.latency", duration)
            self.metrics.increment(f"agent.{self.agent_name}.invocations")
            self.metrics.increment(f"agent.{self.agent_name}.success")
            self.metrics.gauge(f"agent.{self.agent_name}.steps", step_count)
            
            return result
            
        except Exception as e:
            duration = time.time() - start_time
            self.metrics.increment(f"agent.{self.agent_name}.errors")
            self.metrics.timing(f"agent.{self.agent_name}.error_latency", duration)
            raise

Read the full file on GitHub · 298 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. 12d ago First seen · 298 lines · 44 tokens per session scan A 0dec71bb41e2

Subscribe to this mod's changes

agent-health-monitoring is a skill published in the GitHub repository cosmicstack-labs/mercury-agent-skills (471 stars, last pushed 18d ago), licensed MIT. It adds 44 tokens to every session and 2,474 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

modern-saas-builder

Founder-minded senior product engineer and SaaS architect skill. Use when building, planning, architecting, validating, designing, testing, securing, deploying, or monetizing modern SaaS products, micro-SaaS, web apps, AI agents, Web3/Base applications, agent commerce, or Telegram bots/Mini Apps. Always active when…

lijnati/modern-saas-builder-skills · 98 tokens

claude-md-improver

Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project…

anthropics/claude-plugins-official · 82 tokens

gke-reliability

Improves GKE workload reliability, using PDBs, health probes, and topology spread constraints. Use when configuring GKE workload reliability, setting up PDBs, or configuring GKE health probes (liveness, readiness, startup). Don't use for disaster recovery setup or full cluster backups (use gke-backup-dr instead).

google/skills · 73 tokens

gke-workload-security

Audits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces. Covers running cluster security audits (auditcluster.sh), configuring Workload Identity Federation (impersonation, KSA/GSA binding, and pod setup), enforcing Network Policies (default-deny…

google/skills · 181 tokens

agent-platform-model-registry

Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.

google/skills · 60 tokens

chenhao-limit-up

A framework for judging Chinese A-share stocks that have reached the daily price-rise limit, using market mood, sector leadership, and trading momentum.

questflowai/investorskills · 44 tokens