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 rules/andyw8/rails_rules/1000-rails-generalgit clone --depth 1 https://github.com/andyw8/rails_rulesWrote 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/rules/andyw8/rails_rules/1000-rails-general)<a href="https://agentmods.dev/rules/andyw8/rails_rules/1000-rails-general"><img src="https://agentmods.dev/badge/rules/andyw8/rails_rules/1000-rails-general.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.00000 | $0.00501 |
| Opus 5 | $0.00000 | $0.00251 |
| Sonnet 5 | $0.00000 | $0.00100 |
| Haiku 4.5 | $0.00000 | $0.00050 |
Grade A, and why
1000-rails-general 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 4d 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 — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
General Rails 8.0 Conventions
Context
- In Ruby on Rails 8.0 application
- Using modern Rails features and patterns
- Follows Ruby style conventions
Requirements
- Follow Ruby style guidelines (2 spaces for indentation, snake_case for variables/methods)
- Use Service Objects for complex business logic
- Use concerns for shared functionality
- Use modules for namespacing and code organization
- Use class Module::ClassName instead of nested module/class definitions
- Add YARD documentation to methods and classes
- Use positional arguments in enums and other Rails 8.0 features
- Use credentials with Rails.application.credentials syntax
- Pass models to jobs, not IDs (they'll be serialized automatically)
- Use has_prefix_id for models with UUIDs
- Use ActiveRecord conventions for database operations
- Follow RESTful conventions for controllers
- Use Tailwind CSS for styling views
- Make all UI components responsive and support dark mode
- Use Hotwire (Turbo, Stimulus) for JavaScript functionality
- Ensure accessibility in all UI components
Examples
Good - Using Service Object
user = CreateUserService.new(user_params).run
Good - Using positional arguments in enum
class Article < ApplicationRecord enum status: [:draft, :published, :archived] end
Good - Class namespacing
class Api::V1::UsersController < ApplicationController
...
end
</example>
<example type="invalid">
```ruby
# Bad - Using outdated credentials pattern
api_key = Rails.application.secrets.anthropic_api_key
# Bad - Complex logic in controller
def create
@user = User.new(user_params)
if @user.save
# Complex business logic here
end
end
# Bad - Using hash for enum
class Article < ApplicationRecord
enum status: { draft: 0, published: 1, archived: 2 }
end
# Bad - Nested modules
module Api
module V1
class UsersController < ApplicationController
# ...
end
end
end
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.
- 4d ago First seen · 88 lines · 0 tokens per session scan A 049c7c272ca3
1000-rails-general is a cursor rule published in the GitHub repository andyw8/rails_rules (4 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 501 tokens. 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 cursor rules, from other repositories
hatch3r-ruby-rails-patterns
Ruby 3.3+ and Rails 8.x conventions covering Hotwire (Turbo + Stimulus), ActiveRecord patterns, Sidekiq jobs, RSpec testing, RuboCop / Standard, and YJIT performance.
workato-connector-sdk
Cursor rule "workato-connector-sdk" from rkawaishi/workato-dev-kit, covering workato connector sdk (connector.rb), file structure, top-level structure of connector.rb, authorization types and required keys for an action.
ruby-style
Ruby coding style aligned with project RuboCop config.
ruby
Rules applied when working in Ruby files (incl. Rails).
skill-rails-api
Padrões DARE para APIs em Ruby on Rails 8 — API mode, ActiveRecord, Solid Queue, Solid Cable, Action Cable, strong parameters, services, serializers (Blueprinter/Alba), Devise/JWT, rack-attack, rswag/grape-swagger.
secure-dev-ruby
These rules apply to all Ruby code in the repository (including Rails apps, scripts, and gems) and aim to prevent common security vulnerabilities through safe coding patterns, input validation, and proper use of the Ruby standard library.