Curated library of 39 AI agent skills for Ruby on Rails development. Organized by category: planning, testing, code-quality, ddd, engines, infrastructure, api, patterns, context, orchestration, and workflows. Includes 5 callable workflow skills (rails-tdd-loop, rails-review-flow, rails-setup-flow, rails-quality-flow, rails-engines-flow) for complete development cycles. Covers code review, architecture, security, testing (RSpec), engines, service objects, DDD patterns, and TDD automation.
95
98%
Does it follow best practices?
Impact
95%
1.20xAverage score across 35 eval scenarios
Passed
No known issues
Rails Agent Skills turns AI coding assistants into reliable Rails engineers — not just autocomplete tools.
It is a curated library of production-grade agent skills that encode conventions, workflows, and strict quality gates (TDD-first), so assistants generate code that actually holds up in real projects.
Most AI-generated code fails in real Rails apps because it lacks:
This library fixes that by giving agents explicit skills and workflows — from PRD → tasks → implementation → review — with tests acting as a hard gate before any code is written.
The goal is simple: make AI outputs predictable, testable, and production-ready.
rails-agent-skills (docs/implementation-guide.md)[rails-skills-orchestrator](skills/orchestration/rails-skills-orchestrator/) (session hook loads orchestrator)| Goal | Skill |
|---|---|
| Implement feature with TDD | skills/workflows/rails-tdd-loop |
| Review PR | skills/workflows/rails-review-flow |
| Plan new feature | skills/planning/create-prd → skills/planning/generate-tasks |
| Not sure where to start | skills/orchestration/rails-skills-orchestrator |
This skill library is built on core principles that shape how every skill operates. For detailed guidance on skill design, read the official Skill Design Principles.
The core principle of this project. Tests are not a phase that happens "after" development — they are a hard gate that must be passed before any implementation code can be written.
PRD → Tasks → [GATE] → Implementation → YARD → Docs → Code review → PR
│
├── 1. Test EXISTS (written and saved)
├── 2. Test has been RUN
└── 3. Test FAILS for the correct reason
(feature missing, not a typo)
Only after all 3 conditions are met
can implementation code be written.
After tests pass: document public Ruby API (YARD), update README/diagrams/
related docs, then self-review (rails-code-review) before opening the PR.
Task lists from generate-tasks include these steps explicitly.This applies to every skill that produces code: service objects, background jobs, API integrations, engine components, refactoring, and bug fixes. Every implementation skill in this library includes a HARD-GATE: Tests Gate Implementation section enforcing this discipline.
Why this matters:
Generated output: All generated artifacts (documentation, YARD comments, Postman collections, examples) must be in English unless the user explicitly requests another language. This is reflected in the skill template and in yard-documentation and api-rest-collection.
Skills are designed to be used in sequence, not in isolation. Each skill's Integration table points to the next skill in the chain. The primary daily workflow is:
skills/testing/rails-tdd-slices → skills/testing/rspec-best-practices (write failing test)
↓
[CHECKPOINT: Test Design Review — confirm boundary, behavior, edge cases]
↓
[CHECKPOINT: Implementation Proposal — confirm approach before coding]
↓
Implement (minimal code to pass test) → Refactor
↓
[GATE: Linters + Full Test Suite]
↓
skills/patterns/yard-documentation → Update docs
↓
skills/code-quality/rails-code-review (self-review) → skills/code-quality/rails-review-response (on feedback)
↓
PRSee docs/workflows/ for the full TDD Feature Loop and all workflow diagrams by lifecycle stage.
Note: ticket-planning is an optional step. The assistant should not push for ticket generation unless the user asks explicitly (e.g. "turn this into tickets") or the context clearly indicates work should be mapped to a board/sprint.
This library intentionally reuses proven patterns from broader agent-skill libraries, but translates them into a Rails-first workflow instead of copying generic frontend-oriented skills one-to-one.
| Reused pattern | Rails-first destination in this repo |
|---|---|
| PRD interview + scope control | create-prd |
| Planning from requirements | generate-tasks |
| TDD loop and smallest safe slice | rspec-best-practices + rails-tdd-slices |
| Bug investigation to reproducible test | rails-bug-triage |
| Domain language and context design | ddd-ubiquitous-language + ddd-boundaries-review + ddd-rails-modeling |
| Skill authoring conventions | docs/skill-template.md |
The rule of thumb is: reuse patterns, not names. If a broader skill maps cleanly to Rails/RSpec/YARD workflows, absorb the pattern into the existing chain. Create a new skill only when there is a real Rails-specific workflow gap.
For a practical guide on how to talk to the AI and effectively invoke these workflows, please see our Workflows Index.
Here is the recommended, step-by-step workflow for building a new feature from scratch using this skill library. This ensures every feature is well-planned, test-driven, and meets production-quality standards.
Goal: Build a new feature, e.g., "Feature A"
Step 1: Planning & Task Breakdown
Step 2: Start the TDD Cycle
Step 3: Implementation
Step 4: Verification
Step 5: Documentation & Self-Review
Step 6: Responding to Peer Review
For more detailed diagrams of these flows, see the Workflows Index.
The recommended way to use this library is via the included Ruby MCP server. It exposes every skill, doc, and workflow as a named MCP resource — allowing agents to load only what they need, reducing token usage while improving accuracy and relevance.
tools/call use_skill { "skill_name": "rails-graphql-best-practices" }
→ returns full SKILL.md instructionsResources exposed:
| Prefix | Source |
|---|---|
skill/<name> | SKILL.md + support files for every skill |
doc/<name> | All files under docs/ |
workflow/<name> | All workflow definitions |
Adding a new skill directory automatically makes it available — no server changes needed.
See mcp_server/README.md for setup instructions (Windsurf, Cursor, Claude Code, RubyMine, Docker).
Requires GitHub CLI v2.90.0+.
# Install all skills interactively
gh skill install igmarin/rails-agent-skills
# Install a specific skill for the current project
gh skill install igmarin/rails-agent-skills rails-code-review --scope project
# Install a specific skill globally (available everywhere)
gh skill install igmarin/rails-agent-skills rails-code-review --scope user
# Install pinned to a release tag
gh skill install igmarin/rails-agent-skills rails-code-review --pin v3.1.3 --scope user
# Search this repository's skills
gh skill search rails --owner igmarinThe default scope is project; use --scope user for a global install in your home directory. Skills are installed to the correct directory for your selected agent host automatically. To target a specific agent:
gh skill install igmarin/rails-agent-skills rails-tdd-slices --agent claude-code --scope user
gh skill install igmarin/rails-agent-skills rails-tdd-slices --agent cursor --scope user
gh skill install igmarin/rails-agent-skills rails-tdd-slices --agent codex --scope user
gh skill install igmarin/rails-agent-skills rails-tdd-slices --agent gemini-cli --scope user
gh skill install igmarin/rails-agent-skills rails-tdd-slices --agent windsurf --scope userUpdate installed skills:
# Check for updates without changing files
gh skill update --dry-run
# Update all unpinned skills without prompting
gh skill update --all
# Re-download all skills, overwriting local edits
gh skill update --force --all
# Unpin pinned skills and update them to the latest release
gh skill update --unpinSupply chain note: Every release is tied to a git tag. Pinning to a tag or commit SHA (
--pin) gives you reproducible, tamper-evident installs. Provenance metadata is written directly into each installedSKILL.mdfrontmatter so it travels with the skill.
To integrate these skills with your preferred AI development environment (Gemini CLI, Cursor, Windsurf, Claude Code, Codex, or RubyMine), refer to the Implementation Guide.
The guide covers both the MCP server (recommended — on-demand, saves tokens) and symlink approaches for each platform.
| Skill | Description |
|---|---|
| create-prd | Generate Product Requirements Documents from feature descriptions |
| generate-tasks | Break down PRDs into step-by-step implementation task lists |
| ticket-planning | Draft or create tickets from plans; sprint placement and classification |
| Skill | Description |
|---|---|
| rails-code-review | Review Rails code following The Rails Way conventions — giving a review |
| rails-review-response | Respond to review feedback — evaluate, push back, implement safely, trigger re-review |
| rails-architecture-review | Review application structure, boundaries, and responsibilities |
| rails-security-review | Audit for auth, XSS, CSRF, SQLi, and other vulnerabilities |
| rails-migration-safety | Plan production-safe database migrations |
| rails-stack-conventions | Apply Rails + PostgreSQL + Hotwire + Tailwind conventions |
| rails-code-conventions | Daily coding checklist: DRY/YAGNI/PORO/CoC/KISS; linter as style SoT; structured logging; per-path rules |
| rails-background-jobs | Design idempotent background jobs with Active Job / Solid Queue |
| rails-graphql-best-practices | GraphQL schema design, N+1 prevention, authorization, error handling, and testing with graphql-ruby |
| rails-authorization-policies | Pundit/CanCanCan, roles, permissions, policy objects |
| rails-performance-optimization | N+1 prevention, profiling, caching, query optimization |
| rails-api-versioning | REST API versioning strategies and deprecation policies |
| rails-database-seeding | Fixtures vs Seeds for dev/test data management |
| rails-frontend-hotwire | Turbo/Stimulus integration patterns |
| api-rest-collection | Generate or update Postman Collection (JSON v2.1) for REST endpoints; use Insomnia for GraphQL |
| Skill | Description |
|---|---|
| ddd-ubiquitous-language | Build a shared domain glossary, resolve synonyms, and clarify business terminology |
| ddd-boundaries-review | Review bounded contexts, ownership, and language leakage in Rails codebases |
| ddd-rails-modeling | Map DDD concepts to Rails models, services, value objects, and boundaries without over-engineering |
| Skill | Description |
|---|---|
| ruby-service-objects | Build service objects with .call, standardized responses, transactions |
| ruby-api-client-integration | Integrate external APIs with the layered Auth/Client/Fetcher/Builder pattern |
| strategy-factory-null-calculator | Implement variant-based calculators with Strategy + Factory + Null Object |
| yard-documentation | Write YARD docs for Ruby classes and public methods (all output in English) |
| Skill | Description |
|---|---|
| rails-context-engineering | Load schema, routes, nearest patterns before any code/spec/PRD — surface ambiguity explicitly |
| rails-project-onboarding | Complete dev environment setup (Docker, env vars, database) |
| Skill | Description |
|---|---|
| rspec-best-practices | Write maintainable, deterministic RSpec tests with TDD discipline |
| rails-tdd-slices | Pick the best first failing spec for a Rails change before implementation |
| rails-bug-triage | Turn a Rails bug report into a reproducible failing spec and fix plan |
| rspec-service-testing | Test service objects with instance_double, hash factories, shared_examples |
| Skill | Description |
|---|---|
| rails-engine-author | Design and scaffold Rails engines with proper namespace isolation |
| rails-engine-testing | Set up dummy apps and engine-specific specs |
| rails-engine-reviewer | Review engine architecture, coupling, and maintainability |
| rails-engine-release | Prepare versioned releases with changelogs and upgrade notes |
| rails-engine-docs | Write comprehensive engine documentation |
| rails-engine-installers | Create idempotent install generators |
| rails-engine-extraction | Extract host app code into engines incrementally |
| rails-engine-compatibility | Maintain cross-version compatibility |
| Skill | Description |
|---|---|
| refactor-safely | Restructure code with characterization tests and safe extraction |
| Skill | Description |
|---|---|
| rails-skills-orchestrator | Discover and invoke the right skill for the current Rails task |
| docs/skill-template.md | Authoring template and checklist for expanding the library |
graph TB
subgraph Discovery [🔍 00: Discovery]
direction TB
A[rails-context-engineering] --> B{New project?}
B -- Yes --> C[rails-project-onboarding]
B -- No --> D[Start]
C --> D
end
subgraph Planning [📝 10: Planning]
direction TB
D --> E[create-prd]
E --> F{PRD approved?}
F -- No --> E
F -- Yes --> G[generate-tasks]
G --> H{Need DDD?}
H -- Yes --> I[ddd-ubiquitous-language]
I --> J[ddd-boundaries-review]
J --> K[ddd-rails-modeling]
K --> G
end
subgraph Development [💻 30: Development]
direction TB
H -- No --> L[rails-tdd-slices]
G --> L
L --> M[rspec-best-practices]
M --> N{Test OK?}
N -- No --> M
N -- Yes --> O{Proposal OK?}
O -- No --> O
O -- Yes --> P[Implement]
P --> Q{Passes?}
Q -- No --> P
Q -- Yes --> R{More?}
R -- Yes --> M
R -- No --> S[Linters + Suite]
end
subgraph Quality [✅ 40-50: Quality & Review]
direction TB
S --> T[yard-documentation]
T --> U[rails-code-review]
U --> V{Findings?}
V -- Critical --> W[rails-review-response]
W --> X[Fix]
X --> U
V -- None/Minor --> Y((Merge))
end
subgraph Engines [🔧 60: Engines]
direction TB
Z[rails-engine-author] --> AA{Tests pass?}
AA -- No --> AB[Fix]
AB --> Z
AA -- Yes --> AC[rails-engine-release]
AC --> AD((Release))
end
%% Cross-connections
U --> V1[rails-security-review]
U --> V2[rails-architecture-review]
V2 --> V3[refactor-safely]
V3 --> V4[ruby-service-objects]
BT[rails-bug-triage] --> LEach skill is a SKILL.md file in its own directory. For detailed conventions and structure, refer to the Skill Design Principles.
Tests are a gate between planning and implementation. See docs/workflows/ for full diagrams.
| Workflow | Skill Chain |
|---|---|
| TDD Feature Loop (primary daily workflow) | rails-context-engineering → rails-tdd-slices → [Test Feedback checkpoint] → [Implementation Proposal checkpoint] → implement → [Linters + Suite gate] → yard-documentation → rails-code-review → rails-review-response (on feedback) → PR |
| New feature | rails-context-engineering → create-prd → generate-tasks → (optional ticket-planning) → TDD Feature Loop |
| DDD-first feature | rails-context-engineering → create-prd → ddd-ubiquitous-language → ddd-boundaries-review → ddd-rails-modeling → generate-tasks → TDD Feature Loop |
| Bug fix | rails-bug-triage → rails-tdd-slices → [write reproduction spec, verify failure] → fix → verify passes → rails-code-review |
| Code review + response | rails-code-review → rails-review-response (on feedback) → re-review if Critical items addressed |
| Security audit | rails-security-review → rails-code-review (verify fixes) → PR |
| Performance optimization | rails-code-conventions (ActiveRecord rules) → [regression spec] → optimize → rails-code-review |
| Migration | rails-migration-safety → [test up + down] → implement → rails-code-review |
| GraphQL feature | ddd-ubiquitous-language → rails-graphql-best-practices → TDD Feature Loop → rails-security-review |
| New engine | rails-engine-author → [write specs, verify failure] → implement → rails-engine-docs |
| Refactoring | refactor-safely → [characterization tests] → refactor → verify tests pass |
| New service | rails-tdd-slices → [write .call spec, verify failure] → ruby-service-objects → verify passes |
| API integration | rails-tdd-slices → [write layer specs, verify failure] → ruby-api-client-integration → verify passes |
For guidance on skill authoring, refer to the Skill Design Principles and the Skill Template.
Huge thanks to Mumo Carlos (@mumoc). His mentorship has shaped my growth as a developer and influenced many of the habits and practices reflected in this library — not only the ticket-planning workflow he shared, but the broader discipline around quality, clarity, and thoughtful use of tools. This repo and the learning behind it would not be what they are without him.