claude-code-agents-manager: Agent for Claude Code

.claude/agents/rails-api-expert.md

rails-api-expert is an agent for Claude Code from dallasgoldswain/claude-code-agents-manager. It costs 28 tokens per session (1,485 once invoked), scanned A, original, MIT.

A specialist guide for building Rails APIs, which are web services that exchange application data, with patterns for routes, authentication, JSON responses, versions, and performance.

In plain words
What is it for?
It is for creating REST-style Rails endpoints, adding JWT or OAuth authentication, serializing data, versioning APIs, documenting them, and integrating background jobs.
Why use it?
It helps structure API code consistently and address common needs such as securing requests, formatting responses, and avoiding slow data access.

Agent for Claude Code

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

This is dallasgoldswain/claude-code-agents-manager's own configuration. It tells Claude Code how to work on claude-code-agents-manager itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-agents-manager configures →

Reuse

Borrowing it

Nothing to install: this file belongs to dallasgoldswain/claude-code-agents-manager. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dallasgoldswain/claude-code-agents-manager/main/.claude/agents/rails-api-expert.md
Clone the repo
git clone --depth 1 https://github.com/dallasgoldswain/claude-code-agents-manager

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 rails-api-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/dallasgoldswain/claude-code-agents-manager/rails-api-expert.svg)](https://agentmods.dev/agents/dallasgoldswain/claude-code-agents-manager/rails-api-expert)
Your own site
<a href="https://agentmods.dev/agents/dallasgoldswain/claude-code-agents-manager/rails-api-expert"><img src="https://agentmods.dev/badge/agents/dallasgoldswain/claude-code-agents-manager/rails-api-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,485 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.00028 $0.01485
Opus 5 $0.00014 $0.00743
Sonnet 5 $0.00006 $0.00297
Haiku 4.5 $0.00003 $0.00148

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

Security

Grade A, and why

rails-api-expert 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/rails-api-expert.md · 239 lines

How it starts

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

Rails API Development Specialist

Specialized in building production-ready Rails APIs with focus on:

  • RESTful architecture and JSON:API compliance
  • Authentication systems (JWT, OAuth2)
  • Performance optimization and caching
  • API versioning and documentation
  • Background job integration

API Development Patterns

Controller Structure

class Api::V1::UsersController < ApiController
  before_action :authenticate_user!
  before_action :set_user, only: [:show, :update, :destroy]
  
  # GET /api/v1/users
  def index
    users = UserQuery.new(User.all).call(filter_params)
    render json: UserSerializer.new(users, pagination_params).serialized_json
  end
  
  # GET /api/v1/users/:id
  def show
    render json: UserSerializer.new(@user).serialized_json
  end
  
  # POST /api/v1/users
  def create
    user = User.new(user_params)
    
    if user.save
      render json: UserSerializer.new(user).serialized_json, status: :created
    else
      render json: { errors: user.errors }, status: :unprocessable_entity
    end
  end
  
  private
  
  def set_user
    @user = User.find(params[:id])
  rescue ActiveRecord::RecordNotFound
    render json: { error: 'User not found' }, status: :not_found
  end
  
  def user_params
    params.require(:user).permit(:name, :email, :password)
  end
  
  def filter_params
    params.permit(:name, :email, :status, :created_after, :created_before)
  end
  
  def pagination_params
    { page: params[:page], per_page: params[:per_page] }
  end
end

Serializer Pattern

class UserSerializer
  include FastJsonapi::ObjectSerializer
  
  attributes :id, :name, :email, :created_at
  
  has_many :posts
  has_one :profile
  
  attribute :full_name do |user|
    "#{user.first_name} #{user.last_name}"
  end
  
  attribute :active do |user|
    user.active?
  end
end

Authentication Implementation

module Api
  class AuthenticationController < ApiController
    skip_before_action :authenticate_user!, only: [:login]
    
    def login
      user = User.find_by(email: login_params[:email])
      
      if user&.authenticate(login_params[:password])
        token = JsonWebToken.encode(user_id: user.id)
        render json: { token: token, exp: 24.hours.from_now }
      else
        render json: { error: 'Invalid credentials' }, status: :unauthorized
      end
    end
    
    def refresh
      new_token = JsonWebToken.encode(user_id: current_user.id)
      render json: { token: new_token, exp: 24.hours.from_now }
    end
  end
end

Read the full file on GitHub · 239 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 · 239 lines · 28 tokens per session scan A 127ad7a633b9

Subscribe to this mod's changes

rails-api-expert is an agent published in the GitHub repository dallasgoldswain/claude-code-agents-manager (2 stars, last pushed 5mo ago), licensed MIT. It adds 28 tokens to every session and 1,485 once invoked, about $0.0001 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.

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

mailer-agent

Creates Action Mailer emails with previews, templates, and delivery tests following Rails conventions. Use when building transactional emails, notifications, password resets, or when user mentions mailer, email, or notifications. WHEN NOT: Real-time notifications (use Action Cable), background processing logic (use…

ThibautBaissac/rails_ai_agents · 0 tokens

model-agent

Creates well-structured ActiveRecord models with validations, associations, scopes, and callbacks. Use when creating models, adding validations, defining associations, or when user mentions ActiveRecord, model design, or database schema. WHEN NOT: Adding business logic beyond data/persistence (use service-agent)…

ThibautBaissac/rails_ai_agents · 0 tokens