doctor

doctor is a command for coding agents from spree/agent-skills. It costs 26 tokens per session (1,037 once invoked), scanned A, original, MIT.

A diagnostic command for Spree, an online-store system built with Ruby on Rails. It checks Docker, containers, settings, the web app, database migrations, and background jobs.

In plain words
What is it for?
Use it when a Spree development store is not working. It helps diagnose startup, database, web-server, environment, and job-processing problems.
Why use it?
It runs the full set of health checks and connects each failure to a specific repair command, including differences between Docker apps, classic Rails apps, and monorepos.

Command

Part of the spree plugin — 26 skills, 2 commands, 1 agent, 2 hooks shipped together

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/spree/agent-skills/doctor
Clone the repo
git clone --depth 1 https://github.com/spree/agent-skills

Or install spree, the plugin that ships this one along with the rest of its 26 skills, 2 commands, 1 agent, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for doctor

README.md
[![agentmods](https://agentmods.dev/badge/commands/spree/agent-skills/doctor.svg)](https://agentmods.dev/commands/spree/agent-skills/doctor)
Your own site
<a href="https://agentmods.dev/commands/spree/agent-skills/doctor"><img src="https://agentmods.dev/badge/commands/spree/agent-skills/doctor.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 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,037 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00026 $0.01037
Opus 5 $0.00013 $0.00518
Sonnet 5 $0.00005 $0.00207
Haiku 4.5 $0.00003 $0.00104

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

Security

Grade A, and why

doctor scanned grade A with 1 finding 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 5d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

4. **Web responding** — `curl -fsS -o /dev/null -w '%{http_code}' http://localhost:<SPREE_PORT>/` (substitute the detected port)
commands/doctor.md · 44 lines

How it starts

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

Spree stack diagnosis

Run every check below in order against this project. Do not stop at the first failure — run all of them, then report. Judge each against its healthy state.

Pre-flight — detect the project flavor:

  • docker-compose.yml at the root (create-spree-app / spree-starter): run the Docker checks below as written.
  • No Docker wiring but a Rails app with spree gems at the root (classic pre-5.4 app): skip checks 1–2, run everything else natively — replace spree exec <cmd> with plain <cmd> from the app root, check the web on the port bin/dev/bin/rails s uses (default 3000), and read backend/Gemfile.lock as Gemfile.lock.
  • Neither: not a Spree project — say so and stop.

Command routing (Docker flavors): prefer spree exec <cmd>; if the spree CLI isn't available, fall back to docker compose exec -T web <cmd>. If .env contains SPREE_PATH, this is a monorepo edge project — spree dev/spree build refuse there by design; remedies should say pnpm server:dev / pnpm server:build (run from the monorepo root) instead. On classic apps, remedies use native forms (bin/dev, bin/rails db:migrate, bundle exec rake).

Checks

  1. Docker daemondocker info --format '{{.ServerVersion}}' Healthy: prints a version. Remedy: start Docker Desktop / OrbStack.

  2. Containersdocker compose ps -a --format '{{.Service}}: {{.State}} ({{.Status}})' Healthy: postgres, redis, web running (plus worker and meilisearch when defined in the compose file). Exited app containers are normal if the user just hasn't booted; the remedy is spree dev (foreground, Ctrl+C stops) — or pnpm server:dev in monorepo mode.

  3. Env file — read .env: SECRET_KEY_BASE present and non-empty, SPREE_PORT (default 3000 when absent). Note SPREE_VERSION_TAG if pinned. Flag a missing .env as the likely root cause for boot loops.

  4. Web respondingcurl -fsS -o /dev/null -w '%{http_code}' http://localhost:<SPREE_PORT>/ (substitute the detected port) Healthy: 2xx/3xx. 000 = nothing listening (stack down or still booting — check spree logs); 5xx = Rails boot/runtime error (read spree logs and include the first error line in the report).

Read the full file on GitHub · 44 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. 5d ago First seen · 44 lines · 26 tokens per session scan A 95c15af04332

Subscribe to this mod's changes

doctor is a command published in the GitHub repository spree/agent-skills (4 stars, last pushed 2mo ago), licensed MIT. It adds 26 tokens to every session and 1,037 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.