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 agentmods add skills/ag0os/rails-dev-plugin/rails-service-patternsnpx skills add ag0os/rails-dev-plugin --skill rails-service-patternsgit clone --depth 1 https://github.com/ag0os/rails-dev-pluginWrote 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/ag0os/rails-dev-plugin/rails-service-patterns)<a href="https://agentmods.dev/skills/ag0os/rails-dev-plugin/rails-service-patterns"><img src="https://agentmods.dev/badge/skills/ag0os/rails-dev-plugin/rails-service-patterns.svg" alt="Measured on agentmods" 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 | $0.00070 | $0.00971 |
| Opus 5 | $0.00035 | $0.00485 |
| Sonnet 5 | $0.00014 | $0.00194 |
| Haiku 4.5 | $0.00007 | $0.00097 |
Grade A, and why
rails-service-patterns 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 5d 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 — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rails Service Object Patterns
Analyze and recommend patterns for extracting and organizing business logic in Rails applications.
Resolve the axis first
This skill forks on Axis A — logic placement. Before recommending where logic goes:
- If the axes are already resolved this session, use them.
- Otherwise resolve via
rails-stack-profiles(Axis A only —nativeorextracted). - Then read the matching extraction guide:
native→ extraction.native.mdextracted→ extraction.extracted.md
If the axis cannot be resolved, default to native and state the assumption.
Everything else in this file is invariant — it holds regardless of axis.
Quick Reference
| Pattern | Use When | Entry Point |
|---|---|---|
| Basic Service | Single operation with transaction | CreateOrder.new(...).call |
| Result Object | Caller needs success/failure + data | Result.new(success?: true, data:) |
| Form Object | Multi-model form submissions | RegistrationForm.new(params).save |
| Query Object | Complex reusable queries | UserSearchQuery.new(scope).call |
| Policy Object | Authorization decisions | PostPolicy.new(user, post).update? |
Supporting Documentation
- extraction.native.md — when to extract,
nativeaxis - extraction.extracted.md — when to extract,
extractedaxis - patterns.md — result objects, form objects, query objects, error handling
Core Principles
- VerbNoun naming:
CreateOrder,SendInvitation-- neverOrderServiceorUserManager - One public method: Expose only
call(orperform) - Explicit return values: Use Result objects, never exceptions for expected flow control
- Axis-aware extraction: Whether a given operation becomes a service at all depends on Axis A. Read the matching extraction guide above before recommending a service.
Result Object Pattern
What ships with it
3 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.
- 5d ago First seen · 94 lines · 70 tokens per session scan A d41e55814364
rails-service-patterns is a skill published in the GitHub repository ag0os/rails-dev-plugin (5 stars, last pushed 3mo ago), licensed MIT. It adds 70 tokens to every session and 971 once invoked, about $0.0003 per session on Opus 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-31.
Other skills, from other repositories
contributing
Contribute to RubyLLM - set up the repo, run and record specs, add providers or chat options, work on the Rails integration, and edit docs. Use when fixing a bug, building a feature, writing specs, or changing documentation in the RubyLLM codebase.
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-idioms
Ruby rewards expressiveness, convention, and developer happiness. Modern Ruby (3.x) favors pattern matching, Ractor for concurrency, and strict typing via Sorbet/RBS. Idiomatic Ruby = readable, tested, convention-following.
ruby-rules
Ruby coding rules: style, patterns, security, testing. Triggers: .rb, Gemfile, .gemspec, Rails, ActiveRecord, Sidekiq, RSpec, Sorbet, rubocop.