Agent skill

Mailer Patterns

by dilolabs in dilolabs/nosia

Creates minimal Action Mailer classes with bundled notification patterns following 37signals conventions.

MITAuto-check passedBackend & APIs

Install Mailer Patterns

skills CLI
$ npx skills add dilolabs/nosia --skill mailer-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dilolabs/nosia mailer-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dilolabs/nosia.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.vibe/skills/mailer-patterns .claude/skills/mailer-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mailer-patterns
GitHub stars
213
Used in
1 other repo
Token cost
~2.6k tokens
SKILL.md length
269 words
Files
3 (incl. references)
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

Creates minimal Action Mailer classes with bundled notification patterns following 37signals conventions.

  • Creating notification systems
  • SKILL.md covers Philosophy: Minimal Mailers,…, Project Knowledge, Pattern 1: Simple… and Pattern 2: Email Templates, plus 7 more sections
  • Calls rails
  • User mentions mailers

What it does

Mailer Patterns is an agent skill from dilolabs/nosia. Creates minimal Action Mailer classes with bundled notification patterns following 37signals conventions. Use when sending emails, creating notification systems, digest emails, or when user mentions mailers, emails, notifications, or transactional messages. WHEN NOT: For background job scheduling (use job-patterns), for event-driven triggers (use event-tracking).

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/bundled-notifications.md` and `references/mailer-templates.md`). Compatibility notes: Ruby 3.3+, Rails 8.0+, Action Mailer, Solid Queue

It sits in Backend & APIs, covering Background jobs, Event-driven systems and Product analytics. The repository describes itself as: Self-hosted AI RAG + MCP Platform. The licence is MIT.

When your agent uses it

  • Creating notification systems
  • User mentions mailers
  • Transactional messages
  • (use event-tracking)

Example prompts

  • “Use the mailer-patterns skill to create minimal Action Mailer classes with bundled notification patterns following 37signals conventions”
  • “/mailer-patterns”

Requirements

  • Compatibility (from SKILL.md): Ruby 3.3+, Rails 8.0+, Action Mailer, Solid Queue

What it can do on your machine

Read from SKILL.md and the folder at commit 0ef5e5d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • rails

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Ruby 3.3+, Rails 8.0+, Action Mailer, Solid Queue

    From compatibility in the SKILL.md frontmatter.

Context cost

Mailer Patterns loads about 2.6k tokens when it runs, and up to ~5.8k if it reads all its reference files. Until then it costs about 95 tokens; SKILL.md has 269 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~95
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dilolabs/nosia at commit 0ef5e5d, republished under its MIT licence (© dilolabs). 269 words, ~2,553 tokens.

Download SKILL.mdSave it as .claude/skills/mailer-patterns/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
mailer-patterns
description
Creates minimal Action Mailer classes with bundled notification patterns following 37signals conventions. Use when sending emails, creating notification systems, digest emails, or when user mentions mailers, emails, notifications, or transactional messages. WHEN NOT: For background job scheduling (use job-patterns), for event-driven triggers (use event-tracking).
compatibility
Ruby 3.3+, Rails 8.0+, Action Mailer, Solid Queue
license
MIT

Mailer Patterns

Philosophy: Minimal Mailers, Bundled Notifications

  • Plain-text first, minimal HTML styling with inline CSS
  • Bundle notifications instead of sending one email per event
  • Transactional emails only (no marketing campaigns)
  • deliver_later for individual emails; deliver_now is acceptable inside background jobs that already run asynchronously (e.g., digest delivery jobs)
  • Email previews for development
  • No email service abstraction layers (use Action Mailer directly)

Project Knowledge

Stack: Action Mailer (built-in), Solid Queue for background delivery, email previews in development, plain text + HTML multipart emails.

Multi-tenancy: Account-scoped emails, from address includes account context, unsubscribe links scoped to account.

Commands:

bash
rails generate mailer Comment mentioned         # Generate mailer
rails generate mailer Digest daily_activity      # With methods
# Visit http://localhost:3000/rails/mailers      # Preview emails

Pattern 1: Simple Transactional Mailers

ruby
# app/mailers/application_mailer.rb
class ApplicationMailer < ActionMailer::Base
  default from: ENV.fetch("MAILER_FROM_ADDRESS", "Fizzy <support@fizzy.do>")
  layout "mailer"
end

# app/mailers/comment_mailer.rb
class CommentMailer < ApplicationMailer
  def mentioned(mention)
    @mention = mention
    @comment = mention.comment
    @card = mention.comment.card
    @account = mention.account

    mail(
      to: mention.user.email,
      subject: "#{mention.creator.name} mentioned you in #{@card.title}"
    )
  end

  def new_comment(comment, recipient)
    @comment = comment
    @card = comment.card
    @account = comment.account

    mail(
      to: recipient.email,
      subject: "New comment on #{@card.title}"
    )
  end
end

# app/mailers/membership_mailer.rb
class MembershipMailer < ApplicationMailer
  def invitation(membership)
    @membership = membership
    @account = membership.account
    @inviter = membership.inviter

    mail(
      to: membership.user.email,
      subject: "#{@inviter.name} invited you to #{@account.name}"
    )
  end
end

# app/mailers/card_mailer.rb
class CardMailer < ApplicationMailer
  def assigned(assignment)
    @assignment = assignment
    @card = assignment.card
    @account = assignment.account

    mail(
      to: assignment.user.email,
      subject: "#{assignment.assigner.name} assigned you to #{@card.title}"
    )
  end
end

Pattern 2: Email Templates

See @references/mailer-templates.md for full template examples.

Always create both .text.erb and .html.erb versions:

erb
<%# app/views/comment_mailer/mentioned.text.erb %>
Hi <%= @mention.user.name %>,

<%= @mention.creator.name %> mentioned you in a comment on <%= @card.title %>:

"<%= @comment.body %>"

View the card: <%= account_board_card_url(@account, @card.board, @card) %>

---
You're receiving this because you were mentioned.

<%# app/views/comment_mailer/mentioned.html.erb %>
<p>Hi <%= @mention.user.name %>,</p>

<p><%= @mention.creator.name %> mentioned you in a comment on
   <strong><%= @card.title %></strong>:</p>

<blockquote style="border-left: 3px solid #ccc; padding-left: 15px; color: #666;">
  <%= simple_format(@comment.body) %>
</blockquote>

<p><%= link_to "View the card",
    account_board_card_url(@account, @card.board, @card),
    style: "color: #0066cc; text-decoration: none;" %></p>

Pattern 3: Bundled Notifications (Digest Emails)

See @references/bundled-notifications.md for full details.

ruby
# app/mailers/digest_mailer.rb
class DigestMailer < ApplicationMailer
  def daily_activity(user, account, activities)
    @user = user
    @account = account
    @activities = activities
    @grouped_activities = activities.group_by(&:subject_type)

    mail(
      to: user.email,
      subject: "Daily activity summary for #{account.name}"
    )
  end

  def pending_notifications(user, notifications)
    @user = user
    @notifications = notifications
    @accounts = notifications.map(&:account).uniq

    mail(
      to: user.email,
      subject: "You have #{notifications.size} pending notifications"
    )
  end
end

# app/models/notification_bundler.rb
class NotificationBundler
  def initialize(user)
    @user = user
  end

  def should_send_digest?
    pending_notifications.count >= 5 ||
      oldest_pending_notification_age > 1.hour
  end

  def send_digest
    return unless should_send_digest?
    notifications = pending_notifications
    DigestMailer.pending_notifications(@user, notifications).deliver_later
    notifications.update_all(sent_at: Time.current)
  end

  private

  def pending_notifications
    @user.notifications.where(sent_at: nil)
      .where("created_at > ?", 1.hour.ago)
      .order(created_at: :desc)
  end
end

# app/jobs/send_digest_emails_job.rb
class SendDigestEmailsJob < ApplicationJob
  queue_as :mailers

  def perform(frequency: :daily)
    User.where(digest_frequency: frequency).find_each do |user|
      user.accounts.each do |account|
        activities = user.activities_for_digest(account, frequency)
        if activities.any?
          DigestMailer.daily_activity(user, account, activities).deliver_now
        end
      end
    end
  end
end

# config/recurring.yml
mailers:
  daily_digest:
    class: SendDigestEmailsJob
    args: [{ frequency: 'daily' }]
    schedule: every day at 8am
    queue: mailers

Pattern 4: Background Delivery

Always use deliver_later in production. Trigger from model callbacks:

ruby
class Comment < ApplicationRecord
  after_create_commit :notify_subscribers
  after_create_commit :notify_mentions

  private

  def notify_subscribers
    card.subscribers.each do |subscriber|
      next if subscriber == creator
      next unless subscriber.wants_email?(account, :comments)
      CommentMailer.new_comment(self, subscriber).deliver_later
    end
  end

  def notify_mentions
    mentions.each do |mention|
      next unless mention.user.wants_email?(account, :mentions)
      CommentMailer.mentioned(mention).deliver_later
    end
  end
end

Pattern 5: Email Preferences and Unsubscribe

ruby
class User < ApplicationRecord
  has_many :email_preferences, dependent: :destroy

  enum :digest_frequency, { never: 0, daily: 1, weekly: 2 }, prefix: true

  def wants_email?(account, type)
    pref = email_preferences.find_by(account: account, preference_type: type)
    pref.nil? || pref.enabled?
  end
end

class EmailPreference < ApplicationRecord
  belongs_to :user
  belongs_to :account

  enum :preference_type, { mentions: 0, comments: 1, assignments: 2, digests: 3 }

  validates :preference_type, uniqueness: { scope: [:user_id, :account_id] }
end

Pattern 6: Email Previews

ruby
# test/mailers/previews/comment_mailer_preview.rb
class CommentMailerPreview < ActionMailer::Preview
  def mentioned
    mention = Mention.first || create_sample_mention
    CommentMailer.mentioned(mention)
  end

  private

  def create_sample_mention
    user = User.first
    account = Account.first
    board = account.boards.first
    card = board.cards.first
    comment = card.comments.create!(body: "Hey @alice", creator: user)
    Mention.create!(user: user, comment: comment, creator: user, account: account)
  end
end

Visit previews at http://localhost:3000/rails/mailers.

Pattern 7: Minimal Email Layout

erb
<%# app/views/layouts/mailer.text.erb %>
<%= yield %>

---
<%= @account&.name || "Example App" %>
<%= root_url %>

<%# app/views/layouts/mailer.html.erb %>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
      body { margin: 0; padding: 0; font-family: -apple-system, sans-serif;
             font-size: 16px; line-height: 1.5; color: #333; background: #f5f5f5; }
      a { color: #0066cc; }
    </style>
  </head>
  <body>
    <table style="width: 100%; max-width: 600px; margin: 0 auto;" role="presentation">
      <tr><td style="background: white; padding: 40px 30px;"><%= yield %></td></tr>
      <tr><td style="padding: 20px 30px; text-align: center; color: #999; font-size: 12px;">
        <%= @account&.name || "Example App" %><br><%= link_to root_url, root_url %>
      </td></tr>
    </table>
  </body>
</html>

Delivery Configuration

ruby
# config/environments/production.rb
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.default_url_options = { host: ENV["APP_HOST"] }

# config/environments/development.rb
config.action_mailer.delivery_method = :letter_opener
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }

# config/environments/test.rb
config.action_mailer.delivery_method = :test
config.action_mailer.default_url_options = { host: "example.com" }

Boundaries

Always
  • Create both .text.erb and .html.erb templates
  • Use deliver_later for individual emails; deliver_now is acceptable inside background jobs that already run asynchronously (e.g., digest delivery jobs)
  • Check user email preferences before sending
  • Include unsubscribe links in emails
  • Use inline CSS for HTML emails (no external stylesheets)
  • Scope emails to account context
  • Create email previews for development
Ask First
  • Digest frequency and bundling thresholds
  • Whether to include inline attachments (logos)
  • SMTP provider configuration
Never
  • Send one email per event (bundle notifications)
  • Mix marketing and transactional emails
  • Use external CSS in email templates
  • Build email service abstraction layers
  • Send emails synchronously in request cycle
  • Skip email preferences check

© dilolabs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in .vibe/skills/mailer-patterns of dilolabs/nosia.

  • SKILL.md
  • references/bundled-notifications.md
  • references/mailer-templates.md

Open the folder on GitHubat commit 0ef5e5d

Used in 1 other repository

We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in dilolabs/nosia, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Mailer Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mailer Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mailer Patterns this skilldilolabs/nosia2131 repos~2.6kAutomated safety check: PassMIT
FoundatioFoundatioFx/Foundatio2.1k—~3.9kAutomated safety check: PassApache-2.0
Code Engine SpecialistIBM/CodeEngine117—~3.4kAutomated safety check: PassApache-2.0
Polylith Base CreationDavidVujic/python-polylith553—~757Automated safety check: PassMIT
Agent Signal Pipelinelobehub/lobehub83k—~1.7kAutomated safety check: PassCustom licence
Inngestpedronauck/skills6334 repos~3.1kAutomated safety check: PassNone

Similar skills

  • Foundatio

    FoundatioFx/Foundatio

    A skill your agent uses when working with Foundatio infrastructure abstractions for .NET -- caching, queuing, messaging, file storage, distributed locking, or background jobs.

    2.1k GitHub stars~3.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Official

    Deploys, configures, and troubleshoots IBM Cloud Code Engine workloads using the ibmcloud ce CLI.

    117 GitHub stars~3.4k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Polylith Base Creation

    DavidVujic/python-polylith

    Create a Polylith base with poly create base — the entry point of a deployable application (HTTP API, CLI, message-queue consumer, AWS Lambda handler, GCP Cloud Function, scheduled job).

    553 GitHub stars~757 tokensUpdated 3 days ago
    Backend & APIsAuto-check passed
  • Agent Signal Pipeline

    lobehub/lobehub

    Guides building event-driven background work for LobeHub agents, with sources, signals, actions, policies, workflow handoff and deduplication.

    83k GitHub stars~1.7k tokensUpdated today
    Backend & APIsAuto-check passed
  • Inngest

    pedronauck/skills

    Inngest expert for serverless-first background jobs, event-driven workflows, and durable execution without managing queues or workers.

    633 GitHub starsUsed in 4 repos~3.1k tokens
    Backend & APIsAuto-check passed
  • Upstash Qstash

    davila7/claude-code-templates

    Upstash QStash expert for serverless message queues, scheduled jobs, and reliable HTTP-based task delivery without managing infrastructure.

    32k GitHub starsUsed in 4 repos~597 tokens
    Backend & APIsAuto-check passed

More from dilolabs/nosia

All 15 skills in this repo
  • API Patterns

    dilolabs/nosia

    Builds REST APIs using respondto blocks with Jbuilder templates following the 37signals same-controllers-different-formats philosophy.

    213 GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Auth Setup

    dilolabs/nosia

    Implements custom passwordless authentication without Devise.

    213 GitHub starsUsed in 1 repo~2.9k tokens
    Auto-check passed
  • Caching Patterns

    dilolabs/nosia

    Implements HTTP caching with ETags, fragment caching, Russian doll caching, and Solid Cache configuration.

    213 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Concern Patterns

    dilolabs/nosia

    Creates and refactors model and controller concerns for shared behavior.

    213 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Event Tracking

    dilolabs/nosia

    Builds event tracking, activity feeds, and webhook systems following 37signals patterns with a generic Event model and Eventable concern.

    213 GitHub starsUsed in 1 repo~3.3k tokens
    Auto-check passed
  • Job Patterns

    dilolabs/nosia

    Implements shallow background jobs with later/now conventions using Solid Queue.

    213 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed

Categories

Questions about Mailer Patterns

What does Mailer Patterns do?

Creates minimal Action Mailer classes with bundled notification patterns following 37signals conventions. Mailer Patterns is an agent skill from dilolabs/nosia. Creates minimal Action Mailer classes with bundled notification patterns following 37signals conventions.

When should I use Mailer Patterns?

Mailer Patterns fits situations like: creating notification systems; user mentions mailers; transactional messages; (use event-tracking).

How do I install Mailer Patterns in Claude Code?

Run `npx skills add dilolabs/nosia --skill mailer-patterns -a claude-code`. Or copy the skill folder (.vibe/skills/mailer-patterns in dilolabs/nosia) into .claude/skills/mailer-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Mailer Patterns in Codex?

Run `npx skills add dilolabs/nosia --skill mailer-patterns -a codex`. Or copy the skill folder (.vibe/skills/mailer-patterns in dilolabs/nosia) into .agents/skills/mailer-patterns in your project. Codex loads it when a task matches its description.

Can I use Mailer Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dilolabs/nosia --skill mailer-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mailer-patterns, .gemini/skills/mailer-patterns, .github/skills/mailer-patterns and .opencode/skills/mailer-patterns in your project.

What does Mailer Patterns need to run?

Going by SKILL.md and its folder, Mailer Patterns needs the command-line tools its instructions call (rails). Compatibility (from SKILL.md): Ruby 3.3+, Rails 8.0+, Action Mailer, Solid Queue.

Does Mailer Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Mailer Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mailer Patterns use?

Mailer Patterns is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mailer Patterns use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.2k tokens, read only when the agent opens those files.

What are the alternatives to Mailer Patterns?

Skills that share tags, products or a category with Mailer Patterns: Foundatio (FoundatioFx/Foundatio, 2.1k stars), Code Engine Specialist (IBM/CodeEngine, 117 stars), Polylith Base Creation (DavidVujic/python-polylith, 553 stars) and Agent Signal Pipeline (lobehub/lobehub, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mailer Patterns?

dilolabs (a GitHub organization) maintains it in dilolabs/nosia, which has 213 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on September 9, 2026.

Source: dilolabs/nosia on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.