init-project-doctor

A project-internal command that checks whether the files defining an agent's development workflow are present, valid, and kept in sync. It can guide you through repairing detected problems.

In plain words
What is it for?
Use it to check and repair `.claude/workflows.jsonl`, its format, mirrored policy text, and misplaced tooling files.
Why use it?
It finds configuration drift after upgrades or manual edits, so the project does not quietly run with inconsistent workflow rules.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/friedbotstudio/baseline/init-project-doctor
Clone the repo
git clone --depth 1 https://github.com/friedbotstudio/baseline

Made for: Claude Code.

Per session 76 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,453 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00076 $0.01453
Opus 5 $0.00038 $0.00727
Sonnet 5 $0.00015 $0.00291
Haiku 4.5 $0.00008 $0.00145

Measured 2d ago against content hash 026c0494ee11, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

init-project-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 2d 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.

.claude/commands/init-project-doctor.md · 82 lines

How it starts

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

/init-project doctor — baseline drift detector + repairer

User-only command. Run after a create-baseline upgrade cycle, after manually editing workflows.jsonl, or any time the baseline feels out of sync. Different from create-baseline doctor (the npm CLI manifest-drift checker) — this is a project-internal interactive repair tool.

Step 1 — Pre-flight

  • Print: "/init-project doctor — checking baseline integrity. Each detected violation is presented separately; you confirm each fix via AskUserQuestion."
  • Verify the project is configured: .claude/project.json → configured == true. If false, halt with: "Run /init-project first; the project is in agnostic mode."
  • Verify node ≥ 18.17 available; halt with one-line missing-dep message if not.

Step 2 — Check .claude/workflows.jsonl presence

Restore source depends on the tree shape. A baseline development tree carries pristine templates under its own template directory; a consumer install does not — it received these files from the published package. Resolve the source before offering a restore, and never offer a copy from a path the install does not have.

  • If .claude/workflows.jsonl is missing on disk:
    • AskUserQuestion: ".claude/workflows.jsonl missing. Restore it?"
    • Options: Restore | Skip | Show diff
    • On Restore in a development tree: copy the pristine workflows template from the repo's template directory.
    • On Restore in a consumer install: re-run the baseline installer's merge (or /upgrade-project) to re-materialize the file from the published package. Report the command rather than fabricating the content.
    • Either way, log to .claude/state/init/doctor-<timestamp>.log.
    • On Skip: note in report; proceed.

Step 3 — Check .claude/schemas/ presence

  • If .claude/schemas/workflow-track.v1.json is missing:
    • AskUserQuestion: ".claude/schemas/workflow-track.v1.json missing. Restore it?"
    • Resolve the restore source exactly as Step 2 does — repo template directory in a development tree, installer re-materialization in a consumer install.
    • Apply on Restore (recursive copy).

Read the full file on GitHub · 82 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. 2d ago First seen · 82 lines · 0 tokens per session scan A 026c0494ee11

Subscribe to this mod's changes

init-project-doctor is a command published in the GitHub repository friedbotstudio/baseline (11 stars, last pushed 6d ago), licensed Apache-2.0. It adds 76 tokens to every session and 1,453 once invoked, about $0.0004 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-08-30.