Rails With AI
Description
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.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
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
Defense in Depth
Implement multi-layered testing and security best practices.
Security SecLists Official Repository
[OWASP Testing Guide](https://owasp.org/www-project-web-security-testing-guide/)
Security Threat Hunting with Sigma Rules
Use Sigma detection rules to hunt for threats and analyze security events
Security Maintenance Walkthrough - 2026-03-29
- Re-triaged the full 2026-03-15 security finding set against current `main` and wrote a fresh current-head re
Security Google Workspace Model Armor
Filter user-generated content for safety
Security Google Workspace Alert Center
Manage security alerts
Security Related Agents
Token Auditor
Scans ui/src/ for hardcoded visual values, duplicate components, and shadcn replacement candidates; produces d
Gitnexus Security Boundary Reviewer
GitNexus security and trust-boundary reviewer. Use for auth, permissions, secrets, injection, unsafe parsing,
Accessibility Audit
| You are an accessibility expert specializing in WCAG compliance, inclusive design, and assistive tec... | -