From rails-agent-skills
Loads minimal Rails context from db/schema.rb, routes.rb, neighbors, factories, specs, and Gemfile.lock before proposing code, tests, or PRDs. Surfaces patterns, conventions, gotchas, and handles ambiguity.
npx claudepluginhub igmarin/rails-agent-skills --plugin rails-agent-skillsThis skill uses the workspace's default tool permissions.
Load minimum context before any code, spec, or PRD in an existing Rails codebase. A fifteen-second read of `db/schema.rb`, `config/routes.rb`, and one neighbor saves a full retry.
Triages and decomposes complex Ruby on Rails requests into ordered sub-tasks, delegates to specialized skills for testing, code review, engines, DDD, and patterns. Enforces TDD discipline across code-producing work.
Provides Rails-specific checklists for spec interviews and implementation in Ruby on Rails projects, covering data models, architecture, testing, security, and operations.
Provides Ruby on Rails conventions, patterns, and best practices for ActiveRecord models, controllers, migrations, configuration, background jobs, logging, and request specs.
Share bugs, ideas, or general feedback.
Load minimum context before any code, spec, or PRD in an existing Rails codebase. A fifteen-second read of db/schema.rb, config/routes.rb, and one neighbor saves a full retry.
DO NOT propose code, specs, PRDs, or task lists until the Context Summary is posted.
DO NOT silently resolve ambiguity — if requirements conflict or specs and code disagree, post a Confusion Block first.
DO NOT load the entire repo — use targeted reads (schema, routes, one neighbor of each kind).
ALWAYS cite the files you read (path:line where possible) so the user can verify.
ALWAYS re-check context when the user's request changes scope mid-conversation.
db/schema.rb — tables and columns involved (grep by table name)config/routes.rb — routes that border the changeGemfile.lock — confirm Rails version + domain gems (sidekiq, pundit, rspec, rails-i18n, graphql, etc.)grep -r "class.*Controller" app/controllers, grep -r "class.*Service" app/services, etc.### Confusion Block
- Conflict: <what conflicts — e.g., spec asserts X but code does Y>
- Options: <list the options with their tradeoffs>
- Recommendation: <state which option and why, or ask user to choose>
Do not pick silently.
7. Hand off: With context loaded, proceed to the next skill (create-prd, generate-tasks, rails-tdd-slices, rails-stack-conventions, etc.). The Context Summary travels with the task.
Every invocation of this skill MUST produce a Context Summary in this exact shape, before any code or spec is proposed:
### Context Summary
- Scope: <one line — Rails layer and nearest class/file area>
- Rails version: <from Gemfile.lock>
- Relevant tables: <table names from db/schema.rb, columns that matter>
- Relevant routes: <resource/member routes from config/routes.rb>
- Nearest pattern: <path:line — one existing file that solves a similar problem>
- Nearest spec: <path:line — existing spec for this area (or NONE)>
- Engine boundary: <engine name or N/A>
- Gotchas: <domain gem quirks, enum mappings, polymorphic edges, counter caches, soft-delete, single-table inheritance — only list if present>
- Confusion: <NONE, or a one-line pointer to the Confusion Block below>
Additional MUSTs:
Context loaded. Next: <skill-name> — <one-line reason>.| Pitfall | What to do |
|---|---|
| Generic "the model, the controller" language | Name the class and file — generic language is the symptom of skipped context |
| Citing paths without line numbers | Use path:line when referencing a method, class, or association |
| Ignoring engine boundaries | Name the engine and its host integration points when a mounted engine is touched |
| Ignoring spec/code drift | A passing stale spec is worse than a missing spec — call it out in Confusion |
| Skill | When to chain |
|---|---|
| create-prd / generate-tasks | Before scoping a PRD or breaking down tasks on an existing feature area |
| rails-tdd-slices | Nearest spec in the summary usually reveals the right first failing spec |
| rails-bug-triage / refactor-safely | Context precedes reproduction or characterization tests |
| rails-architecture-review / ddd-ubiquitous-language | When context reveals boundary or naming drift |