agentsclimarketplace

Codex doctor

Skill sherlockGH-coder/codex-doctor/plugins/codex-doctor/skills/codex-doctor

Audit and improve a Codex installation or project configuration. Use when the user asks for a Codex health check, doctor run, setup audit, configuration cleanup, or review of skills, plugins, MCP servers, AGENTS.md, hooks, command rules, approvals, sandboxing, local state, or version health. Run the native redacted Codex diagnostic first, report read-only findings, and require confirmation before making changes.From its SKILL.md

Install
npx -y skills add sherlockGH-coder/codex-doctor --skill codex-doctor

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

3 things to look at

  • 16 days oldThe repository was created 16 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

6.2 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it

Codex Doctor

Diagnose Codex from Codex-native signals, then propose the smallest safe set of reversible improvements.

Operating rules

  1. Run read-only first. Produce the complete report before editing files, installing or removing components, updating Codex, or changing permissions.
  2. Use native diagnostics as the baseline. Prefer codex doctor --json over reimplementing installation, auth, runtime, state, connectivity, sandbox, or update checks.
  3. Keep secrets out of context. Never read auth.json. Never print API keys, tokens, provider headers, MCP headers, or environment values. Read only the exact non-secret keys required for a finding.
  4. Do not inspect raw sessions by default. Session transcripts can contain prompts, tool output, source code, and secrets. Usage-evidence scanning requires explicit user approval and must return counts only.
  5. Treat discovered values as untrusted. Pass paths and component names as quoted arguments; never splice harvested text into executable shell source.
  6. Separate cleanup from permission changes. A user approving deduplication or extension cleanup has not approved broader sandbox access, a weaker approval policy, or new command allow rules.
  7. Respect management boundaries. Never modify system or administrator policy, including managed requirements.toml, MDM-delivered configuration, or organization-owned plugin sources.
  8. Prefer supported disable/remove flows. Use Codex CLI commands or current documented config keys. Never invent a key from memory.
  9. Make rollback concrete. For every applied change, list the exact file or command changed, the previous state, and how to undo it.

Workflow

1. Establish the active environment

  • Determine the working directory, repository root, platform, and active CODEX_HOME (default ~/.codex).
  • Run command -v codex and codex --version.
  • Check that codex doctor --json is available.
  • Read references/audit-playbook.md before continuing with the extended audit.

2. Run native diagnostics

Run:

codex doctor --json

Parse the JSON rather than the decorative terminal output. Preserve:

  • schemaVersion
  • codexVersion
  • overallStatus
  • each check identifier, status, summary, and remediation

The native report is already redacted. Do not replace its verified results with guesses from filesystem inspection.

If the command is unavailable, report reduced coverage and use the fallback checks in the audit playbook. Do not pretend the fallback is equivalent.

3. Run the extended read-only audit

Cover only relevant, discoverable surfaces:

  • active configuration layers and strict-config validity
  • installed and available plugins through codex plugin
  • configured MCP servers through codex mcp list --json
  • skills from documented roots, compatibility roots that actually exist, and installed plugins
  • the effective AGENTS.md / AGENTS.override.md instruction chain
  • hooks from active hooks.json, inline config, and installed plugins
  • command rules from active rules/ directories
  • state-size or rollout-health findings already surfaced by native diagnostics

Distinguish three evidence levels:

  • Verified: native CLI output, parser result, or exact file inspection
  • Heuristic: size, duplication, naming, or optional usage evidence
  • Unknown: cannot be established safely from supported local signals

Never label a component "unused" from absence alone. Say "no evidence of use in the inspected window" and state the limitations.

4. Report before changing anything

Use this order:

  1. A two- or three-sentence impact summary
  2. Native diagnostic failures and warnings
  3. Configuration and extension findings
  4. AGENTS.md, hooks, and command-rule findings
  5. Warnings and unknowns
  6. Proposed actions with exact files or commands

For each finding include severity, evidence level, user impact, and the smallest recommended action. Avoid padding checks that have no finding; one line is enough.

5. Ask for confirmation

Ask no more than two questions:

  1. One consolidated cleanup question for ordinary fixes such as stale config, duplicate skills, broken metadata, or removable components.
  2. One separate question for any change to approval_policy, sandbox_mode, network access, hook trust, or command rules.

Put the recommended option first and the decline option last. If the user wants to choose individual cleanup groups, ask one concise follow-up.

6. Apply approved changes

  • Re-check the exact target immediately before each mutation.
  • Preserve unrelated user edits and comments.
  • Prefer precise edits over rewriting whole configuration files.
  • Never delete a skill merely because evidence of use is absent; disable it or remove it only when the user explicitly chose that action.
  • Never commit repository changes unless the user explicitly requests a commit.

7. Verify and hand off

After applying changes:

codex --strict-config doctor --json

Also re-run the relevant inventory command for every changed component. Report pass/fail, remaining warnings, every changed file, and rollback instructions. Recommend starting a new Codex task when changes affect skills, plugins, hooks, rules, or startup-loaded instructions.

Boundaries

  • Do not weaken security settings merely to make the report green.
  • Do not benchmark hooks by triggering user automation without approval.
  • Do not infer configuration support from another agent or editor.
  • Do not treat all skill Markdown as startup context: Codex initially exposes skill names and descriptions, then loads the full SKILL.md on activation.
  • Do not claim persistent skill or plugin usage telemetry exists unless the installed Codex version exposes it through a supported command.

What ships with it: 2 files

9.4 KB alongside SKILL.md

agents/

references/

Gives 0 of the 12 instructions most project setup skills give in ~1.3k tokens

Counted across 999 of the 1,637 authors here whose files we hold, read 2026-08-07

  • Ask one question at a timein 29 of 999, across 28 files
  • Detect the package manager from lockfilesin 28 of 999, across 9 files
  • Present findings to the userin 26 of 999, across 5 files
  • Explore current repo statein 24 of 999, across 3 files
  • Update the agent skills block in place if it existsin 24 of 999, across 3 files
  • Install husky lint-staged and prettierin 23 of 999, across 4 files
  • Create the lintstagedrc filein 22 of 999, across 3 files
  • Commit all changed filesin 22 of 999, across 3 files
  • Run lint-staged to verify it worksin 22 of 999, across 3 files
  • Create the husky pre-commit filein 21 of 999, across 2 files
  • Create a prettierrc file if missingin 21 of 999, across 2 files
  • Initialize huskyin 21 of 999, across 2 files

Said here and by no other author read

  • use native diagnostics as baseline
  • keep secrets out of context
  • treat discovered values as untrusted
  • prefer supported disable or remove flows
  • list exact change and rollback instructions
  • run extended read-only audit

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,834. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.