agentleFS
rust-off-railsrust-off-rails/rustoffrails/skills/doctor/SKILL.md

doctor

Skill49 starsChanged 25 days agoApache-2.0View on GitHub

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.

  • Reads credentials

81 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use uninstall, cancel and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    uninstall

    Uninstall a community skill that was installed via the hub. Confirms before deleting files, refuses to touch first-party plugin skills, and logs every action. Use when the user wants to fully remove a community skill ("uninstall [skill]", "remove this skill") rather than just disable it.

    Also in 6 projects that use this

  • woosikkimSkill

    cancel

    Clear any stale OMC-Slim state

    Also in 3 projects that use this

  • ibahgatSkill

    mode

    Inspect or switch omi operating mode/profile for speed, depth, autonomy, or strict quality gates.

    Also in 3 projects that use this

  • BlockSkill

    open

    Open markdown documents in Penpal for collaborative review. Use when you want a human to review a document, plan, or research artifact.

    Also in 3 projects that use this

  • QinghongLinSkill

    editor

    Read analyst.json and detective.json, make all editorial decisions — what the blog argues, which findings matter, narrative arc and section structure. No visual design. Outputs editor.md (prose) and editor.json (structure with edt_xx IDs).

    Also in 3 projects that use this

  • AnthropicSkill

    status

    Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.

    Also in 15 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 61 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Only for Rust off Rails apps (a .offrails/ directory exists).

    line 10
  2. Very specific:

    No top-level directories beyond the tree.

    line 15
  3. Very specific:

    No raw SQL outside src/kernel/ or logged escape hatches (guides/database.md).

    line 24
  4. Very specific:

    Every migration has a working down.

    line 25
  5. Very specific:

    Every mutating handler that needs auth takes RequireUser and calls a policy.

    line 30
  6. Distinctive:

    No global rule disables; every exception has a decision entry.

    line 46

“Common” is measured: kept by at least 6 in 10 of the 61 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/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.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

  • 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:: and routes.rs agree. docs/routes.md is current (cargo run -- routes).
  • Every mutating handler that needs auth takes RequireUser and 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. 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)

  • The app's archetypes (§2) are identified, and each one's required suites exist.
  • tests/app/security_test.rs has the access matrix over ROUTES, and every ROUTES entry declares its access level.
  • Apps with accounts: 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).
  • Public API: contract snapshots exist and none changed without a decision entry.
  • No 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)

  • 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.example and 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.