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.
npx agentmods add instructions/rootstrap/rails_api_base/claude-mdgit clone --depth 1 https://github.com/rootstrap/rails_api_baseWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.02081 | $0.02081 |
| Opus 5 | $0.01040 | $0.01040 |
| Sonnet 5 | $0.00416 | $0.00416 |
| Haiku 4.5 | $0.00208 | $0.00208 |
Grade A, and why
rails_api_base CLAUDE.md 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.
How it starts
The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What this repo is
Rootstrap's Rails API template — a Rails 8.1 / Ruby 4.0 boilerplate for JSON APIs. It is meant to be cloned and renamed via bin/bootstrap.sh --name=<project>, which seds rails_api_base to your project name across the codebase. The template ships with two parallel surfaces:
- A JSON API under
/api/v1/*(devise_token_auth, Pundit, Jbuilder, OpenAPI docs). - An admin web surface built on ActiveAdmin at
/admin/*, with sub-mounts for Flipper (/admin/feature-flags) and GoodJob (/admin/background-jobs).
Common commands
The bin/* wrappers transparently dispatch to Docker (docker compose) when DOCKER_ENABLED=true in .env, otherwise run locally. Use them rather than calling bundle/rails/rspec directly so the same invocation works in both modes.
bin/dev— start Rails + JS/CSS bundling watchers (foreman /Procfile.dev). Defaults to port 3000.bin/rspec [path]— run specs.bin/rspec .runs everything.bin/rspec spec/path/to_spec.rb:42runs a single example. Pass-rm/--remove-containersto tear down docker test services after the run.bin/rails …— any Rails command (bin/rails console,bin/rails db:migrate, …).bin/bundle …— bundler commands.bin/web <cmd>— arbitrary shell command inside the app container/environment.bundle exec rails code:analysis— runs the full lint suite: Brakeman, RuboCop, Reek, rails_best_practices, i18n-tasks (seelib/tasks/code_analysis.rake). Use this before opening a PR.bundle exec annotaterb models— refresh schema annotations on models (config in.annotaterb.yml).yarn build:js --watch/yarn build:css --watch— JS/CSS bundling for ActiveAdmin assets (already wired intobin/dev).
Testing notes
- Specs require a running Postgres (see
docker-compose.yml/docker-compose.test.yml)..env.testprovides test DB config. bin/rspecheaded by default; setHEADLESS=truefor headless feature specs.spec/rails_helper.rbwires several behaviors that affect how to write specs:- Prosopite scans every example for N+1 queries — fix the query, don't silence it.
- rspec-retry retries failed examples (2x in CI via
ENV['CI'], 1x locally). Don't paper over flakes by adding retries. - SimpleCov is started before Rails loads; coverage lands in
coverage/. - Flipper resets to a memory adapter before each test, so feature-flag state is per-example. Enable in a
beforeblock. - Files under
spec/forms/are auto-taggedtype: :formand get Shoulda matchers. - Files under
spec/requests/api/are picked up byrspec-openapifor API doc generation; other request specs are taggedopenapi: false.
- OpenAPI doc generation is triggered by
OPENAPI=1(CI only onmain/ changes tospec/requests/api/**). Docs are served at/api-docs(basic auth:SWAGGER_USERNAME/SWAGGER_PASSWORD).
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.
- 2d ago First seen · 108 lines · 2,081 tokens per session scan A f62052b3efd0
rails_api_base CLAUDE.md is an instructions file published in the GitHub repository rootstrap/rails_api_base (631 stars, last pushed 4d ago), licensed MIT. It adds 2,081 tokens to every session, about $0.0104 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.
Other instructions, from other repositories
frankfurter AGENTS.md
Instructions for lineofflight/frankfurter, covering frankfurter, before you write code, architecture, project structure and key components.
planner AGENTS.md
Instructions for codebar/planner, covering agents.md, project overview, development workflow, branching strategy and development setup.
go-rest-api-boilerplate copilot-instructions.md
Instructions for vahiiiid/go-rest-api-boilerplate, covering 📋 what is grab?, 🎯 core development principles, 1. environment detection - don't hardcode versions, check go version and check docker version.
proscenium CLAUDE.md
Claude Code instructions for joelmoss/proscenium, covering claude.md, project overview, prerequisites, architecture and key components.
frankfurter CLAUDE.md
Instructions for lineofflight/frankfurter, a project described as: 💱 Currency data API.
go-rest-api-boilerplate AGENTS.md
Instructions for vahiiiid/go-rest-api-boilerplate, covering grab - ai-friendly development guide, 📋 project overview, technology stack, documentation and 🏗️ architecture.