rails-starter: Instructions file for Claude Code

CLAUDE.md

rails-starter CLAUDE.md is an instructions file for Claude Code from thecodingend/rails-starter. It costs 1,060 tokens per session, scanned A, a copy of rails-starter AGENTS.md, MIT.

A project-specific instruction guide for a Rails application that uses Inertia to connect a Ruby on Rails backend with a React frontend. It sets expectations for data handling, forms, testing, architecture, and coding style.

In plain words
What is it for?
Use it when adding or reviewing features in this Rails app, especially routes, server data, React screens, forms, and Minitest tests.
Why use it?
It gives coding agents the project’s conventions before they make changes, reducing guesses and avoiding patterns the project does not use.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is thecodingend/rails-starter's own configuration. It tells Claude Code how to work on rails-starter itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything rails-starter configures →

Reuse

Borrowing it

Nothing to install: this file belongs to thecodingend/rails-starter. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/thecodingend/rails-starter/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/thecodingend/rails-starter

Made for: Claude Code.

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 rails-starter CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/thecodingend/rails-starter/claude-md/github.svg)](https://agentmods.dev/instructions/thecodingend/rails-starter/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/thecodingend/rails-starter/claude-md"><img src="https://agentmods.dev/badge/instructions/thecodingend/rails-starter/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rails-starter CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/thecodingend/rails-starter/claude-md"><img src="https://agentmods.dev/badge/instructions/thecodingend/rails-starter/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,060 This file is loaded in full into every session.
When invoked 1,060 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.1 $0.01060 $0.01060
Opus 5.5 $0.00424 $0.00424
Sonnet 5.5 $0.00212 $0.00212
Haiku 4.5 $0.00106 $0.00106

Measured 2mo ago against content hash c47c990115bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rails-starter 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 2mo 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.

Origin

This is a copy

100% identical to rails-starter AGENTS.md — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

CLAUDE.md · 81 lines

How it starts

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

App Context

[Insert high level description of the app]

Inertia Rails Stack

  • Frontend: React with @inertiajs/react 3.0.3
  • Serialization: Use explicit props via render inertia: { key: value }. as_json is optional and mainly useful when shaping or restricting complex Rails objects.
  • UI: shadcn/ui adapted for Inertia. NEVER react-hook-form, zod, FormField, FormItem, or FormMessage — use Inertia <Form> with plain shadcn inputs.
  • Testing: Minitest. Load references/minitest.md from inertia-rails-testing for assertions.
  • Architecture: Server owns routing, data, and auth. React renders only. See inertia-rails-architecture for the decision matrix.

Coding Style

  • Prefer DHH-level review standards: simple code, clear intent, minimal indirection, and abstractions that earn their keep.
  • Write idiomatic Ruby and favor Rails conventions over custom patterns.
  • Prefer simple inlined solutions, especially when there are only a few cases. Helpers, service objects, presenters, decorators, concerns, form objects, and other abstractions are rarely necessary.
  • Accept duplication when it keeps the code obvious. Do not extract for neatness alone.
  • Use clear, conventional naming. Favor full words, positive names, standard Rails terms, and code that is immediately understandable.
  • Comments should be rare. Add them only when intent is non-obvious, branching is dense, or a long method needs orientation.

Review Handoff

  • When changing multiple files, always include a short recommended review order in the final response so the diffs can be read in a sensible sequence.
  • Prefer ordering files by how information or behavior flows through the feature, usually persistence or model changes first, then request or controller code, then pages or components, then tests.
  • If there is no strong flow, fall back to the file order that makes the change easiest to understand from top to bottom.

Rails Preferences

  • Keep controllers thin, but allow controller-level code for request flow and controller-specific concerns. Do not push code out of controllers unless it materially improves clarity.
  • For migrations and anything else Rails can generate, start with rails generate instead of creating files by hand. Generate first, then edit the generated files if the default output needs adjustment.
  • Keep business logic in models by default. Fat models are acceptable.
  • Prefer inline Active Record queries written idiomatically in Ruby. Extract scopes or query objects only when there is real reuse or a clear readability win.
  • Compute summaries, sort keys, and other derived data at write time when that keeps reads simple, pageable, and cacheable.
  • Prefer database constraints over Active Record validations unless the user needs a validation error to see.
  • Use callbacks freely when they fit the model lifecycle naturally.
  • Helpers are near-banned. Only introduce a helper when formatting or view logic is genuinely reused and improves clarity, and pass dependencies explicitly instead of reaching for ivars.
  • Avoid defensive coding for known data shapes. If the app knows it has a string, use string methods directly instead of adding type guards.
  • Prefer failing loudly over adding protection against programmer errors or impossible states.
  • Avoid exception-heavy control flow. Do not add begin/rescue or similar handling unless the failure is expected and user-facing.
  • Be explicit over clever. Prefer plain conditionals or named methods over metaprogramming when there are only a few variations.
  • Use SQL only when Active Record is clearly not sufficient.

Read the full file on GitHub · 81 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. 2mo ago First seen · 81 lines · 1,060 tokens per session scan A c47c990115bb

Subscribe to this mod's changes

rails-starter CLAUDE.md is an instructions file published in the GitHub repository thecodingend/rails-starter (5 stars, last pushed 2mo ago), licensed MIT. It adds 1,060 tokens to every session, about $0.0042 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to rails-starter AGENTS.md, differing in 0 lines, and is treated as a copy.

Related

rails-starter CLAUDE.md compared with instructions from other repositories

rails-starter CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rails-starter CLAUDE.mdthecodingend/rails-starterInstructions file52mo agoMITA1,060Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode