instance-doctor

instance-doctor is a skill for Claude Code, Codex from regen-coordination/org-os-template. It costs 65 tokens per session (1,931 once invoked), scanned A, original, MIT.

A health check and repair tool for an organization’s shared workspace. It examines whether the workspace is correctly connected to its framework and can synchronize missing or outdated files.

In plain words
What is it for?
Use it when onboarding a workspace, before or after framework updates, or when its self-update process is broken.
Why use it?
It helps find broken update machinery before trusting the workspace’s reports or attempting an update. It also reduces the risk of leaving a partial update behind.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is npm run doctor -- --dir ../refi-med-os.

Good fit Use it when onboarding a workspace, before or after framework updates, or when its self-update process is broken.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/regen-coordination/org-os-template
agentmods
npx agentmods add skills/regen-coordination/org-os-template/instance-doctor

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 instance-doctor

README.md
[![agentmods](https://agentmods.dev/badge/skills/regen-coordination/org-os-template/instance-doctor/github.svg)](https://agentmods.dev/skills/regen-coordination/org-os-template/instance-doctor)
Your own site
<a href="https://agentmods.dev/skills/regen-coordination/org-os-template/instance-doctor"><img src="https://agentmods.dev/badge/skills/regen-coordination/org-os-template/instance-doctor/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 instance-doctor

Your own site · 80×15
<a href="https://agentmods.dev/skills/regen-coordination/org-os-template/instance-doctor"><img src="https://agentmods.dev/badge/skills/regen-coordination/org-os-template/instance-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,931 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.00065 $0.01931
Opus 5 $0.00032 $0.00966
Sonnet 5 $0.00013 $0.00386
Haiku 4.5 $0.00006 $0.00193

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

Security

Grade A, and why

instance-doctor 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/instance-doctor/SKILL.md · 182 lines

How it starts

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

Instance Doctor

What This Is

Two verbs over any org-os instance:

  • assess — read-only. Runs six checks and prints a scorecard of BLOCKER / WARN / OK, each finding carrying a remediation hint. Proven against all six real instances plus the framework itself (2026-08-28 acceptance run).
  • sync — snapshots the instance, repairs the machinery it needs in order to update itself, overlays the framework's own files, migrates, re-assesses, and writes a dated receipt. Aborts on the first failure, so an instance is never left half-migrated.

It exists because of a specific deadlock. Downstream instances are supposed to update themselves by running scripts/sync-upstream.mjs. As of the 2026-08-28 sweep, not one instance could: the script was missing in three, a 178-byte no-op in a fourth, and pointed at a divergent legacy repository in a fifth. An instance cannot repair its own updating mechanism using its own updating mechanism. So the doctor runs from the framework, against the instance, and supplies the machinery.

When to Use

  • Before trusting anything an instance reports — assess first.
  • Before and after any framework sync.
  • When onboarding an instance you did not bootstrap yourself.
  • When an instance "passes all validators" but behaves oddly. That combination is the signature this skill was built for: the existing validators accept an instance publishing the framework's identity as its own.

The Operator Flow

1. Assess

From the framework, against a sibling (hub mode — the usual case):

npm run doctor -- --dir ../refi-med-os

From inside an instance that already carries the machinery:

npm run doctor

Useful flags: --json (machine-readable, for CI), --strict (warnings fail too), --no-validators (skip the two validator subprocesses when you want a fast read).

Exit codes: 0 no blockers · 1 blockers found · 2 bad usage.

2. Read the scorecard

Six checks, in the order an operator should think about them:

Read the full file on GitHub · 182 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 · 182 lines · 65 tokens per session scan A 0be97a8d2e3b

Subscribe to this mod's changes

instance-doctor is a skill published in the GitHub repository regen-coordination/org-os-template (5 stars, last pushed 6d ago), licensed MIT. It adds 65 tokens to every session and 1,931 once invoked, about $0.0003 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-09-03.