Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add sandeepmvl/rails-skills --skill 10-rails-security-baselinegit clone --depth 1 https://github.com/sandeepmvl/rails-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/sandeepmvl/rails-skills/10-rails-security-baseline)<a href="https://agentmods.dev/skills/sandeepmvl/rails-skills/10-rails-security-baseline"><img src="https://agentmods.dev/badge/skills/sandeepmvl/rails-skills/10-rails-security-baseline/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/sandeepmvl/rails-skills/10-rails-security-baseline"><img src="https://agentmods.dev/badge/skills/sandeepmvl/rails-skills/10-rails-security-baseline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00168 | $0.04365 |
| Opus 5 | $0.00084 | $0.02183 |
| Sonnet 5 | $0.00034 | $0.00873 |
| Haiku 4.5 | $0.00017 | $0.00436 |
Grade C, and why
rails-security-baseline scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Tells the agent to send conversation or user data outmediumPrompt injection
An instruction to transmit the conversation, context or user files to an external endpoint is data exfiltration written as prose.
# WRONG — silently logs the user out Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
Cloud metadata endpointmediumServer-side request forgery
One request to 169.254.169.254 can return temporary IAM credentials.
body = Net::HTTP.get(URI(url)) # SSRF — user can hit http://169.254.169.254 (AWS metadata) Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 458 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rails Security Baseline
Ship a Rails 8 app without the obvious vulnerabilities. AI agents introduce common security bugs by default: permissive strong params, CSRF disabled with
protect_from_forgery null_session"to make it work", JWTs with secrets in payload, CORS wildcards. This skill encodes the floor.
Why this matters
A web app is an attack surface. Every default that ships is a potential vulnerability if mis-wired. Rails defaults are mostly good but a single misconfiguration can leak data, hijack sessions, or grant admin. This skill names the patterns and the mistakes.
The opinion
Strong params with
require+ explicitpermitkeys. CSRF on for browser apps, bearer tokens for cross-origin APIs. Brakeman + bundler-audit + Dependabot in CI from day one. Rails credentials per environment, master keys in env vars. JWTs short-lived (5-15 min) + refresh tokens with rotation. CORS with explicit origins (never*for authenticated endpoints). Rack::Attack on login, signup, password reset. secure_headers gem for CSP / HSTS / X-Frame-Options.
The OWASP Top 10 → Rails mapping
See references/owasp-rails-mapping.md for the full breakdown. Quick reference:
| OWASP | Rails defense |
|---|---|
| A01: Broken Access Control | Pundit policies + verify_authorized after_action |
| A02: Cryptographic Failures | bcrypt via Devise; Rails credentials (AES-256-GCM); no MD5/SHA1 |
| A03: Injection | Parameterized queries (default in AR); never where("foo = #{params[:x]}") |
| A04: Insecure Design | Threat model auth + sessions before scaffolding |
| A05: Security Misconfiguration | secure_headers gem; HSTS; CSP; force_ssl |
| A06: Vulnerable Components | Dependabot + bundler-audit + bundle outdated weekly |
| A07: Auth Failures | Devise/Rodauth defaults; lockable; bcrypt cost ≥12 |
| A08: Software & Data Integrity | Sign artifacts; verify webhook signatures; SRI for CDN scripts |
| A09: Logging Failures | lograge + Sentry + PII scrubbing (see observability-baseline) |
| A10: SSRF | Validate user-supplied URLs; allowlist hosts; never Net::HTTP.get(URI(params[:url])) |
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 458 lines · 168 tokens per session scan C f7b3b40f5379
rails-security-baseline is a skill published in the GitHub repository sandeepmvl/rails-skills (21 stars, last pushed 3mo ago), licensed MIT. It adds 168 tokens to every session and 4,365 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it C with 2 findings (tells the agent to send conversation or user data out, cloud metadata endpoint). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
rubyllm
Build and maintain Ruby or Rails applications with the RubyLLM AI framework. Use for chats, agents, tools, structured output, media generation, transcription, OCR, moderation, embeddings, reranking, Rails integration, and RubyLLM upgrades; not for contributing to the framework itself.
new
Create a new project to start development quickly.
rspec-conventions
Rootstrap RSpec conventions. Use when writing, reviewing, or editing RSpec test files (spec//spec.rb, spec/railshelper.rb, spec/spechelper.rb, spec/support//.rb) or factories. Covers describe/context structure, let/subject, matchers, factories, mocking/stubbing, shared examples, and spec types (model, request…
ruby-patterns
Ruby/Rails: blocks, metaprogramming, ActiveRecord, Sidekiq, RSpec, Sorbet, Hanami. Triggers: Ruby, Rails, ActiveRecord, Sidekiq, RSpec, Gemfile, bundler, Hanami, Sorbet.
ruby-rules
Ruby coding rules: style, patterns, security, testing. Triggers: .rb, Gemfile, .gemspec, Rails, ActiveRecord, Sidekiq, RSpec, Sorbet, rubocop.
simplify
Simplifies and refines Ruby on Rails code following 37signals patterns and the One Person Framework philosophy, while preserving exact functionality. Focuses on recently modified code unless instructed otherwise. Use this skill when simplifying or refactoring Rails code, reviewing recently written Rails code for…