agentleFS
kiloloopkiloloop/oacp-skills/skills/doctor/codex/SKILL.md

doctor

Skill0 starsChanged 14 days agoApache-2.0View on GitHub

Run environment and workspace diagnostics, auto-fix what it can, and report blockers. Use at session start or when something seems broken.

  • Installs packages

81 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use uninstall, cancel and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    uninstall

    Uninstall a community skill that was installed via the hub. Confirms before deleting files, refuses to touch first-party plugin skills, and logs every action. Use when the user wants to fully remove a community skill ("uninstall [skill]", "remove this skill") rather than just disable it.

    Also in 6 projects that use this

  • woosikkimSkill

    cancel

    Clear any stale OMC-Slim state

    Also in 3 projects that use this

  • ibahgatSkill

    mode

    Inspect or switch omi operating mode/profile for speed, depth, autonomy, or strict quality gates.

    Also in 3 projects that use this

  • BlockSkill

    open

    Open markdown documents in Penpal for collaborative review. Use when you want a human to review a document, plan, or research artifact.

    Also in 3 projects that use this

  • QinghongLinSkill

    editor

    Read analyst.json and detective.json, make all editorial decisions — what the blog argues, which findings matter, narrative arc and section structure. No visual design. Outputs editor.md (prose) and editor.json (structure with edt_xx IDs).

    Also in 3 projects that use this

  • AnthropicSkill

    status

    Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.

    Also in 15 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 3 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 61 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run oacp doctor to check environment health, workspace structure, inbox state, YAML schemas, autonomy configs, agent status, and signing …

    line 8
  2. Very specific:

    Before anything else, require the signing-capable OACP version declared by this package (>=0.4.2):

    line 24
  3. Very specific:

    If the reported version is older than 0.4.2, stop and ask the user to install or upgrade with pip install --upgrade …

    line 50
  4. Very specific:

    If --project was provided, use it directly.

    line 57
  5. Very specific:

    If PROJECT is empty, run environment-only checks unless the user explicitly asked for a specific project audit.

    line 83
  6. Distinctive:

    Do not reimplement those fixes in the skill.

    line 125
  7. Very specific:

    Do not surface ok results individually

    line 165
  8. Distinctive:

    If there are no remaining issues, report that the environment is healthy

    line 166
  9. Very specific:

    Do not invent checks beyond the categories returned by oacp doctor.

    line 185
  10. Distinctive:

    Prefer concise reporting over restating every successful check.

    line 190

“Common” is measured: kept by at least 6 in 10 of the 61 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/doctor

Run oacp doctor to check environment health, workspace structure, inbox state, YAML schemas, autonomy configs, agent status, and signing trust roots. Auto-fix safe issues and report blockers that still need human intervention.

Interface

/doctor [--project <name>]
  • --project <name> — optional project override

Workflow

1. Verify the CLI version

Before anything else, require the signing-capable OACP version declared by this package (>=0.4.2):

command -v oacp >/dev/null 2>&1 || {
  echo "oacp CLI not found; install 'oacp-cli[crypto]>=0.4.2'" >&2
  exit 1
}
OACP_VERSION="$(oacp --version 2>&1)" || {
  printf '%s\n' "$OACP_VERSION" >&2
  exit 1
}
printf '%s\n' "$OACP_VERSION"
python3 - "$OACP_VERSION" <<'PY'
import re
import sys

version = sys.argv[1].strip()
match = re.search(r"(\d+)\.(\d+)\.(\d+)", version)
if not match:
    raise SystemExit(f"could not parse oacp version: {version}")
if tuple(int(part) for part in match.groups()) < (0, 4, 2):
    raise SystemExit(f"oacp {version} is older than required 0.4.2")
PY

If the reported version is older than 0.4.2, stop and ask the user to install or upgrade with pip install --upgrade 'oacp-cli[crypto]>=0.4.2'. The base install can run ordinary checks, but the [crypto] extra is required for the signing and trust inventory described below.

2. Resolve project name

If --project was provided, use it directly. Otherwise auto-detect:

PROJECT="$(python3 - <<'PY'
import json
import os

