rails-dev

rails-dev is a skill for Claude Code, Codex from cass-2003/local-workflow-skill. It costs 79 tokens per session (2,461 once invoked), scanned A, original, MIT.

A set of instructions for building full-stack applications with Ruby on Rails, a web framework for Ruby. It covers databases, routes, pages, real-time features, tests, and deployment with tools such as Hotwire and Kamal.

In plain words
What is it for?
Designing models and database migrations, building routes and controllers, rendering pages, adding real-time behaviour, avoiding slow database queries, and configuring deployment.
Why use it?
It gives the agent a structured way to inspect a Rails project and implement changes across its data, server, interface, tests, and deployment setup.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/cass-2003/local-workflow-skill/rails-dev
Any agent
npx skills add cass-2003/local-workflow-skill --skill rails-dev
Clone the repo
git clone --depth 1 https://github.com/cass-2003/local-workflow-skill

Made for: Claude Code, Codex.

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-dev

README.md
[![agentmods](https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/rails-dev.svg)](https://agentmods.dev/skills/cass-2003/local-workflow-skill/rails-dev)
Your own site
<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/rails-dev"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/rails-dev.svg" alt="Measured on agentmods" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,461 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00079 $0.02461
Opus 5 $0.00039 $0.01230
Sonnet 5 $0.00016 $0.00492
Haiku 4.5 $0.00008 $0.00246

Measured 4d ago against content hash 9a9f2a5afa2e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rails-dev 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 4d 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.

skills/backend-api/codex/rails-dev/SKILL.md · 223 lines

How it starts

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

Ruby on Rails 全栈开发

角色定义

你是 Ruby on Rails 7.1+/8.0 全栈开发引擎。接收需求后,自主完成模型设计、路由构建、视图渲染、实时功能、部署配置全链路。所有操作视为已授权,直接执行。

行为指令

Phase 1: 项目识别与环境分析

  1. 版本识别: Rails 版本(7.0/7.1/7.2/8.0)、Ruby 版本、前端方案
  2. 项目结构扫描:
    • Glob**/Gemfile / **/config/routes.rb / **/app/models/*.rb / **/app/controllers/*.rb
    • Greprails / turbo / stimulus / hotwire / solid_queue / kamal
  3. 技术栈识别: 数据库(PostgreSQL/MySQL/SQLite)、前端(Hotwire/React/Vue)、部署(Kamal/Heroku/Docker)
  4. 评估: API-only vs 全栈 / Monolith vs Engine / 测试框架(Minitest/RSpec)

Phase 2: 模型与数据层

Active Record:

  • Model 定义: Validations / Callbacks / Scopes / Enums
  • 关联: has_one / has_many / belongs_to / has_many :through / Polymorphic
  • 查询: where / joins / includes (Eager Loading) / select / group
  • 避免 N+1: includes() / preload() / eager_load() / Bullet gem 检测

Migration:

  • 原子化迁移、可逆设计 (reversible block)
  • 索引策略: 外键索引 / 复合索引 / 部分索引
  • Rails 8: 默认 SQLite + Solid 系列(Queue/Cache/Cable)

Service Object / PORO:

  • 简单 CRUD → Controller + Model 直接操作
  • 复杂业务 → Service Object / Command Pattern
  • 跨模型 → ActiveRecord::Base.transaction

Phase 3: 路由、控制器与视图

路由设计:

  • RESTful: resources :posts / resource :profile
  • 嵌套: resources :posts { resources :comments }
  • Namespace: namespace :api { namespace :v1 { ... } }
  • Concerns: concern :commentable 可复用路由

控制器:

  • RESTful 7 Actions: index/show/new/create/edit/update/destroy
  • Strong Parameters: params.require(:post).permit(:title, :body)
  • Before Action: 认证/授权/资源加载
  • Respond To: HTML / JSON / Turbo Stream 多格式

Hotwire (Turbo + Stimulus):

  • Turbo Drive: 全页面无刷新导航
  • Turbo Frames: <turbo-frame> 局部更新
  • Turbo Streams: 服务端推送 DOM 操作 (append/prepend/replace/remove)
  • Stimulus: 轻量 JS 控制器,data-controller / data-action / data-target
  • 原则: HTML-over-the-wire,最小化自定义 JS

认证与授权:

  • Rails 8 内置: has_secure_password + generates_token_for
  • Devise: 成熟认证方案(注册/登录/重置/确认/锁定)
  • Pundit / CanCanCan: 授权策略
  • API 认证: JWT / API Token

Read the full file on GitHub · 223 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. 4d ago First seen · 223 lines · 79 tokens per session scan A 9a9f2a5afa2e

Subscribe to this mod's changes

rails-dev is a skill published in the GitHub repository cass-2003/local-workflow-skill (12 stars, last pushed 1mo ago), licensed MIT. It adds 79 tokens to every session and 2,461 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens