/offrails:doctor [--fix]from Rust off Rails
Audits a Rust off Rails app against framework conventions: structure, banned crates, portability, security, tests, and docs drift. Reports or fixes violations.
Ships in Rust off Rails. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Only for Rust off Rails apps (a .offrails/ directory exists). Mode: $ARGUMENTS (with --fix, fix the violations; otherwise only report them).
Start with the script: sh .offrails/tools/offrails-check (apps before 0.6.0: sh ${CLAUDE_PLUGIN_ROOT}/tools/offrails-check). Report its FAIL lines as violations verbatim; they are mechanical facts (header consistency, uncited ACs, missing Security-table tests, missing tenancy suites, unscoped lookups in handlers). Then read .offrails/AGENTS.md, structure.md, stack.md and workflow.md, plus the app's AGENTS.md, and check each remaining item and record a verdict (ok / violation with file:line / n/a):
Structure (structure.md)
FRONTEND_MODE.services/ directory.Stack (stack.md)
Cargo.toml / web/package.json contain no banned crates or packages (cargo deny check bans enforces the list mechanically via deny.toml; check direct dependencies by hand too). Any unlisted crate has a docs/decisions.md entry..offrails/ is unmodified (compare with .offrails/VERSION and the plugin copy if available).Data
src/kernel/ or logged escape hatches (guides/database.md).down. Foreign keys are indexed.HTTP & security (guides/routing.md, guides/security.md)
ROUTES, paths:: and routes.rs agree. docs/routes.md is current (cargo run -- routes).RequireUser and calls a policy.Code hygiene (Definition of Done checklist)
unwrap()/expect() outside tests and startup code. No todo!(). No // TODO without a linked open question.web/src/types/ matches what ts-rs exports, and no hand-written TS duplicates a Rust type.Tests (guides/test-standards.md)
tests/app/security_test.rs has the access matrix over ROUTES, and every ROUTES entry declares its access level.tenancy_test.rs's Tenant holds a record of every tenant-owned model, and its EXPECTED entries each cite an AC that really makes that route shared (the script checks the files exist, not that they're complete).sleep in tests, no #[ignore] without a decision, and no assertions weakened in recent history (git log -p tests/).Accessibility (guides/test-standards.md §10)
Specs ↔ code
Config, .env.example and the deploy config.git log) has its intent captured in a spec or decision.Finish with /offrails:check (with --fix), or run the DoD commands read-only.
Report: a table of findings grouped by area (most severe first), then the top 3 fixes. With --fix, apply them in vertical slices, keep the tree green, and log the decisions.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
9 skills in this plugin
/checkRun the Rust off Rails Definition of Done (fmt, clippy, tests on SQLite and Postgres, frontend checks, checklist) and fix what fails. Use before saying work is done, or when the user asks "is it green?", "run the tests", or "check everything"./deployMake a Rust off Rails app deployable and ship it (Docker, Fly.io, Kamal, Railway, Render), including production database setup and migrations on deploy. Use when the user asks to deploy, ship, host, or put an Off Rails app in production./featureBuild or change a feature in a Rust off Rails app from a plain-language request or from the specs in product/. Use for "add X", "let users Y", "build what changed in product/", or any feature work in an app with a .offrails/ directory./generateRun a Rust off Rails generator other than scaffold, like `rails generate`: model, resource, migration, job, mailer, channel, authentication, task. Use when the user asks to add a background job, an email, live updates, login, a migration, or a model to a Rust off Rails app./newCreate a new Rust off Rails web app (the `rails new` of Rust). Use when the user wants to start a new Rust web app, SaaS, internal tool or site, or says "rails new", "new app", or "off rails". Runs the interview, confirms a plan, then generates the app./scaffoldGenerate a full resource (migration, model, policy, controller, routes, views or pages, tests) in a Rust off Rails app, like `rails g scaffold`. Use when the user asks to scaffold or add a CRUD resource with fields, e.g. "scaffold Book title:string rating:integer".npx claudepluginhub rust-off-rails/rustoffrails --plugin offrailsOther plugins' skills for the same job