Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/sandeepmvl/rails-skillsnpx agentmods add skills/sandeepmvl/rails-skills/24-react-with-railsWrote 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.
[](https://agentmods.dev/skills/sandeepmvl/rails-skills/24-react-with-rails)<a href="https://agentmods.dev/skills/sandeepmvl/rails-skills/24-react-with-rails"><img src="https://agentmods.dev/badge/skills/sandeepmvl/rails-skills/24-react-with-rails/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.
<a href="https://agentmods.dev/skills/sandeepmvl/rails-skills/24-react-with-rails"><img src="https://agentmods.dev/badge/skills/sandeepmvl/rails-skills/24-react-with-rails.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00114 | $0.01711 |
| Opus 5 | $0.00057 | $0.00856 |
| Sonnet 5 | $0.00023 | $0.00342 |
| Haiku 4.5 | $0.00011 | $0.00171 |
Grade A, and why
react-with-rails 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 11d 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 — 211 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React with Rails
Two viable paths: Inertia.js (Rails controllers render React components, no separate API) or classical API + SPA (Rails-API serves JSON; React lives in its own repo or its own folder). Pick wrong and you pay for years.
The opinion
Inertia.js for most React + Rails apps. Classical API + SPA only when you have an explicit reason (multi-platform clients, separate deployment cadence, separate teams). Use
jsbundling-railswith esbuild orvite_rails. Don't add React to a Hotwire app unless you have a concrete need React solves and Turbo doesn't.
Counter-position: React + GraphQL + Apollo + bespoke routing is mature and has its place. For most Rails + React teams in 2026, Inertia is the right default.
Decision matrix
| Need | Use |
|---|---|
| One web client, server-rendered routing, want React's component model | Inertia.js |
| Native mobile client + web SPA + third-party API consumers | Classical API + separate React SPA |
| Heavy real-time + multi-user state | React + dedicated state layer (Liveblocks, Yjs); Rails as API |
| Sprinkles of interactivity on a Rails monolith | Don't. Use Hotwire. |
Core patterns
Pattern 1: Inertia.js (recommended default)
# Gemfile
gem "inertia_rails"
# config/initializers/inertia_rails.rb (optional)
InertiaRails.configure do |config|
config.version = ViteRuby.digest # auto-bust cache on JS bundle change
end
# Controller
class PostsController < ApplicationController
def index
posts = Post.includes(:author).order(created_at: :desc).limit(20)
render inertia: "Posts/Index", props: {
posts: posts.as_json(only: %i[id title status], include: { author: { only: %i[id name] } })
}
end
def show
post = Post.find(params[:id])
render inertia: "Posts/Show", props: { post: post.as_json }
end
end
// app/frontend/Pages/Posts/Index.jsx
import { Link } from "@inertiajs/react"
export default function Index({ posts }) {
return (
<div>
{posts.map(post => (
<Link key={post.id} href={`/posts/${post.id}`}>{post.title}</Link>
))}
</div>
)
}
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 11d ago First seen · 211 lines · 114 tokens per session scan A f27e350f7b5f
react-with-rails is a skill published in the GitHub repository sandeepmvl/rails-skills (21 stars, last pushed 3mo ago), licensed MIT. It adds 114 tokens to every session and 1,711 once invoked, about $0.0006 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 skills, from other repositories
copilotkit-upgrade
Use when migrating a CopilotKit v1 application to v2 -- updating package imports, replacing deprecated hooks and components, switching from GraphQL runtime to AG-UI protocol runtime, and resolving breaking API changes.
nextjs-app-router
Full end-to-end tRPC setup for Next.js App Router. Covers route handler with fetchRequestHandler (GET + POST exports), TRPCProvider with QueryClientProvider, createTRPCOptionsProxy for RSC prefetching, HydrateClient/HydrationBoundary for hydration, useSuspenseQuery for Suspense, and server-side callers.
nextjs-pages-router
Set up tRPC in Next.js Pages Router with createNextApiHandler, createTRPCNext, withTRPC HOC, SSR via ssr option and ssrPrepass, SSG via createServerSideHelpers with getStaticProps, and server-side helpers for getServerSideProps prefetching.
with-tanstack-query
Compose Angular Query with signal-owned Table filtering, sorting, and pagination state using reactive query options, manual row-model boundaries, direct query data, server counts, and valid injection context.
langbot-dev
Develop, build, and debug the LangBot core backend and web frontend. Use when working inside the LangBot repository — backend (Python/Quart, src/langbot/pkg), the Vite/React web UI, HTTP API controllers/services, Alembic migrations, or the MCP server. Covers the dev environment (uv, pnpm), repo layout, the API auth…
trigger-realtime-and-frontend
Trigger.dev client/frontend surface: subscribe to runs in realtime (runs.subscribeToRun and the @trigger.dev/react-hooks hook useRealtimeRun), consume metadata and AI/text streams in React (useRealtimeStream), trigger tasks from the browser (useTaskTrigger, useRealtimeTaskTrigger), and mint scoped frontend credentials…