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.
95
97%
Does it follow best practices?
Impact
91%
2.21xAverage score across 3 eval scenarios
Passed
No known issues
Use this skill when the task is to review or harden Rails code from a security perspective.
Core principle: Prioritize exploitable issues over style. Assume any untrusted input can be abused.
| Area | Key Checks |
|---|---|
| Auth | Permissions on every sensitive action |
| Params | No permit!, whitelist only safe attributes |
| Queries | Parameterized — no string interpolation in SQL |
| Redirects | Constrained to relative paths or allowlist |
| Output | No html_safe/raw on user content |
| Secrets | Encrypted credentials, never in code or logs |
| Files | Validate filename, content type, destination |
High-severity (unscoped redirect):
# Bad: user-controlled redirect
redirect_to params[:return_to]return_to=https://evil.com to redirect victims. Mitigation: Redirect only to relative paths or an allowlist.Medium-severity (mass assignment):
# Bad: permit too much
params.require(:user).permit!permit! allows privilege escalation. Mitigation: Permit only safe attributes; never permit role, admin, or other privilege fields from request params.| Mistake | Reality |
|---|---|
| "Only internal users access this" | Internal tools get compromised. Apply same security standards. |
permit! "just for now" | It will ship. Whitelist attributes from day one. |
| "Rails handles CSRF automatically" | Only if protect_from_forgery is active and tokens are verified. |
| String interpolation in SQL | SQL injection. Always use parameterized queries. |
html_safe on user content | XSS. Only use on developer-controlled strings. |
| Secrets in environment files committed to git | Use encrypted credentials. Rotate compromised secrets immediately. |
permit! anywhere in production codewhere(), find_by_sql(), or execute()redirect_to params[:url] without validationhtml_safe or raw called on user-provided data.env, secrets.yml)Write findings first.
For each finding include:
| Skill | When to chain |
|---|---|
| rails-code-review | For full code review including non-security concerns |
| rails-architecture-review | When security issues stem from architectural problems |
| rails-migration-safety | When reviewing migration security (data exposure, constraints) |
api-rest-collection
create-prd
ddd-boundaries-review
ddd-rails-modeling
ddd-ubiquitous-language
evals
generate-tasks
rails-agent-skills
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-stack-conventions
rails-tdd-slices
refactor-safely
rspec-best-practices
rspec-service-testing
ruby-api-client-integration
ruby-service-objects
strategy-factory-null-calculator
ticket-planning
yard-documentation