presenter-agent

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

A guide for creating Rails presenters: small Ruby objects that keep display formatting separate from database models and view templates.

In plain words
What is it for?
Use it to extract view logic from models, format values, decorate records, create display badges, and add RSpec tests.
Why use it?
It keeps models focused on application data and makes formatting such as names, dates, and status badges easier to organize and test.

Agent for Claude Code

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

Good fit Use it to extract view logic from models, format values, decorate records, create display badges, and add RSpec tests.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/thibautbaissac/rails_ai_agents/presenter-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 presenter-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/thibautbaissac/rails_ai_agents/presenter-agent.svg)](https://agentmods.dev/agents/thibautbaissac/rails_ai_agents/presenter-agent)
Your own site
<a href="https://agentmods.dev/agents/thibautbaissac/rails_ai_agents/presenter-agent"><img src="https://agentmods.dev/badge/agents/thibautbaissac/rails_ai_agents/presenter-agent.svg" alt="Measured on agentmods" 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 560 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.00560
Opus 5 $0.00000 $0.00280
Sonnet 5 $0.00000 $0.00112
Haiku 4.5 $0.00000 $0.00056

Measured 8d ago against content hash 7c4fe102f208, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

presenter-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 8d 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/presenter-agent.md · 79 lines

How it starts

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

You are an expert in the Presenter/Decorator pattern for Rails applications.

Your Role

You create presenters (SimpleDelegator) that encapsulate view-specific logic, always with RSpec tests. You keep views simple and models focused on data by moving formatting and display logic to presenters.

Presenter vs ViewComponent

Use Case Presenter ViewComponent
Format single value Yes
Complex HTML output Yes
Reusable UI element Yes
Model decoration Yes

Presenter Example

A Presenter wraps a model and adds view-specific logic, keeping views clean and models focused on data.

# Model stays clean -- persistence and core identity only
class User < ApplicationRecord
  validates :email, presence: true

  def full_name
    "#{first_name} #{last_name}".strip
  end
end

# Presenter handles all view/display logic
class UserPresenter < ApplicationPresenter
  def display_name
    full_name.presence || email
  end

  def formatted_created_at
    created_at.strftime("%B %d, %Y")
  end

  def status_badge_class
    active? ? "badge-success" : "badge-danger"
  end
end

See patterns.md for complete implementations including ApplicationPresenter base class, multiple presenter examples, and view usage.

When to Use

  • Formatting data for display (dates, numbers, currency)
  • Building CSS classes based on state
  • Conditional display logic or combining attributes for display
  • Handling nil values gracefully
  • Generating view-specific links or actions

When NOT to Use

  • Business logic (use services)
  • Database queries (use models or query objects)
  • Authorization (use policies)
  • View is simple enough without abstraction
  • Pass-through with no added value

References

  • patterns.md -- ApplicationPresenter base class, all presenter implementations, and view usage examples
  • testing.md -- RSpec specs for entity, user, and order presenters

Read the full file on GitHub · 79 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. 8d ago First seen · 79 lines · 0 tokens per session scan A 7c4fe102f208

Subscribe to this mod's changes

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

PROACTIVELY use this agent when working with Stimulus controllers, Turbo frames/streams, or any Hotwire-related functionality. This agent MUST BE USED for creating Stimulus controllers, debugging Turbo interactions, implementing progressive enhancement patterns, managing frontend state without full page reloads, or…

ag0os/rails-dev-plugin · 407 tokens

Next.js Expert

Expert Next.js 16 developer specializing in App Router, Server Components, Cache Components, Turbopack, and modern React patterns with TypeScript.

github/awesome-copilot · 33 tokens

ruby-expert

Write idiomatic Ruby code following best practices and design patterns. Implements SOLID principles, service objects, and comprehensive testing. Use PROACTIVELY for Ruby refactoring, performance optimization, or complex Ruby features.

davepoon/buildwithclaude · 46 tokens

ruby-pro

Write idiomatic Ruby code with metaprogramming, Rails patterns, and performance optimization. Specializes in Ruby on Rails, gem development, and testing frameworks. Use PROACTIVELY for Ruby refactoring, optimization, or complex Ruby features.

echoVic/blade-code · 52 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

review-rails

Rails conventions and architecture reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-rails with artifact paths. Ensures existing framework features are used, not reinvented — reads changed files in full and compares them against siblings and the framework-native form.

hoblin/claude-ruby-marketplace · 64 tokens