project = ""
for marker in (".oacp", "workspace.json"):
    if not os.path.exists(marker):
        continue
    path = os.path.realpath(marker) if os.path.islink(marker) else marker
    try:
        with open(path, "r", encoding="utf-8") as f:
            data = json.load(f)
        project = data.get("project_name", "") or ""
    except Exception:
        project = ""
    if project:
        break
print(project)
PY
)"
OACP_ROOT="${OACP_HOME:-$HOME/oacp}"

If PROJECT is empty, run environment-only checks unless the user explicitly asked for a specific project audit.

3. Run oacp doctor with --fix

Capture stdout, stderr, and the exit code separately so malformed JSON or an operational crash cannot be mistaken for a diagnostic finding. With a project:

DOCTOR_JSON="$(mktemp)"
DOCTOR_STDERR="$(mktemp)"
DOCTOR_RC=0
oacp doctor --project "${PROJECT}" --oacp-dir "${OACP_ROOT}" \
  --fix --json >"${DOCTOR_JSON}" 2>"${DOCTOR_STDERR}" || DOCTOR_RC=$?

Without a project:

DOCTOR_JSON="$(mktemp)"
DOCTOR_STDERR="$(mktemp)"
DOCTOR_RC=0
oacp doctor --oacp-dir "${OACP_ROOT}" --json \
  >"${DOCTOR_JSON}" 2>"${DOCTOR_STDERR}" || DOCTOR_RC=$?

Exit code 1 means doctor found blocking errors, not that the command itself failed. Require $DOCTOR_JSON to parse as a JSON object. On invalid JSON or an unexpected exit code, report the captured stderr and stop instead of fabricating a report. Remove both private temp files after parsing/reporting.

4. Parse JSON output

Parse:

  • has_errors
  • fixed[]
  • each category's name and worst_severity
  • categories[]
  • each result's name, severity, message, and optional fix_hint

The fixed array lists safe changes already applied by oacp doctor --fix. Do not reimplement those fixes in the skill.

The OACP 0.4.x inventory includes:

  • Environment — required tools and Python packages
  • Workspace — workspace.json, agent directories, and per-agent profile completeness (config, status, and audit scaffold)
  • Inbox Health — message counts and oldest-message staleness
  • Schemas — inbox/outbox message validation
  • Autonomy — receiver policy parsing and signed-policy verification (policy_auth)
  • Agent Status — status.yaml presence and freshness
  • Trust (v0.4.1+) — catalog/pin drift, receiver pin completeness, and enforce-readiness
  • Memory Sync (with --memory) — advisory checks for the OACP memory repo

5. Report findings

## Doctor Report

### Auto-Fixed
- <list of fixes applied>

### Warnings
- [!] <category> — <description>

### Errors
- [x] <category> — <description> — <fix_hint>

### Summary
<category>: <severity> | ...
Auto-fixed: N issue(s) | Remaining: M warning(s), K error(s)

Reporting rules:

  • List auto-fixes first, directly from fixed[]
  • Group remaining issues by category
  • Include fix_hint for warn and error results when present
  • Do not surface ok results individually
  • If there are no remaining issues, report that the environment is healthy
  • Build the summary from the parsed category severities after --fix, not from a stale pre-fix snapshot

6. Recommend next steps

Prioritize the most impactful remaining fix:

  • Missing tools: installation commands
  • Missing workspace: oacp init <project>
  • Invalid YAML: file path and error details
  • Stale inbox: suggest processing with /check-inbox
  • Trust-pin gaps on an enforce receiver: import each missing peer with oacp trust import <kid>.pub.json --project <project> --agent <receiver>
  • Invalid policy signature (policy_auth: invalid): confirm the policy change, then re-sign it with oacp trust sign-policy

Notes

  • Do not invent checks beyond the categories returned by oacp doctor.
  • --fix already handles missing inbox directories, missing status.yaml, and stale status timestamps. Do not add manual fix scripts for those cases.
  • shared/INTENT.md is a repo-side reference, not an installed runtime dependency for Codex.
  • Prefer concise reporting over restating every successful check.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.