service-check

A command that asks running coding agents to check their own setup without changing external data. The check covers configured services, credentials, important files, and core tools.

In plain words
What is it for?
Use it to verify agent runtime setup, inspect service availability, check whether expected credentials are present, and confirm required workspace files exist.
Why use it?
It helps reveal missing configuration or unavailable services before an agent starts work. Because it is read-only, it is intended for diagnosis rather than repair.

Command for Claude Code

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.

agentmods
npx agentmods add commands/abilityai/trinity/service-check
Clone the repo
git clone --depth 1 https://github.com/Abilityai/trinity

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,010 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.01010
Opus 5 $0.00000 $0.00505
Sonnet 5 $0.00000 $0.00202
Haiku 4.5 $0.00000 $0.00101

Measured 2d ago against content hash 8005f40a8b2e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

service-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 2d 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.

config/agent-templates/trinity-system/.claude/commands/ops/service-check.md · 130 lines

How it starts

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

Service Check

Request each agent to run a self-diagnostic to validate their runtime setup.

IMPORTANT: This is a READ-ONLY service check. Agents must NOT modify any data in external systems. This is purely diagnostic validation.

Instructions

  1. List all agents using mcp__trinity__list_agents

  2. Filter to running agents (skip stopped agents and trinity-system)

  3. For each running agent, call it using mcp__trinity__chat_with_agent with this prompt:

Run a SERVICE CHECK self-diagnostic. This is READ-ONLY - do NOT modify any external data.

Validate your runtime setup by checking:

1. **MCP Servers**: List configured servers from .mcp.json. For each server:
   - Can you call a read-only/list operation? (e.g., list files, list items, get status)
   - Report: working / failing / not configured

2. **Credentials**: Check .env file exists and has expected variables.
   - Do NOT log credential values
   - Report: present / missing / partially configured

3. **Workspace**: Verify key files exist:
   - CLAUDE.md (your instructions)
   - template.yaml (your config)
   - Any domain-specific required files

4. **Tools**: Test that your core tools respond:
   - File operations (read a test file)
   - Any critical integrations

5. **Memory/State**: Check if persistent files are accessible:
   - memory/ directory (if used)
   - outputs/ directory (if used)

IMPORTANT CONSTRAINTS:
- DO NOT create, update, or delete any external resources
- DO NOT send messages, emails, or notifications
- DO NOT modify databases or APIs
- ONLY perform read/list/get operations
- If a tool only has write operations, skip it and note "write-only, skipped"

Respond with a brief JSON report:
{
  "agent": "your-name",
  "status": "healthy|degraded|unhealthy",
  "checks": {
    "mcp_servers": {"configured": 2, "working": 2, "failed": 0},
    "credentials": "ok|missing|partial",
    "workspace": "ok|issues",
    "tools": "ok|some_failed|not_tested"
  },
  "issues": ["issue1", "issue2"],
  "notes": ["any relevant observations"]
}

Read the full file on GitHub · 130 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. 2d ago First seen · 130 lines · 0 tokens per session scan A 8005f40a8b2e

Subscribe to this mod's changes

service-check is a command published in the GitHub repository Abilityai/trinity (496 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,010 tokens. 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.