mailer-agent

mailer-agent is an agent for Claude Code from ThibautBaissac/rails_ai_agents. It costs 0 tokens per session (641 once invoked), scanned A, original, MIT.

A Rails email-building agent for Action Mailer, the framework used to send application emails. It creates email messages, HTML and plain-text templates, previews, and delivery tests.

In plain words
What is it for?
Building password resets, account notifications, and other transactional emails, including their templates, subjects, previews, and tests.
Why use it?
It removes the repeated setup needed for transactional emails and notifications. Tests and previews make it easier to check what recipients will receive before sending messages.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit Building password resets, account notifications, and other transactional emails, including their templates, subjects, previews, and tests.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/thibautbaissac/rails_ai_agents/mailer-agent
Install

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.

Clone the repo
git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents

Made for: Claude Code.

Wrote 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.

agentmods badge for mailer-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/thibautbaissac/rails_ai_agents/mailer-agent/github.svg)](https://agentmods.dev/agents/thibautbaissac/rails_ai_agents/mailer-agent)
Your own site
<a href="https://agentmods.dev/agents/thibautbaissac/rails_ai_agents/mailer-agent"><img src="https://agentmods.dev/badge/agents/thibautbaissac/rails_ai_agents/mailer-agent/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.

agentmods 80×15 button for mailer-agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/thibautbaissac/rails_ai_agents/mailer-agent"><img src="https://agentmods.dev/badge/agents/thibautbaissac/rails_ai_agents/mailer-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 641 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00641
Opus 5 $0.00000 $0.00320
Sonnet 5 $0.00000 $0.00128
Haiku 4.5 $0.00000 $0.00064

Measured 9d ago against content hash a230dae52b26, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

mailer-agent 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 9d 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.

.claude/agents/mailer-agent.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Your Role

You create tested ActionMailer mailers with previews and HTML/text templates. You handle transactional emails and user notifications following Rails 8 conventions. You ALWAYS write RSpec tests and previews alongside the mailer.

Rails 8 Mailer Notes

  • Solid Queue: deliver_later uses database-backed queue (no Redis)
  • Previews: Always create at spec/mailers/previews/
  • I18n: Use I18n.t for all subject lines and content

ApplicationMailer Base Class

class ApplicationMailer < ActionMailer::Base
  default from: "[email protected]"
  layout "mailer"
  private
  def default_url_options
    { host: Rails.application.config.action_mailer.default_url_options[:host] }
  end
end

Naming Convention

app/mailers/entity_mailer.rb          -> app/views/entity_mailer/created.html.erb
                                         app/views/entity_mailer/created.text.erb
app/views/layouts/mailer.html.erb     (shared HTML layout)
app/views/layouts/mailer.text.erb     (shared text layout)

Mailer Patterns

Four standard patterns. See patterns.md for full implementations:

  1. Simple Transactional -- mail(to:, subject:) with @ivar assignments
  2. With Attachments -- attachments["file.pdf"] = data before mail
  3. Multiple Recipients -- to:, cc:, reply_to: options
  4. Conditions and Locales -- guard with return if, wrap in I18n.with_locale

Configuration

# development: letter_opener, opens emails in browser
config.action_mailer.delivery_method = :letter_opener
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
# test: captures emails in ActionMailer::Base.deliveries
config.action_mailer.delivery_method = :test
config.action_mailer.default_url_options = { host: "test.host" }

References

Read the full file on GitHub · 71 lines

Changes

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.

  1. 9d ago First seen · 71 lines · 0 tokens per session scan A a230dae52b26

Subscribe to this mod's changes

mailer-agent is an agent published in the GitHub repository ThibautBaissac/rails_ai_agents (661 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 641 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-30.

Related

Other agents, from other repositories

rails-expert

Build scalable Rails applications with modern patterns and best practices. Implements service objects, background jobs, and API design. Use PROACTIVELY for Rails development, performance optimization, or architectural decisions.

davepoon/buildwithclaude · 42 tokens

rails-feature-developer

Use this agent when you need to develop new features, implement user stories, or build functionality in a Ruby on Rails application using modern Rails patterns and best practices. This agent excels at TDD-driven development, clean architecture, and Hotwire integration.\n\nExamples:\n- \n Context: User needs to…

dgalarza/claude-code-workflows · 0 tokens

ruby-developer

Implementación de código Ruby on Rails siguiendo specs SDD aprobadas. Usar PROACTIVELY cuando: se implementa una feature en Rails (controllers, models, migrations, services), se refactoriza código existente, o se corrige un bug con spec definida. SIEMPRE requiere una Spec SDD aprobada antes de empezar.

gonzalezpazmonica/savia · 73 tokens

rails-backend-expert

Use this agent when working on Ruby on Rails backend code, including models, controllers, services, jobs, database migrations, API endpoints, background processing, or any server-side Ruby logic. This agent should be consulted for:\n\n- Implementing new backend features following Rails conventions\n- Refactoring…

dgalarza/claude-code-workflows · 0 tokens

spikard-developer

General development agent for the spikard polyglot HTTP framework. Handles Rust core development, language binding implementation, workspace management, and cross-cutting concerns.

Goldziher/spikard · 38 tokens

rails-builder

Ruby on Rails implementation specialist. Use PROACTIVELY to build models, controllers, views, jobs, and migrations in Rails projects. Follows convention-over-configuration; fat model / skinny controller; idiomatic ActiveRecord.

toffyui/ccteams · 48 tokens