Curated library of AI agent skills for Ruby on Rails development. Covers code review, architecture, security, testing (RSpec), engines, service objects, DDD patterns, and workflow automation.
98
99%
Does it follow best practices?
Impact
98%
1.38xAverage score across 26 eval scenarios
Passed
No known issues
Companion to the README: how to chain skills in typical Rails workflows. For install paths and hooks, see implementation-guide.md. For SKILL.md structure and frontmatter rules, see architecture.md.
The key to using this skill library effectively is to guide the AI by stating your goal and then explicitly referencing the workflow or skill you want it to follow. This tells the AI what to do and how to do it according to the expert rules we've defined.
The most effective way to invoke a workflow is to follow this general formula:
"[Your Goal]" + "following the [Skill Name / Workflow Name] process."
By doing this, you turn a simple request into a robust, professional workflow, ensuring any AI—smart or not—is constrained to follow our best practices.
A Naive Request (What to Avoid):
"Hey, create a migration adding a new column
statusto theorderstable with a default value of'pending'andnull: false."Risk: This could generate a single, dangerous migration that locks your production
orderstable.
An Expert Request (What to Do):
"I need to add a
statuscolumn to theorderstable with a default of'pending'. Please follow therails-migration-safetyskill to do this."Expected Result: The AI should respond by outlining a safe, multi-step migration process (add nullable column, backfill data in a separate task, then add the constraint in a final migration).
This formula works for any task:
For a new feature:
"Let's start building the 'user profile page' following our TDD workflow."
For a bug fix:
"I've got a bug report about avatars. Let's use the
rails-bug-triageskill to create a failing test for it."
For a refactor:
"This controller is getting too big. I want to extract a service object using the
refactor-safelyskill."
You, the human, are the project lead. Your job is to set the direction and point the AI to the right set of internal "company policies" (our skills).
Skills and workflows are not slash commands or buttons — you invoke them through natural conversation. Claude reads CLAUDE.md at the start of each session and knows which skills exist and when to apply them. The key is to describe what you want to do, and Claude will load the right skill.
Be explicit about the task type:
"I want to add a GraphQL mutation for creating orders"
→ Claude loads rails-graphql-best-practices + TDD Feature Loop
"Review this PR diff for me"
→ Claude loads rails-code-review
"I got feedback on my PR, help me respond"
→ Claude loads rails-review-response
"I need to extract this fat controller into a service"
→ Claude loads refactor-safely
"There's a bug where orders are showing the wrong total"
→ Claude loads rails-bug-triageName the workflow directly when you want the full chain:
"Run the TDD Feature Loop for this task"
"Start with rails-tdd-slices, I need to add a new endpoint"
"Follow the Bug Fix workflow for this issue"
"Do a DDD-first design for this feature"Start a planning session:
"Create a PRD for [feature]" → create-prd
"Break this PRD into tasks" → generate-tasks
"Turn these tasks into Jira tickets" → ticket-planningThe TDD Feature Loop has two explicit pause points where Claude will wait for your response before continuing:
Test Feedback Checkpoint — Claude writes and runs the failing test, then stops and asks:
"Here's the failing spec I wrote. Does this test the right behavior? Is the boundary correct? Any edge cases I'm missing?"
You respond with approval or corrections. Only then does Claude propose an implementation.
Implementation Proposal Checkpoint — Before writing any code, Claude stops and says:
"Here's how I'd implement this: [plain language description of classes, methods, structure]. Does this approach make sense?"
You respond with approval or redirections. Only then does Claude write the implementation code.
If you want to skip a checkpoint (e.g. you already know the approach), just say so:
"Skip the proposal, go ahead and implement"
"The test looks fine, proceed with implementation"| Situation | What to say |
|---|---|
| You want a full workflow, not just one step | "Follow the TDD Feature Loop for this" |
| You want to start from planning | "Start with a PRD for this feature" |
| You want only the review, not the full workflow | "Do a code review on this file / PR" |
| You want a security-focused review | "Run a security review on these changes" |
| You received PR feedback and need help | "Help me respond to this review feedback" |
| You want to check GraphQL conventions | "Review this resolver for best practices" |
| Claude is going too fast | "Stop after each checkpoint and wait for my approval" |
| Claude missed a skill | "You should be using rails-tdd-slices here" |
These skills work the same way in Cursor, Codex, and Claude Code — describe the task in natural language and the right skill is loaded from the catalog. The difference is only in how the plugin is installed (see implementation-guide.md).
Tests are a gate between planning and code. Once a PRD and tasks exist, the test for each behavior must be written, run, and validated as failing BEFORE any implementation code is written.
PRD → Tasks → Choose first slice → [GATE: Write test → Run test → Verify it fails]
→ [CHECKPOINT: Test Design Review]
→ [CHECKPOINT: Implementation Proposal]
→ Implementation → Verify passes
→ [GATE: Linters + Full Test Suite]
→ YARD (public API) → Update README / diagrams / domain docs → Self code review → PRThe gate is non-negotiable. Implementation code cannot exist before its test has been:
See rspec-best-practices for the full gate cycle (red → green → refactor).
This is the most-used daily workflow. It covers everything from a task to a merged PR.
flowchart TD
A[Task / behavior to implement] --> B[rails-tdd-slices\nChoose first slice]
B --> C[rspec-best-practices\nWrite failing test]
C --> D{Test Feedback\nCheckpoint}
D -->|Approved| E[Implementation Proposal\nCheckpoint]
D -->|Revise test| C
E -->|Approved| F[Implement minimal code]
E -->|Revise proposal| E
F --> G[Run test — must pass]
G --> H[Refactor — tests stay green]
H --> I{More behaviors?}
I -->|Yes| C
I -->|No| J["GATE: Linters + Full Suite"]
J --> K[yard-documentation]
K --> L[rails-code-review\nSelf-review]
L --> M{Findings?}
M -->|Critical or significant| N[rails-review-response\nAddress feedback]
N --> O[Re-implement]
O --> P[rails-code-review\nRe-review]
P --> M
M -->|None or cosmetic| Q[Open PR]
K2[api-rest-collection\nif endpoints changed] --> QStep by step:
bundle exec [linter] or equivalent) and the full suite. Fix all failures before proceeding.Key rules:
flowchart LR
A[Feature idea] --> B[create-prd]
B --> C[User reviews PRD]
C --> D[generate-tasks]
D --> E[rails-tdd-slices]
E --> F[TDD Feature Loop]
F --> G[yard-documentation]
G --> H[README diagrams docs]
H --> I[rails-code-review then PR]create-prd: Describe the feature. The skill generates a PRD with goals, user stories, functional requirements, and success metrics. Saved to /tasks/prd-[feature-name].md.
generate-tasks: Point to the PRD. The skill breaks it into parent tasks and sub-tasks with exact file paths, including YARD, documentation updates, and code review before PR. It can also produce a phased plan when the user wants strategy first. Saved to /tasks/tasks-[feature-name].md.
rails-tdd-slices: Choose the highest-value first failing spec before implementation starts.
TDD Feature Loop: Follow the primary workflow above for each behavior in the task list.
yard-documentation: Add or update YARD on every new or changed public class/method (English).
Docs: Update README, architecture diagrams, and any domain docs affected by the change.
rails-code-review: Self-review the full diff, then open the PR (use security/architecture skills when needed).
Key rules:
Use this workflow when the hard part is the domain itself: unclear business language, conflicting meanings, fuzzy ownership, or uncertainty about whether something belongs in a model, value object, or service.
flowchart LR
A[Feature or domain problem] --> B[create-prd]
B --> C[ddd-ubiquitous-language]
C --> D[ddd-boundaries-review]
D --> E[ddd-rails-modeling]
E --> F[generate-tasks]
F --> G[rails-tdd-slices]
G --> H[TDD Feature Loop]Key rules:
rails-architecture-review or refactor-safely when the domain problem lives in existing code structureWhen the team tracks work in Jira, run ticket-planning after generate-tasks (or from any approved initiative plan):
flowchart LR
D[generate-tasks] --> J[ticket-planning]
J --> K[Draft markdown tickets]
J --> L[Create in Jira when approved]After the tests gate is satisfied for a given behavior, implementation should follow:
app/services, workers, controllers, etc.).Use rails-code-conventions during code review and refactors as well, not only on greenfield features.
When the main issue is domain language or ownership, run ddd-ubiquitous-language and ddd-boundaries-review before deciding on Rails tactical modeling.
Before opening a PR: run rails-code-review on your own branch (same checklist as reviewing others). Task lists from generate-tasks end with this step.
flowchart LR
A[PR ready] --> B[rails-code-review\nSelf-review]
B --> C{Security concerns?}
C -->|Yes| D[rails-security-review]
C -->|No| E{Architecture issues?}
E -->|Yes| F[rails-architecture-review]
E -->|No| G[Approve / Request changes]
D --> G
F --> G
G -->|Feedback received| H[rails-review-response\nEvaluate + respond]
H --> I[Implement accepted items]
I --> J{Critical items\naddressed?}
J -->|Yes| B
J -->|No| K[Merge]Key rules:
Bug triage and bug fix are two distinct phases:
rails-bug-triage) = diagnosing and reproducing the bug, producing a failing specflowchart LR
A[Bug report] --> B[rails-bug-triage\nReproduce + localize]
B --> C[rails-tdd-slices\nChoose reproduction spec]
C --> D["Write failing reproduction spec"]
D --> E["GATE: Linters + Suite pass with new failing spec"]
E --> F["Implement smallest safe fix"]
F --> G["Verify spec passes + no regressions"]
G --> H[rails-code-review\nReview fix]Key rules:
flowchart LR
A[Requirement] --> B["RED: Write failing test"]
B --> C["Checkpoint: Test Design Review"]
C --> D["Checkpoint: Implementation Proposal"]
D --> E["GREEN: Minimal code"]
E --> F["Verify passes"]
F --> G["REFACTOR: Clean up"]
G --> H["Verify still passes"]
H --> Brails-tdd-slices: Use first when the right starting spec is not obvious. It helps pick the best initial failing spec for request, model, service, job, engine, or bug-fix work.
rspec-best-practices: Covers the full TDD cycle, spec type selection, factory design, and common smells. Includes the Test Feedback and Implementation Proposal checkpoints.
rspec-service-testing: Specific patterns for service object tests — instance_double, hash factories, shared_examples.
Key rules:
Use when slow queries, N+1s, or response time regressions are identified.
flowchart LR
A[Perf issue identified] --> B[rails-code-conventions\nActiveRecord performance rules]
B --> C[rspec-best-practices\nAdd regression spec with query count]
C --> D["GATE: failing regression spec"]
D --> E[Optimize]
E --> F["Verify spec passes + EXPLAIN output improved"]
F --> G[rails-code-review]app/models/**/*.rb) — eager loading, exists?, pluck, find_each.make_database_queries(count: N)) before optimizing.includes, preload, eager_load, index, or query rewrite.Key rules:
EXPLAIN ANALYZE to confirm query plan improvement, not just timingUse when adding, modifying, or removing columns, indexes, or tables — especially on large tables.
flowchart LR
A[Migration needed] --> B[rails-migration-safety\nStrategy: reversible, zero-downtime, data safety]
B --> C[rails-tdd-slices\nSpec for migration side effects]
C --> D["GATE: test migration up + down"]
D --> E[Implement migration]
E --> F["Verify up + down + data integrity"]
F --> G[rails-code-review]up, down, and any data integrity checks.Key rules:
down — reversibility is not optionalalgorithm: :concurrent indexesUse when security-sensitive changes are made, or as a standalone audit of any endpoint or auth flow.
flowchart LR
A[Security-sensitive change] --> B[rails-security-review\nAuth, params, IDOR, PII, SQL injection]
B --> C{Findings?}
C -->|Critical| D[Fix immediately]
C -->|Suggestion| E[Fix in this PR or ticket]
D --> F[rails-code-review\nVerify fixes]
E --> F
F --> G[PR]Key rules:
Use when adding or modifying GraphQL queries, mutations, types, or resolvers.
flowchart LR
A[GraphQL feature] --> B[create-prd]
B --> C[ddd-ubiquitous-language\nType / field naming]
C --> D[rails-graphql-best-practices\nSchema design]
D --> E[rails-tdd-slices\nChoose first spec]
E --> F[TDD Feature Loop]
F --> G[rails-migration-safety\nif DB changes needed]
G --> H[rails-code-conventions]
H --> I[rails-security-review\nintrospection, auth, depth limits]
I --> J["GATE: Linters + Suite"]
J --> K[yard-documentation]
K --> L[rails-code-review → PR]Key rules:
{ result, errors } — never raiseflowchart TD
A[rails-engine-author] --> B[rails-engine-testing]
B --> C[rails-engine-docs]
C --> D[rails-engine-installers]
D --> E[rails-engine-reviewer]
E --> F[rails-engine-release]
F --> G[rails-engine-compatibility]Generated output: All documentation, YARD comments, Postman collections, and examples must be in English unless the user explicitly requests another language.
Post-implementation (not optional for features): After implementation and green tests, yard-documentation runs on the touched public API; then update README, diagrams (e.g. Mermaid in docs/), and related domain docs so operators and future developers see the new behavior.
@param, @option, @return, @raise, @example) on every public method; keep all text in English. Required before PR for new or changed public API.docs/postman/ or spec/fixtures/postman/. Request names and descriptions in English. Note: For GraphQL endpoints, prefer Insomnia or GraphQL Playground — Postman REST collections do not map cleanly to GraphQL queries and mutations.flowchart LR
A[Host app code] --> B[rails-engine-extraction]
B --> C[refactor-safely]
C --> D[rails-engine-author]
D --> E[rails-engine-testing]Key rules:
.call pattern, standardized responses, YARD docs (see yard-documentation), transaction wrapping.For inline documentation standards, use yard-documentation. For external API integrations, add ruby-api-client-integration (Auth/Client/Fetcher/Builder layers).
For variant-based calculators, add strategy-factory-null-calculator (Factory + Strategy + Null Object).
flowchart LR
A[Integration need] --> B[create-prd]
B --> C[generate-tasks]
C --> D[rails-tdd-slices]
D --> E["Write failing layer specs"]
E --> F[ruby-api-client-integration]
F --> G[yard-documentation]
G --> H[README diagrams docs]
H --> I[rails-code-review]Key rules:
flowchart LR
A[Identify change] --> B[refactor-safely]
B --> C["Add characterization tests"]
C --> D["Extract in small steps"]
D --> E["Verify after each step"]
E --> F[rails-code-review]Key rules:
api-rest-collection
create-prd
ddd-boundaries-review
ddd-rails-modeling
ddd-ubiquitous-language
docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
scenario-17
scenario-18
scenario-19
scenario-20
scenario-21
scenario-22
scenario-23
scenario-24
scenario-25
scenario-26
generate-tasks
mcp_server
rails-architecture-review
rails-background-jobs
rails-bug-triage
rails-code-conventions
rails-code-review
rails-engine-compatibility
rails-engine-docs
rails-engine-extraction
rails-engine-installers
rails-engine-release
rails-engine-reviewer
rails-engine-testing
rails-graphql-best-practices
rails-migration-safety
rails-review-response
rails-security-review
rails-skills-orchestrator
rails-stack-conventions
rails-tdd-slices
refactor-safely
rspec-best-practices
rspec-service-testing
ruby-service-objects
strategy-factory-null-calculator
ticket-planning
yard-documentation