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 ThibautBaissac/rails_ai_agents --skill rails-concerngit clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agentsWrote 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/thibautbaissac/rails_ai_agents/rails-concern)<a href="https://agentmods.dev/skills/thibautbaissac/rails_ai_agents/rails-concern"><img src="https://agentmods.dev/badge/skills/thibautbaissac/rails_ai_agents/rails-concern/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/thibautbaissac/rails_ai_agents/rails-concern"><img src="https://agentmods.dev/badge/skills/thibautbaissac/rails_ai_agents/rails-concern.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00084 | $0.01811 |
| Opus 5.5 | $0.00034 | $0.00724 |
| Sonnet 5.5 | $0.00017 | $0.00362 |
| Haiku 4.5 | $0.00008 | $0.00181 |
Grade A, and why
rails-concern scanned grade A with 0 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 2mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 339 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rails Concern Generator (TDD)
Creates concerns (ActiveSupport::Concern modules) for shared behavior with specs first.
Quick Start
- Write failing spec testing the concern behavior
- Run spec to confirm RED
- Implement concern in
app/models/concerns/orapp/controllers/concerns/ - Run spec to confirm GREEN
When to Use Concerns
Good use cases:
- Shared validations across multiple models
- Common scopes used by several models
- Shared callbacks (e.g., UUID generation)
- Controller authentication/authorization helpers
- Pagination or filtering logic
Avoid concerns when:
- Logic is only used in one place (YAGNI)
- Creating "god" concerns with unrelated methods
- Logic should be a service object instead
TDD Workflow
Step 1: Create Concern Spec (RED)
For Model Concerns, test via a model that includes it:
# spec/models/concerns/[concern_name]_spec.rb
RSpec.describe [ConcernName] do
# Create a test class that includes the concern
let(:test_class) do
Class.new(ApplicationRecord) do
self.table_name = "events" # Use existing table
include [ConcernName]
end
end
let(:instance) { test_class.new }
describe "included behavior" do
it "adds the expected methods" do
expect(instance).to respond_to(:method_from_concern)
end
end
describe "#method_from_concern" do
it "behaves as expected" do
expect(instance.method_from_concern).to eq(expected_value)
end
end
describe "class methods" do
it "adds scope" do
expect(test_class).to respond_to(:scope_name)
end
end
end
Alternative: Test through an actual model that uses the concern:
# spec/models/event_spec.rb
RSpec.describe Event, type: :model do
describe "[ConcernName] behavior" do
describe "#method_from_concern" do
let(:event) { build(:event) }
it "does something" do
expect(event.method_from_concern).to eq(expected)
end
end
end
end
For Controller Concerns, test via request specs:
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.
- 2mo ago First seen · 339 lines · 84 tokens per session scan A a53e1ee5891e
rails-concern is a skill published in the GitHub repository ThibautBaissac/rails_ai_agents (672 stars, last pushed 5mo ago), licensed MIT. It adds 84 tokens to every session and 1,811 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
rails-concern compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| rails-concernThibautBaissac/rails_ai_agents | Skill | 672 | 5mo ago | MIT | A | 84 | Claude Code |
| rails-expertJeffallan/claude-skills | Skill | 12k | 7d ago | MIT | A | 104 | Claude Code |
| newclacky-ai/openclacky | Skill | 1.2k | yesterday | MIT | A | 10 | Claude Code |
| rails-conventionsrootstrap/rails_api_base | Skill | 634 | 2d ago | MIT | A | 71 | Claude Code |
| rails-idiomsirahardianto/awesome-agv | Skill | 158 | 23d ago | MIT | A | 57 | Claude Code, Codex |
| rails-devtech-leads-club/agent-skills | Skill | 7.1k | yesterday | none | A | 199 | Claude Code, Codex |
| ruby-railsj4flmao/agent-skills | Skill | 38 | 3d ago | MIT | A | 94 | Claude Code, Codex |