doctor
Audit a Rust off Rails app against the framework's conventions (structure, stack, banned crates, portability, security, tests, docs drift) and report or fix…
от rust-off-rails★ 55 звёзд на GitHub
Установить doctor в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
/offrails:doctor — convention audit
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)
- No top-level directories beyond the tree; nothing outside the app's
FRONTEND_MODE. - Naming table followed (tables, modules, handlers, routes, templates, jobs, migrations).
- Module rules: models import no controllers or views; views do no DB access; no
services/directory.
Stack (stack.md)
Cargo.toml/web/package.jsoncontain no banned crates or packages (cargo deny check bansenforces the list mechanically viadeny.toml; check direct dependencies by hand too). Any unlisted crate has adocs/decisions.mdentry..offrails/is unmodified (compare with.offrails/VERSIONand the plugin copy if available).
Data
- No raw SQL outside
src/kernel/or logged escape hatches (guides/database.md). - Every migration has a working
down. Foreign keys are indexed. - The CI workflow runs tests on both SQLite and Postgres.
HTTP & security (guides/routing.md, guides/security.md)
ROUTES,paths::androutes.rsagree.docs/routes.mdis current (cargo run -- routes).- Every mutating handler that needs auth takes
RequireUserand calls a policy. - CSRF, security headers, rate limit on login, and cookie flags are all present.
Code hygiene (Definition of Done checklist)
- No
unwrap()/expect()outside tests and startup code. Notodo!(). No// TODOwithout 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)
- The app's archetypes (§2) are identified, and each one's required suites exist.
tests/app/security_test.rshas the access matrix overROUTES, and everyROUTESentry declares its access level.- Apps with accounts:
tenancy_test.rs'sTenantholds a record of every tenant-owned model, and itsEXPECTEDentries each cite an AC that really makes that route shared (the script checks the files exist, not that they're complete). - Public API: contract snapshots exist and none changed without a decision entry.
- No
sleepin tests, no#[ignore]without a decision, and no assertions weakened in recent history (git log -p tests/).
Accessibility (guides/test-standards.md §10)
- An axe suite exists, covers every public route in both color schemes and both widths, and runs in CI as a required check.
- No global rule disables; every exception has a decision entry.
- Spot-check contrast of code blocks, terminal cards and focus rings in both themes.
Specs ↔ code
- Env vars agree across
Config,.env.exampleand the deploy config. - Code that looks human-written (check
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.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл doctor?
Audit a Rust off Rails app against the framework's conventions (structure, stack, banned crates, portability, security, tests, docs drift) and report or fix violations. Use when the user asks to review, audit, lint, or "doctor" an Off Rails app, or after a human edited code by hand.
Как установить скилл doctor?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл doctor запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…