Rails With AI — Security skill for Claude Code
A comprehensive CLAUDE.md template for Rails 8+ projects.
How to install Rails With AI
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open maxart/Rails-with-AI and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Rails With AI does
A comprehensive CLAUDE.md template for Rails 8+ projects. Drop it in and Claude Code automatically follows production-grade conventions for Ruby style, ActiveRecord, Hotwire, security, testing, and more — with token-efficient output rules built in.
Alternatives in Security
- Defense In Depth — Implement multi-layered testing and security best practices 98.1k ★
- Anthropic Cybersecurity Skills — 734+ structured cybersecurity skills for AI agents · MITRE ATT&CK mapped · agentskills.io open standard · Work 3.8k ★
- Trail Of Bits Claude-code-config — Opinionated production defaults from a top security firm: sandboxing, permissions, hooks, skills, MCP server c 1.6k ★
README
Rails-with-AI
A `CLAUDE.md` template that teaches [Claude Code](https://docs.anthropic.com/en/docs/claude-code) modern Rails 8+ best practices. Drop it into any Rails project and Claude will follow production-grade conventions for Ruby style, ActiveRecord, Hotwire, security, testing, and more — automatically, on every interaction.
Why
Claude Code reads `CLAUDE.md` from your working directory and applies its rules to every conversation (including sub-agents). Without guardrails, AI-generated Rails code can drift: symbol-form callbacks, `after_create` for jobs instead of `after_create_commit`, fat controllers with business logic, Devise in new projects, unscoped queries that leak data, and more. This template codifies the conventions experienced Rails teams (and DHH) enforce in code review, so Claude follows them from the first line.
Two Versions
Pick the one that fits your project.
| File | Size | Contains | Best for |
|---|---|---|---|
| `CLAUDE.md.FULL` | 40,146 chars | All rules plus BAD/GOOD code examples | Projects where you want Claude to pattern-match from examples, or onboarding human devs alongside Claude |
| `CLAUDE.md.SHORT` | 28,917 chars | All rules, no code examples | Context-sensitive projects, large monorepos, or when you already trust Claude to apply Rails idioms correctly |
Both files cover the **same rules** — the only difference is whether each rule is illustrated with a BAD/GOOD code block. Rules that lived inside code-only examples in the FULL version were folded into prose in SHORT, so no guidance is lost.
What's inside (click to expand)| Area | Key rules |
|---|---|
| Output & Efficiency | Token-efficient responses (adapted from claude-token-efficient), no sycophantic fluff, ASCII-safe output |
| Ruby Style & Code Quality | Expanded conditionals over guard clauses (DHH), m |
Related Skills
React With AI
A comprehensive CLAUDE.md template for modern React projects. Drop it in and Claude Code automatically follows
Cve MCP Server
Production-grade MCP server giving Claude 27 security intelligence tools across 21 APIs — CVE lookup, EPSS sco
Sovereign Skills
20 production-grade skills for AI coding agents — setup, scope, discipline, code review, security, session man
Keel
Open-source AI product builder: take one idea to a shipped, production-grade product. An AI founding team (bus
Reactnative Expo AI Agent System Workflow
AI-powered development toolkit with 7 production agents for React Native/Expo mobile apps. Automates accessibi
UI Synth
Master orchestration command that synthesizes ALL LibreUIUX plugins - archetypal-alchemy, design-mastery, acce
Related Agents
Lint Agent
Automatically corrects Ruby and Rails code style using RuboCop, ERB lint, and formatting tools. Use proactivel
Rails Code Reviewer
Use this agent for expert Ruby on Rails code review, focusing on Rails conventions, POODR principles, and idio
Fullstack Code Reviewer
Use this agent when you need expert code review for Ruby on Rails or Next.js applications, focusing on best pr