agent-plugins-skills: Agent for Claude Code

.github/agents/os-health-check.agent.md

os-health-check is an agent for Claude Code from richfrem/agent-plugins-skills. It costs 104 tokens per session (910 once invoked), scanned A, original, MIT.

A monitoring sub-agent that reviews an agent system's event stream, locks, state file, and memory-related metrics without changing user files.

In plain words
What is it for?
Use it to run a system health check and report recent events, errors, and operating metrics.
Why use it?
It helps identify liveness problems, hook errors, lock issues, and other signs that the agent system is not operating normally.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PROJECT_DIR} variable. Also seen: model in frontmatter; mentions subagents.

This is richfrem/agent-plugins-skills's own configuration. It tells Claude Code how to work on agent-plugins-skills 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 agent-plugins-skills configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python context/kernel.py emit_event --agent os-health-check \.

Reuse

Borrowing it

Nothing to install: this file belongs to richfrem/agent-plugins-skills. 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/richfrem/agent-plugins-skills/main/.github/agents/os-health-check.agent.md
Clone the repo
git clone --depth 1 https://github.com/richfrem/agent-plugins-skills

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/richfrem/agent-plugins-skills/os-health-check"><img src="https://agentmods.dev/badge/agents/richfrem/agent-plugins-skills/os-health-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 910 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.00104 $0.00910
Opus 5 $0.00052 $0.00455
Sonnet 5 $0.00021 $0.00182
Haiku 4.5 $0.00010 $0.00091

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

Security

Grade A, and why

os-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 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.

.github/agents/os-health-check.agent.md · 89 lines

How it starts

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

OS Health Check Sub-Agent

You are a specialized expert sub-agent acting as the Systems Monitor (Daemon) of this Agentic OS.

Objective: Scan across the context/events.jsonl Event Bus stream, review os-state.json liveness, and compile systems metrics without mutating user files.

Execution Flow

Execute these phases in order. Do not skip phases.

Phase 0: Intent Emission (Event Bus)

Before taking any actions, you MUST publish your intent to the Event Bus. Use the Bash tool to run: python context/kernel.py emit_event --agent os-health-check --type intent --action scan_metrics

Phase 1: Context Gathering & OS State Lock

  1. Update OS State: Run python context/kernel.py state_update active_agent os-health-check.
  2. Strict Lock Protocol: Run python context/kernel.py acquire_lock monitor using the Bash tool to acquire the lock. If it fails, abort. The kernel handles stale lock cleanup automatically.

Phase 2: Analyze Event Bus

  1. Use Bash string operations (tail -n 100 context/events.jsonl) or Read to analyze the recent Event Bus.
  2. Calculate simple metrics:
    • How many total intent events vs results?
    • How many hook errors? (Also optionally check context/memory/hook-errors.log)
    • Did any agent crash after intent without emitting result?

Phase 3: Inspect Memory & File Health

  1. Use Bash word count (wc -l context/memory.md) to read the line length of memory.md.
  2. Check ls -la context/.locks/ for any leaked stale locks.
  3. Determine if the loop memory_gc_due is correctly mapped according to length.

Phase 4: Summarize & Lock Release

  1. Event Bus Publish: Use Bash to emit your success result metric (e.g., system healthy): python context/kernel.py emit_event --agent os-health-check --type result --action scan_metrics --status success --summary "Metrics compiled"

  2. Lock Release Protocol: Execute python context/kernel.py release_lock monitor to release the acquired lock.

  3. Present the metrics to the user. Recommend running os-clean-locks or os-memory-manager if health metrics indicate deadlock or bloated state.

Read the full file on GitHub · 89 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 · 89 lines · 104 tokens per session scan A 459508a655e4

Subscribe to this mod's changes

os-health-check is an agent published in the GitHub repository richfrem/agent-plugins-skills (6 stars, last pushed today), licensed MIT. It adds 104 tokens to every session and 910 once invoked, about $0.0005 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 agents, from other repositories

frontend-security-reviewer

Review frontend code for common web security vulnerabilities. Use before committing or creating PRs for frontend code.

NYTC69/review-loop · 25 tokens

code-reviewer

Use this agent when you need to review code for adherence to project guidelines, style guides, and best practices. This agent should be used proactively after writing or modifying code, especially before committing changes or creating pull requests. It will check for style violations, potential issues, and ensure code…

NYTC69/review-loop · 133 tokens

silent-failure-hunter

Use this agent when reviewing code changes to identify silent failures, inadequate error handling, and inappropriate fallback behavior. Invoked proactively after completing work that involves error handling, catch blocks, fallback logic, or any code that could potentially suppress errors.

NYTC69/review-loop · 53 tokens

code-reviewer

An agent that reviews code for quality, correctness, possible errors, and adherence to project conventions.

DennisLiuCk/claude-plugin-marketplace · 111 tokens

code-explorer

A codebase exploration agent that explains how existing software works by tracing execution paths, architecture layers, patterns, abstractions, and dependencies. A codebase is the full collection of source code and related files for a project.

DennisLiuCk/claude-plugin-marketplace · 108 tokens

diff-analyzer

A Git-history analysis agent that examines version-control changes to find commits that may have introduced a problem. Git is a tool that records changes to source code over time.

DennisLiuCk/claude-plugin-marketplace · 120 tokens