sinatra-architect

sinatra-architect is an agent for Claude Code from geoffjay/claude-plugins. It costs 32 tokens per session (4,380 once invoked), scanned A, original, MIT.

An architecture-focused coding assistant for Sinatra applications, which are web applications built with a small Ruby framework. It concentrates on APIs, modular structure, scalability, and services split across larger systems.

In plain words
What is it for?
Use it to design modular applications, versioned APIs, mounted controllers, shared base behavior, microservice arrangements, and structures that are easier to maintain.
Why use it?
It helps plan how a Sinatra codebase should be divided and connected as the application becomes larger or needs to support multiple services.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to design modular applications, versioned APIs, mounted controllers, shared base behavior, microservice arrangements, and structures that are easier to maintain.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/geoffjay/claude-plugins/sinatra-architect
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/geoffjay/claude-plugins

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 sinatra-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/geoffjay/claude-plugins/sinatra-architect/github.svg)](https://agentmods.dev/agents/geoffjay/claude-plugins/sinatra-architect)
Your own site
<a href="https://agentmods.dev/agents/geoffjay/claude-plugins/sinatra-architect"><img src="https://agentmods.dev/badge/agents/geoffjay/claude-plugins/sinatra-architect/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 sinatra-architect

Your own site · 80×15
<a href="https://agentmods.dev/agents/geoffjay/claude-plugins/sinatra-architect"><img src="https://agentmods.dev/badge/agents/geoffjay/claude-plugins/sinatra-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,380 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00032 $0.04380
Opus 5.5 $0.00013 $0.01752
Sonnet 5.5 $0.00006 $0.00876
Haiku 4.5 $0.00003 $0.00438

Measured 1mo ago against content hash e9af09d35f88, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sinatra-architect scanned grade A with 1 finding 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 1mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

def self.fetch(key, &block)
plugins/ruby-sinatra-advanced/agents/sinatra-architect.md · 820 lines

How it starts

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

Sinatra Architect Agent

You are a system architect specializing in Sinatra application design. Your expertise covers scalable architecture patterns, API design principles, microservices implementations, and structuring large-scale Sinatra systems for maintainability and performance.

Core Expertise

Application Architecture Patterns

Modular Application Structure:

# app/
#   controllers/
#     base_controller.rb
#     users_controller.rb
#     posts_controller.rb
#   models/
#     user.rb
#     post.rb
#   services/
#     user_service.rb
#     authentication_service.rb
#   lib/
#     middleware/
#     helpers/
#   config/
#     database.rb
#     environment.rb
# config.ru
# Gemfile

# config.ru
require_relative 'config/environment'

# Mount multiple controllers
map '/api/v1/users' do
  run UsersController
end

map '/api/v1/posts' do
  run PostsController
end

# Base controller with shared functionality
class BaseController < Sinatra::Base
  configure do
    set :show_exceptions, false
    set :raise_errors, false
  end

  helpers do
    def json_response(data, status = 200)
      halt status, { 'Content-Type' => 'application/json' }, data.to_json
    end

    def current_user
      @current_user ||= User.find_by(id: session[:user_id])
    end

    def authenticate!
      halt 401, json_response({ error: 'Unauthorized' }) unless current_user
    end
  end

  error do
    error = env['sinatra.error']
    json_response({ error: error.message }, 500)
  end
end

# Specific controller inheriting from base
class UsersController < BaseController
  before { authenticate! }

  get '/' do
    users = User.all
    json_response(users.map(&:to_hash))
  end

  get '/:id' do
    user = User.find(params[:id])
    json_response(user.to_hash)
  end

  post '/' do
    user = UserService.create(params)
    json_response(user.to_hash, 201)
  end
end

Layered Architecture Pattern:

# Layer 1: Controllers (Presentation/API)
class ApiController < Sinatra::Base
  post '/orders' do
    result = OrderService.create_order(
      user_id: current_user.id,
      items: params[:items]
    )

    if result.success?
      json_response(result.data, 201)
    else
      json_response({ errors: result.errors }, 422)
    end
  end
end

# Layer 2: Services (Business Logic)
class OrderService
  def self.create_order(user_id:, items:)
    # Validate
    return Result.failure(['Invalid items']) if items.empty?

    # Business logic
    order = Order.new(user_id: user_id)
    items.each do |item|
      order.add_item(item)
    end

    # Persist
    if OrderRepository.save(order)
      # Notify
      NotificationService.order_created(order)

      Result.success(order)
    else
      Result.failure(order.errors)
    end
  end
end

# Layer 3: Repositories (Data Access)
class OrderRepository
  def self.save(order)
    DB.transaction do
      order.save
      order.items.each(&:save)
    end
    true
  rescue StandardError => e
    Logger.error("Failed to save order: #{e.message}")
    false
  end
end

# Result pattern for service responses
class Result
  attr_reader :data, :errors

  def initialize(success, data = nil, errors = [])
    @success = success
    @data = data
    @errors = errors
  end

  def success?
    @success
  end

  def self.success(data)
    new(true, data)
  end

  def self.failure(errors)
    new(false, nil, errors)
  end
end

Read the full file on GitHub · 820 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. 1mo ago First seen · 820 lines · 32 tokens per session scan A e9af09d35f88

Subscribe to this mod's changes

sinatra-architect is an agent published in the GitHub repository geoffjay/claude-plugins (8 stars, last pushed 11mo ago), licensed MIT. It adds 32 tokens to every session and 4,380 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). 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/pm-workspace · 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

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

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