diagnostics

diagnostics is a skill for Claude Code, Codex from anatolykoptev/dozor. It costs 38 tokens per session (647 once invoked), scanned A, original, MIT.

A step-by-step method for finding the cause of server failures, slow performance, or unknown errors.

In plain words
What is it for?
Investigating services that will not start, memory or out-of-memory problems, dependency failures, port conflicts, configuration errors, and recent error logs.
Why use it?
It turns a vague problem into a sequence of checks covering service health, error patterns, logs, dependencies, and system resources.

Skill for Claude CodeCodex

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

Good fit Investigating services that will not start, memory or out-of-memory problems, dependency failures, port conflicts, configuration errors, and recent error logs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/anatolykoptev/dozor/diagnostics
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 anatolykoptev/dozor --skill diagnostics
Clone the repo
git clone --depth 1 https://github.com/anatolykoptev/dozor

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 diagnostics

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/anatolykoptev/dozor/diagnostics"><img src="https://agentmods.dev/badge/skills/anatolykoptev/dozor/diagnostics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 647 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.00038 $0.00647
Opus 5 $0.00019 $0.00324
Sonnet 5 $0.00008 $0.00129
Haiku 4.5 $0.00004 $0.00065

Measured 8d ago against content hash 76fd7be09db4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

diagnostics 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 8d 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.

skills/diagnostics/SKILL.md · 77 lines

How it starts

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

Diagnostics Skill

Systematic approach to diagnosing server issues.

Diagnostic Flow

1. TRIAGE (server_triage)
   → Quick health assessment of all services
   → Identifies which services need attention

2. INSPECT (server_inspect mode=health)
   → Detailed status of all Docker + systemd services
   → CPU, memory, uptime for each

3. ANALYZE (server_inspect mode=analyze, service=NAME)
   → Error pattern analysis for specific service
   → Groups errors by type, shows frequency

4. LOGS (server_inspect mode=logs, service=NAME)
   → Recent logs for specific service
   → Look for error messages, stack traces, OOM kills

5. SYSTEM (server_inspect mode=overview)
   → Disk, memory, load, top processes
   → Identifies resource constraints

Common Patterns

Service Won't Start

  1. Check logs: server_inspect mode=logs service=NAME
  2. Look for: missing config, port conflicts, dependency failures
  3. Check dependencies: is the database/redis/rabbitmq up?
  4. Try restart: server_restart service=NAME

High Memory / OOM

  1. Check overview: server_inspect mode=overview
  2. Identify top consumers
  3. Check specific service: server_inspect mode=status service=NAME
  4. Consider: server_prune to free docker resources

Cascading Failures

  1. Triage first to see the full picture
  2. Identify root cause (usually database or network)
  3. Fix root cause BEFORE restarting dependents
  4. Restart in dependency order: database → API → workers

Disk Full

  1. server_inspect mode=overview — check disk usage
  2. server_cleanup report=true — see what can be freed
  3. server_prune — clean docker build cache and images
  4. If still critical → escalate to orchestrator

Rules

  • Always start with server_triage for a broad view
  • Don't restart blindly — understand the error first
  • After any fix, verify with another health check
  • If the same service fails 3+ times, escalate — don't loop

Efficiency Rules

  1. One inspect per incident — do NOT call server_inspect more than once for the same incident. The first call has all the data you need.
  2. Triage first, inspect second — if triage already shows the issue clearly, skip server_inspect entirely.
  3. Read memory before tools — call read_memory or memdb_search before running diagnostics. Past incidents may have the answer.
  4. 3-iteration budget — if not resolved in 3 tool calls, escalate. Don't loop through server_inspect -> server_exec -> server_inspect.

Read the full file on GitHub · 77 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. 8d ago First seen · 77 lines · 38 tokens per session scan A 76fd7be09db4

Subscribe to this mod's changes

diagnostics is a skill published in the GitHub repository anatolykoptev/dozor (5 stars, last pushed today), licensed MIT. It adds 38 tokens to every session and 647 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-31.

Related

Other skills, from other repositories