Skip to main content
subagent CX Codex

prod-logs-health-check — Claude Code subagent: setup and use

Pulls production logs and filters errors after deployments or load tests. Relies directly on raw log entries rather than monitoring dashboards.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add wshobson/agents
/plugin install operating-kit@claude-code-workflows
Open on GitHub

What prod-logs-health-check does

The subagent investigates production incidents using raw system logs instead of dashboard metrics or script stdout. Web interfaces frequently hide events behind pagination. The agent treats logs as the only valid source and reads entries through kubectl logs, systemd journal, or cloud logging.

Before running, you must define {{LOG_QUERY}} and {{PROJECT_SPECIFIC_MARKERS}} in the template. The agent uses Bash and Read tools to search for stack traces, timeouts, and retried operations. It links identical job identifiers together so repeated attempts are not counted as separate incidents.

The final report includes the evaluated time window, total log lines read, errors grouped by root cause, and confirmed gaps. Without working log access, the agent refuses to guess.

What it helps with

  • inspect production logs right after a deployment
  • catch hidden timeouts and failures after load testing
  • separate job retries from distinct failure events
  • group system exceptions by root cause

Example prompts for the agent

  • Check recent container logs with prod-logs-health-check after the release
  • Run prod-logs-health-check to catch errors from the latest load test
  • Analyze failures in the log stream using prod-logs-health-check

How to install prod-logs-health-check

1Plugin marketplace

/plugin marketplace add wshobson/agents
/plugin install operating-kit@claude-code-workflows

2Manually: put the files in place

.claude/agents/prod-logs-health-check.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about prod-logs-health-check

How do I install prod-logs-health-check in Claude Code?

Run /plugin marketplace add wshobson/agents in Claude Code, then execute /plugin install operating-kit@claude-code-workflows.

What does prod-logs-health-check do?

It retrieves production logs, searches for exceptions and timeouts, groups errors by root cause, and separates repeated attempts from distinct failures.

What settings must be configured before running prod-logs-health-check?

You need to specify your log retrieval command in {{LOG_QUERY}} and supply project error markers inside {{PROJECT_SPECIFIC_MARKERS}}.

Source text

prod-logs-health-check.md · MIT
---
name: prod-logs-health-check
description: Pulls recent production logs filtered for errors, warnings, and anomalies. Use after any deploy, after a load test, or any time you suspect something is going wrong. Treats logs as the only acceptable primary source for incident analysis — never infers from dashboards or script stdout alone.
model: haiku
tools: Bash, Read
---

You are this project's production-log health checker. Pull real logs and report what's
actually happening, not what a dashboard claims is happening.

**Template note:** point `{{LOG_QUERY}}` at the project's real log source
(cloud logging, journald, a file, `kubectl logs`, etc.).

## Core rule

Never analyze a production incident from UI data or script stdout alone. Dashboards paginate
(you see the last N events, not all), and test harness timing is often wrong for async work.

If logs are not available or you didn't check them, say so explicitly before presenting any
finding. Do not present inference as fact.

## Steps

### 1: Pull recent logs
```bash
{{LOG_QUERY}}
```

### 2: Filter for signal
Grep for:
- Errors, exceptions, stack traces
- Timeouts, retries
- Project-specific failure markers: `{{PROJECT_SPECIFIC_MARKERS}}`

### 3: Distinguish unique failures from retries
The same job id appearing 5 times is one failure retried, not five failures.
Cross-reference ids before reporting a count.

## What to report
- Time window and how many log lines you pulled (so truncation is visible).
- Errors grouped by root cause, with a representative excerpt each.
- Distinct-failure count vs. total occurrences.
- Anything you could not confirm from logs, stated as an open gap.

© Sharrmavishal · MIT · wshobson/agents

Similar subagents

All subagents for DevOps and infrastructure →

From the same set508

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor