Logo de Doctor

Doctor

Comunidade
yonatangross
doctor

OrchestKit doctor for health diagnostics across manifest integrity, hook configuration, skill validation, agent frontmatter, MCP server connectivity, CC version compatibility, and permission rules. Reports issues with severity levels and auto-remediation suggestions. Validates component counts, detects orphaned entries, and checks CC version matrix compliance. Use when diagnosing plugin health, troubleshooting configuration issues, or running pre-release checks.

Visão geral

Publicado poryonatangross
Repositórioorchestkit
Nome da habilidadedoctor
Estrelas
298
Forks
35
Arquivos incluídos
27
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 27

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por yonatangross no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Doctor no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/yonatangross/orchestkit/tree/main/plugins/ork/skills/doctor
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/yonatangross/orchestkit.git /tmp/orchestkit
mkdir -p .claude/skills
cp -r /tmp/orchestkit/plugins/ork/skills/doctor .claude/skills/doctor
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Doctor em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Doctor automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Doctor não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

OrchestKit Health Diagnostics

Host-neutral workflow. Invoke by skill name (doctor). Claude Code slash routing, YAML hook loaders, and .claude/chain live in references/claude-code.md.

Argument Resolution

python
FLAGS = "$ARGUMENTS"         # Full argument string, e.g., "--verbose" or "--json"
FLAG = "$ARGUMENTS[0]"       # First token: -v, --verbose, --json, --category=X
# $ARGUMENTS[0], $ARGUMENTS[1] for indexed access (CC 2.1.59)

STEP 0: Choose Scope (AskUserQuestion — M118 #1464)

A full doctor run takes ~20s. Most invocations only need one slice. Ask the user up-front so voice-flow shortcuts ("just the MCPs") map cleanly:

python
# Skip the prompt when an explicit scope arg or env override is present:
#   doctor cc      → skip, use cc-only
#   doctor mcp     → skip, use mcp-only
#   doctor plugin  → skip, use plugin-only
#   ORK_DOCTOR_SCOPE=all (or any of the above) → skip, use the env value
#
# Otherwise, ask:
AskUserQuestion(questions=[{
  "question": "What should doctor check?",
  "header": "Scope",
  "options": [
    {"label": "Everything (default)", "description": "Full system health — ~20s; runs all 15 categories"},
    {"label": "CC version & features only", "description": "Categories 10 + 13 + 14; ~3s — for 'is my CC up to date?'"},
    {"label": "MCP servers only", "description": "Category 12 (incl. pinning sub-check); ~5s — for 'are MCPs working?'"},
    {"label": "Plugin health only", "description": "Categories 0-3 + 5 (skills, agents, hooks, build); ~8s — for 'after npm run build'"}
  ]
}])

Skip the prompt entirely when the scope is unambiguous from the invocation. The fast scopes (3-8s) are 3-7× faster than the full run — voice users say "just the MCPs" and get a 5s answer.

Overview

The doctor command performs comprehensive health checks on your OrchestKit installation. It auto-detects installed plugins and validates 16 categories:

  1. Installed Plugins - Detects ork plugin
  2. Skills Validation - Frontmatter, references, token budget (dynamic count)
  3. Agents Validation - Frontmatter, tool refs, skill refs (dynamic count)
  4. Hook Health - Registration, bundles, async patterns
  5. Permission Rules - Detects unreachable rules
  6. Schema Compliance - Validates JSON files against schemas
  7. Coordination System - Checks lock health and registry integrity
  8. Context Budget - Monitors token usage against budget
  9. Memory System - Graph memory health
  10. Claude Code Version - Validates CC >= the supported_floor in shared/cc-support.json (read it; it is the single source). Everything the old "recommends 2.1.154+" note gated (xhigh effort, /ultrareview, stream-json plugin_errors) is floor-guaranteed now, so there is nothing left to recommend
  11. External Dependencies - Checks optional tool availability (agent-browser), plus one line per peer skill installed from another marketplace: typesafe@typesafe-ai installed version against the marketplace's, via scripts/check-peer-skill.py (missing marketplace and missing plugin are separate verdicts, the vendor's update commands are the fix text; #4233)
  12. MCP Status - Active vs disabled vs misconfigured, API key presence for paid MCPs. CC 2.1.110: detects duplicate definitions across config scopes. Sub-check warns when HIGH-tier servers resolve to @latest in .mcp.json (closes #1462)
  13. Plugin Validate - Runs claude plugin validate for official CC frontmatter + hooks.json validation (CC >= 2.1.77)
  14. Effort/Model Compatibility - Warns only when xhigh effort is configured AND the active model is provably unable to run it. Silent otherwise, because the fallback itself is silent
  15. Sandbox Posture - CC Bash-sandbox on/off across all four settings scopes (incl. ~/.claude/settings.json, where real configs usually live), with a /sandbox nudge; sub-check 15b queries the macOS unified log for recent sandbox deny events (fail-closed: a denied log query reports UNOBSERVABLE, never zero)
  16. Operator Settings Posture - Detects security controls that a plugin bundle cannot carry (credential-read deny rules, the sandbox block, CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS) and are therefore missing unless the operator wrote them into their own settings

When to Use

  • After installing or updating OrchestKit
  • When hooks aren't firing as expected
  • Before deploying to a team environment
  • When debugging coordination issues
  • After running npm run build

Quick Start

bash
doctor           # Standard health check
doctor -v        # Verbose output
doctor --json    # Machine-readable for CI

CLI Options

FlagDescription
-v, --verboseDetailed output per check
--jsonJSON output for CI integration
--category=XRun only specific category

Health Check Categories

Detailed check procedures: Load Read("rules/diagnostic-checks.md") for bash commands and validation logic per category.

MCP-specific checks: Load Read("rules/mcp-status-checks.md") for credential validation and misconfiguration detection.

Output examples: Load Read("references/health-check-outputs.md") for sample output per category.

Categories 0-3: Core Validation

CategoryWhat It ChecksReference
0. Installed PluginsAuto-detects ork plugin, counts skills/agentsload rules/diagnostic-checks.md
1. SkillsFrontmatter, context field, token budget, links, activation-channel reachability (no orphaned user-invocable skills)load references/skills-validation.md
2. AgentsFrontmatter, model, skill refs, tool refsload references/agents-validation.md
3. Hookshooks.json schema, bundles, async patterns — across all three hook scopes: global, agent-scoped, and skill-scoped. Detects the common hook problems: missing files (registered but not on disk), syntax errors in hooks.json or bundles, permission issues (non-executable scripts), and stale references (entries pointing at renamed/removed handlers)load references/hook-validation.md

Activation-channel orphans (repo / pre-release): a user-invocable skill should be reachable by more than a human typing it — via a chain (another skill references /ork:<skill>), a subagent grant (skills: in src/agents/*.md), or a background trigger. A skill with none is an "island" that silently rots. In a repo checkout, run npm run test:manifests:channels (gated in CI via test:manifests). Fix an island by wiring any one channel, or add it to STANDALONE_ALLOWLIST with a justification.

Categories 4-5: System Health

CategoryWhat It ChecksReference
4. Memory.claude/memory/ graph integrity + queue depth; auto-memory MEMORY.md index budget; per-agent .claude/agent-memory/NAME/MEMORY.md (orphans, staleness, 150-line warn, secret/PII)load references/memory-health.md and references/agent-memory-dir.md
5. Buildplugins/ sync with src/, manifest counts, orphansload rules/diagnostic-checks.md

Analytics writer liveness (System Health): the local analytics pipeline has several independent JSONL writers under ~/.claude/analytics/ (skill-usage, agent-usage, hook-timing). A writer can die silently while its siblings stay hot — observed once for four months (skill-usage.jsonl, 2026-03 to 2026-07). The check is a peer comparison: flag any watched file whose last write is ≥48h old while a sibling wrote within 24h (stat -f '%m %N' ~/.claude/analytics/*.jsonl). The lifecycle/analytics-liveness-check SessionStart hook runs the same comparison continuously.

A flagged writer means the write path was dropped from dispatch, so check both surfaces — src/hooks/hooks.json AND the entries map (src/hooks/src/entries/*.ts). A hook present in one but not the other is registered-looking and silently dead: the #959 failure class. telemetry-inspect gives the per-file deep dive, covering the field-level defects this structural check cannot see: constant fields and phantom rows, the two classes fixed in #3034 and #3035 (both closed 2026-07-20). Cite them as prior art, not as open work.

(Category numbering in this file is inconsistent between the Overview list above and these tables — the Overview numbers 4 as Hook Health, the tables number 4 as Memory. This check belongs to System Health regardless of which numbering a reader follows.)

Categories 6-9: Infrastructure

CategoryWhat It Checks
6. Permission RulesUnreachable rules detection
7. Schema ComplianceJSON files against schemas
8. CoordinationMulti-worktree lock health, stale locks, sparse paths config
9. Context BudgetToken usage against budget

Categories 10-16: Environment

CategoryWhat It ChecksReference
10. CC VersionRuntime version against minimum requiredload references/version-compatibility.md
11. External DepsOptional tools (agent-browser, portless)load rules/diagnostic-checks.md
12. MCP StatusEnabled/disabled state, credential checks, HIGH-tier @latest pinning warnload rules/mcp-status-checks.md + references/mcp-pinning-check.md
13. Plugin ValidateOfficial CC frontmatter + hooks.json validation (CC >= 2.1.77)load rules/diagnostic-checks.md
14. Effort/Modelxhigh effort configured on a model that provably cannot run it (see below). Defaults to silenceinline
15. Sandbox PostureCC Bash-sandbox on/off across all four settings scopes + /sandbox nudge (opt-in, Bash-only; info-level). 15b: bounded read-only query of the macOS unified log for recent Sandbox deny events via scripts/check-sandbox-violations.sh (warn-level; fail-closed when the log query itself is denied; explicit skip off macOS)load references/sandbox-posture.md
16. Operator Settings PostureControls a plugin bundle cannot carry, so they exist only if the operator wrote them: credential-read permissions.deny rules (defence in depth: pretool/read/credential-read-guard already covers the Read tool), the sandbox block incl. network.deniedDomains (the egress guard only asks on the upload shape; a plain GET abstains), and CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS (ork's own agent-teams.ts gates on it). Since CC 2.1.257 it also reports permissions.blockReadsOutsideWorkingDirectories and warns when it is true without ~/.claude in additionalDirectories (the reads ork skills make outside the project would be refused, not prompted). Since #3877 it also names a project-scope sandbox.enabled: false that overrides a user-scope true (sandbox_override, project file:line and user file:line; the project file wins and Bash runs unsandboxed). Since #3835 the audit is a script: bash ${CLAUDE_SKILL_DIR}/scripts/check-operator-permissions.sh <project_dir> --json (exit 0 all payload rules enforced, 1 missing with the remedy, 2 could-not-observe); the remedy is setup phase 3.6, consent-gated. Warn-level; prints the JSON to pasteload references/settings-posture.md

Why Check 16 exists at all: plugins-reference.md:858 says "Only the agent and subagentStatusLine keys are currently supported" in a plugin's bundled settings.json. Everything else ork used to declare there was inert, so the protection it looked like it shipped was never in force. Check 16 is the replacement: detect the gap in a scope CC really reads, then hand the operator the exact JSON. The ork:configure skill, section Operator-Scope Settings, carries the paste-ready blocks, staged loose-then-strict per #3424; the full JSON is in ../configure/references/operator-scope-settings.md.

Category 14: Effort/Model Compatibility (CC 2.1.111+)

CC 2.1.111 added the xhigh effort tier. The only reason this category exists is the silence: a model that does not implement xhigh degrades the request to high with no error, no warning, and no log line, so the extra deepening pass the affected skills document is lost without any visible signal. If CC ever surfaces the downgrade itself, delete this category.

The check is capability-shaped, not model-name-shaped. Never hardcode "the current frontier model" here: that guarantees a false failure the day the next one ships, and it prescribes a downgrade to a superseded model.

Do not route this through src/hooks/src/lib/models.vocab.json. That file is the model-id/pricing vocabulary and carries no effort or capability fields at all, so keying off it would leave the check permanently, accidentally dead rather than deliberately quiet.

Detection (warn only on positive proof):

  1. Resolve the configured effort, in order: .claude/settings.json → effort, then $ORCHESTKIT_EFFORT (populated by the effort-detector hook), then any .claude/chain/*.json entry that explicitly set effort: xhigh. No xhigh anywhere means pass, no output.
  2. Resolve the active model id.
  3. Warn only when that model id matches a prefix in doctor's local XHIGH_UNSUPPORTED_PREFIXES table below. Every other outcome (model absent from the table, model id unresolvable, settings file missing) is a pass. A check that cannot prove a problem stays quiet.
python
# Doctor-local capability table. Deliberately a DENY-list, not an allow-list:
# a model absent from this table is assumed to support xhigh and emits nothing.
# Add an entry only from an OBSERVED silent degrade, citing the CC version it was
# seen on. Never add one by inferring from a model being new, old, or cheap.
XHIGH_UNSUPPORTED_PREFIXES = [
    # prefix        evidence
    "claude-3-",  # the whole Claude 3 line predates CC 2.1.111, which introduced the tier
]

An empty or short table is the correct resting state. Silence here means "doctor has no proof of a problem", which is a true statement, whereas a name-matched failure against an unrecognized model is a false one.

Warning format (no model name is hardcoded, both sides are read at runtime):

WARNING: effort is set to `xhigh`, but <model-id> matches XHIGH_UNSUPPORTED_PREFIXES.
  Configured effort: xhigh (source: <settings.json | $ORCHESTKIT_EFFORT | chain>)
  Impact: the run degrades to `high` with no error and no log line, so the extra
          deepening pass is lost with nothing to notice it by.
  Fix: run this on a model that implements `xhigh`, or set effort to `high` so the
       config matches what actually executes.

Exit code: Non-zero in --json mode only when the warning actually fires; soft warning in interactive mode. A silent pass is exit 0.

Report Format

Every category reports an explicit pass / warn / fail status, and every warn or fail comes with specific fix steps for that failure type (the exact command to run, file to edit, or config to change) — doctor diagnoses AND prescribes, it never just lists problems.

Load Read("references/report-format.md") for ASCII report templates, JSON CI output schema, and exit codes.

Interpreting Results & Troubleshooting

Load Read("references/remediation-guide.md") for the full results interpretation table and troubleshooting steps for common failures (skills validation, build sync, memory).

Bisect with --safe-mode (CC 2.1.169+): when doctor findings don't explain a misbehaving session, restart with claude --safe-mode (or CLAUDE_CODE_SAFE_MODE=1) — it disables ALL customizations (CLAUDE.md, plugins incl. ork, skills, hooks, MCP). If the problem disappears, it's a customization; re-enable halves to isolate. If it persists, it's CC itself — file upstream.

Host load vs session load (macOS): when doctor findings say the session is healthy but the machine is slow, do not diagnose from memory_pressure's "System-wide memory free percentage": it once read 84% free while 59 of 64 GB was in use and swap stood at 6.9 of 8 GB, and the first culprit named from that number was wrong (the real load was a test suite in another project). Read the evidence before naming anything: sysctl vm.swapusage for swap, vm_stat for the memory split, and a process view sorted by memory use (e.g. ps aux | sort -nrk 4 | head) for who is actually consuming memory.

After you fix an issue

CC 2.1.69+: Run /reload-plugins to activate plugin changes in the current session without restarting.

CC 2.1.116+: /reload-plugins and background plugin auto-update now auto-install missing plugin dependencies from marketplaces you've already added. If ork:doctor flagged a plugin-load failure due to a missing dep, /reload-plugins resolves it in place — no manual plugin install step needed.

CC 2.1.152+: For non-plugin skills in a skill directory (~/.claude/skills/ or .claude/skills/), run /reload-skills to re-scan without restarting — the skill analogue of /reload-plugins.

CC 2.1.268+: /plugin install, enable and disable take effect when the menu closes, so /reload-plugins is no longer needed after them.

Chain: Deeper Audit

After a clean health report, audit the observability pipeline itself:

telemetry-inspect

doctor validates structure (manifests, hooks, skills, agents); telemetry-inspect validates the data plane — every telemetry writer's row count, schema lock, growth trend, and orphaned analytics files that structural checks don't cover.

Related Skills

  • ork:configure - Configure plugin settings
  • ork:telemetry-inspect - Audit the telemetry/analytics pipeline after a clean structural check
  • ork:quality-gates - CI/CD integration
  • security-scanning - Comprehensive audits

References

Load on demand with Read("references/<file>") or Read("rules/<file>"):

FileContent
rules/diagnostic-checks.mdBash commands and validation logic per category
rules/mcp-status-checks.mdCredential validation and misconfiguration detection
references/remediation-guide.mdResults interpretation and troubleshooting steps
references/health-check-outputs.mdSample output per category
references/skills-validation.mdSkills frontmatter and structure checks
references/agents-validation.mdAgents frontmatter and tool ref checks
references/hook-validation.mdHook registration and bundle checks
references/memory-health.mdMemory system integrity checks
references/agent-memory-dir.mdPer-agent agent-memory dir: orphans, staleness, 150-line warn, secrets
references/permission-rules.mdPermission rule detection
references/skill-preapproval.mdSkills whose allowed-tools pre-grant stops under managed allowManagedPermissionRulesOnly (CC 2.1.282, 2.1.284), detection and admin remedy
references/schema-validation.mdJSON schema compliance
references/report-format.mdASCII report templates and JSON CI output
references/version-compatibility.mdCC version and channel validation
references/mcp-pinning-check.mdHIGH-tier MCP @latest warning logic + tier source-of-truth
references/sandbox-posture.mdCC Bash-sandbox on/off detection + /sandbox nudge (Check 15) + unified-log violation query (15b)
references/settings-posture.mdOperator-scope security posture: what a plugin bundle cannot carry, and how to detect it missing (Check 16)

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Doctor faz?

OrchestKit doctor for health diagnostics across manifest integrity, hook configuration, skill validation, agent frontmatter, MCP server connectivity, CC version compatibility, and permission rules. Reports issues with severity levels and auto-remediation suggestions. Validates component counts, detects orphaned entries, and checks CC version matrix compliance. Use when diagnosing plugin health, troubleshooting configuration issues, or running pre-release checks.

Por que usar Doctor no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Doctor é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Doctor no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/yonatangross/orchestkit/tree/main/plugins/ork/skills/doctor. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Doctor?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Doctor?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Doctor com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Doctor é gratuita?

Sim. A habilidade é publicada no GitHub por yonatangross sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