agnt: Skill for Claude Code

.claude/skills/daemon-health-check/SKILL.md

daemon-health-check is a skill for Claude Code from standardbeagle/agnt. It costs 19 tokens per session (992 once invoked), scanned A, original, Apache-2.0.

A guide for building daemon health checks, a doctor command, and reconciliation logic. Reconciliation compares the daemon's recorded state with what is actually running on the operating system and corrects mismatches.

In plain words
What is it for?
Use it when implementing or changing health checks, diagnostic commands, process checks, port ownership checks, or proxy recovery.
Why use it?
It helps detect dead processes, occupied ports, and unresponsive proxies that the daemon's in-memory state may miss.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is standardbeagle/agnt's own configuration. It tells Claude Code how to work on agnt itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agnt configures →

Reuse

Borrowing it

Nothing to install: this file belongs to standardbeagle/agnt. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/standardbeagle/agnt/main/.claude/skills/daemon-health-check/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/standardbeagle/agnt

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 daemon-health-check

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/standardbeagle/agnt/daemon-health-check"><img src="https://agentmods.dev/badge/skills/standardbeagle/agnt/daemon-health-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 992 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.00019 $0.00992
Opus 5 $0.00010 $0.00496
Sonnet 5 $0.00004 $0.00198
Haiku 4.5 $0.00002 $0.00099

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

Security

Grade A, and why

daemon-health-check 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/daemon-health-check/SKILL.md · 113 lines

How it starts

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

Daemon Health Check & Doctor

Use this skill when implementing or modifying health check, reconciliation, or doctor functionality.

Reconciliation Algorithm

The daemon's in-memory state is a cache. Reconciliation verifies it against OS truth and fixes mismatches.

Step 1: Gather Expected State

  • Parse .agnt.kdl for all projects with running scripts
  • Build expected set: {script → process, proxy → target, port → owner}

Step 2: Gather Actual State (OS Truth)

Cross-platform requirement — every probe must go through internal/platform/:

Probe Linux/macOS Windows WSL
PID alive kill(pid, 0) or /proc/<pid> OpenProcess kill(pid, 0), cmd.exe for Windows-spawned
Port owner ss -tlnp / lsof -i netstat -ano ss for Linux, netstat.exe for Windows
Proxy health TCP connect / HTTP GET Same Same

Step 3: Diff Expected vs Actual

Finding State update Event
Process in daemon but PID dead Mark Dead Emit ScriptStopped
Port in use but not by our process Flag rogue Record PID in warning
Proxy in daemon but not responding Mark unhealthy Emit warning
Config expects proxy but none exists Attempt fallback-port Emit warning if no fallback
Process running, no URL detected, has fallback-port Create proxy via fallback Log proxy creation
Process producing error output Mark Running With Errors Surface to AI agent

Step 4: Reconcile

  • Update daemon cache to match reality
  • Emit events for each state change
  • Return diff report (for doctor command)

Stall Detection

CRITICAL: Never kill a process that is producing output, even error output.

A process is stalled ONLY when ALL are true:

  • No stdout/stderr output for stall threshold (default 120s)
  • AlertScanner has no recent classifications
  • Process is not in Starting state

Error output IS activity:

  • AlertScanner classifies: compile errors, panics, exceptions
  • Recent alerts → "Running With Errors", not stalled
  • "Running With Errors" → surface to AI agent for code fixes, NEVER kill

Read the full file on GitHub · 113 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 · 113 lines · 19 tokens per session scan A 2a259de5f288

Subscribe to this mod's changes

daemon-health-check is a skill published in the GitHub repository standardbeagle/agnt (21 stars, last pushed today), licensed Apache-2.0. It adds 19 tokens to every session and 992 once invoked, about $0.0001 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

golang-testing

Go testing best practices including table-driven tests, test helpers, benchmarking, race detection, coverage analysis, and integration testing patterns. Use when writing or improving Go tests.

affaan-m/ECC · 37 tokens

golang-patterns

Go-specific design patterns and best practices including functional options, small interfaces, dependency injection, concurrency patterns, error handling, and package organization. Use when working with Go code to apply idiomatic Go patterns.

affaan-m/ECC · 45 tokens

printing-press-polish

Polish a generated CLI to pass verification and become publish-ready. Runs diagnostics (dogfood, verify, scorecard, go vet, gosec), automatically fixes all issues (verify failures, static-analysis findings, dead code, descriptions, README, MCP tool quality), reports the before/after delta, and offers to publish. Use…

mvanhorn/cli-printing-press · 125 tokens

printing-press-amend

Amend a published CLI from one of two input sources: (1) dogfood mode mines the active Claude Code session transcript for friction (missing flags, hand- rolled API payloads, silent-null returns); (2) direct-input mode accepts user-supplied asks (rename a command, add commands or feeds, fix a named bug, optionally…

mvanhorn/cli-printing-press · 222 tokens

use-modern-go

Use the Modern Go Guidelines CLI whenever writing, modifying, fixing, or refactoring Go code. Apply its version-specific guidance to generated changes.

JetBrains/go-modern-guidelines · 32 tokens

printing-press-score

Score a generated CLI against the Steinberger bar, compare two CLIs side-by-side.

mvanhorn/cli-printing-press · 22 tokens