agentleFS
bilibossbiliboss/skills/skills/doctor/SKILL.md

doctor

Skill1 starsChanged 27 days agoMITView on GitHub

Use when taking over a project (especially an unknown one), when the owner says "doctor", "roda o doctor", "is it healthy", "está saudável?", or when adding a health diagnosis to a project or tool. Every project gets a doctor(): five dimensions (environment, architecture, behavior, observability, agent), read-only findings with the exact fix. The doctor is also the only behaviour check: smokes and critical rules in the project doctor, no test suite.

  • Reads credentials

96 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 4 projects that use this

  • ibahgatSkill

    hud

    Control omi visual HUD profile and keep status output readable in normal, compact, or hidden mode.

    Also in 3 projects that use this

  • ibahgatSkill

    ralplan

    Create a strict, quality-first execution plan with explicit gates and rollback-ready sequencing.

    Also in 3 projects that use this

  • diego-tobalinaSkill

    build-fix

    Fix build and compilation errors systematically. Run when build fails.

    Also in 3 projects that use this

  • Arman-KudaibergenovSkill

    inspect

    Этот скилл MUST быть вызван для анализа и инспекции любого объекта 1С из XML-выгрузки: конфигурация (cf-info), объект метаданных (meta-info), управляемая форма (form-info), схема компоновки данных СКД (skd-info), макет табличного документа MXL (mxl-info), подсистема (subsystem-info), роль и права (role-info). SHOULD вызывать как подготовительный шаг перед любой модификацией объекта. Do NOT использовать для модификации — для изменений используй соответствующие edit/compile скиллы.

    Also in 4 projects that use this

  • +1 more from ibahgat

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 72 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Every project and tool gets a doctor method.

    line 15
  2. Very specific:

    No justfile, a CLI exists → a doctor subcommand of that CLI.

    line 80
  3. Distinctive:

    Start from the generic doctor's warnings: each one is a missing piece to either fix or check on purpose.

    line 87
  4. Distinctive:

    The drift you already know is the doctor's acceptance test: Before writing a doctor, list the real drift seen by hand (live state, …

    line 91
  5. Distinctive:

    A finding found while listing is still a finding: When asked to list or report on a system that has a doctor (e.g.

    line 96
  6. Distinctive:

    Never give the doctor network or secret access beyond reachability and presence-by-name.

    line 102

“Common” is measured: kept by at least 6 in 10 of the 72 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 — "is the system healthy and ready to work?"

Every project and tool gets a doctor method. doctor() asks whether the system is healthy, ready to work, and behaving as it must. There is no test suite: behaviour is proven by smokes and critical-rule checks in the project's own doctor, dimension behavior. The owner calls this doctor driven development: a faster loop for an agent than starting from unit tests, because the doctor also tells the agent whether it can work here at all.

The rule

First action on a project: run its doctor. On an unknown project, if it has none, run the generic one (scripts/doctor.py <repo>) and propose a project doctor from what it found. Run it again after each change that could break the setup, and as a periodic check. Thread skill's thread.sh doctor is the first tool that follows this protocol.

The protocol

Five dimensions. A doctor diagnoses the software and the agent's own ability to work in it.

DimensionAsksTypical checks
environmentCan I run it?toolchain on PATH, dependencies installed, lock in sync, services up
architectureDo I understand how it works?entry points, components and invariants written down (README, .wiki/, AGENTS.md)
behaviorIs current behaviour right?smokes of the real flow and critical-rule checks, written in the project doctor
observabilityWould I notice a failure?logs, events, health endpoints, a heartbeat
agentCan this agent work here?required CLIs, auth present without reading secret values, skills/wiki pages it needs, permissions, remote reachable

Finding = {dimension, check, status, evidence, action}:

  • status: ok · warn (works, but watch/improve) · drift (reality no longer matches what is declared: stale lock, doc vs code) · fail (cannot work).
  • evidence: the raw fact seen (a path, an exit code, a count), never an opinion.
  • action: the exact command or step that fixes it. The doctor never runs it.

Output:

  • Text, one line per finding: <status> <dimension> <check>: <evidence> -> <action>
  • --json: one JSON object per finding, per line (summary goes to stderr).
  • ok findings only with --verbose; always a summary line.
  • Exit 0 healthy (ok/warn only) · 1 drift or fail present · 2 the doctor itself could not run.
  • Read-only by default. Repair is a separate, explicit step; a --fix exists only if the tool's owner adds it, and is never silent. Secrets: check presence by name, never print or read a value.

Running the generic doctor

scripts/doctor.py <repo>                 # read-only; default .
scripts/doctor.py <repo> --gate          # end of a batch: no verified behavior finding is a fail (exit 1)
scripts/doctor.py <repo> --json --verbose

It detects the stack by files (pyproject/uv.lock, package.json, go.mod, justfile, Dockerfile), checks the tools are on PATH, looks for README/.wiki/docs/AGENTS.md/CLAUDE.md and entry points, greps cheaply for logging/health/NATS, checks git ls-remote (timeout), gh auth status and write permission, and compares .env.example names against the environment. It discovers the project's own doctor (just doctor, scripts/doctor*, <cli> doctor), runs it and merges its findings (prefixed with where they came from).

The generic doctor knows nothing about what a project must do, so behavior comes only from the project doctor: a finding ok there is the verified one. Without it the check behavior smoke is warn, and fail with --gate. A warn from the project doctor does not count as verified, because warn is also how a skipped check is reported. A smoke must be fast and read-only, like every other check.

Adding a doctor to a project

Where it lives, in this order:

  1. The project has a justfile → a doctor recipe. Justfiles belong to T01: propose the recipe in the report or PR description, do not edit the justfile yourself.
  2. No justfile, a CLI exists → a doctor subcommand of that CLI.
  3. Otherwise → an executable scripts/doctor (uv script, PEP 723, stdlib only).

Contract for any of them: print findings in the text format above (or --json), accept --verbose (a just recipe declares doctor *args:) because the generic doctor calls it that way to see the ok findings, honour the exit codes, stay read-only, and cover what is specific to the project: its services, queues, data files, credentials by name, the invariants from its wiki, and in behavior a smoke of the real flow plus one check per critical rule. Do not repeat the generic checks; the generic doctor already runs them and merges yours. Start from the generic doctor's warnings: each one is a missing piece to either fix or check on purpose.

Pitfalls

  • The drift you already know is the doctor's acceptance test. Before writing a doctor, list the real drift seen by hand (live state, read-only) and do not fix it; ship the doctor only when its run on the live system reports exactly those findings. Fixing first leaves the doctor untested against reality.
  • One exit-code scale across the house (0 healthy incl. warn · 1 drift/fail · 2 could not run). A wiki page, README or project doctor stating another scale is itself drift: correct it to this one, do not add a variant.
  • A finding found while listing is still a finding. When asked to list or report on a system that has a doctor (e.g. "list open threads"), run the doctor too and report drift next to the list.
  • A doctor that "fixes" quietly hides the drift it found. Print the action; let the owner or the agent run it.
  • ok for something not actually looked at is worse than warn. If a check was skipped, say so with warn.
  • A missing optional thing (health endpoint in a CLI) is warn with the action to add it or to record why not.
  • Never give the doctor network or secret access beyond reachability and presence-by-name.

Origins and credits: README.md.

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.