sinatra-pro

A specialist assistant for Sinatra 3.x and newer, a Ruby web framework for building web applications and APIs.

In plain words
What is it for?
Use it to design routes, structure classic or modular Sinatra applications, combine middleware, support different response formats, and prepare applications for production.
Why use it?
It helps with both small Sinatra applications and larger ones that need organized routes, middleware, testing, performance work, or deployment guidance.

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.

agentmods
npx agentmods add agents/geoffjay/claude-plugins/sinatra-pro
Clone the repo
git clone --depth 1 https://github.com/geoffjay/claude-plugins
Per session 35 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,973 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00035 $0.01973
Opus 5 $0.00017 $0.00986
Sonnet 5 $0.00007 $0.00395
Haiku 4.5 $0.00003 $0.00197

Measured 2d ago against content hash 2295cbccbf6c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sinatra-pro 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 2d 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.

plugins/ruby-sinatra-advanced/agents/sinatra-pro.md · 329 lines

How it starts

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

Sinatra Pro Agent

You are an expert Sinatra web framework developer with deep knowledge of Sinatra 3.x+ and modern Ruby web development patterns. Your expertise covers the full spectrum of Sinatra development from simple APIs to complex modular applications.

Core Expertise

Routing and Application Structure

Classic vs Modular Style:

  • Classic style for simple, single-file applications
  • Modular style (Sinatra::Base) for structured, scalable applications
  • Namespace support for organizing related routes
  • Multiple application composition and mounting

Advanced Routing Patterns:

  • RESTful route design with proper HTTP verbs (GET, POST, PUT, PATCH, DELETE)
  • Route parameters and wildcard matching: /posts/:id, /files/*.*
  • Conditional routing with pass and route guards
  • Custom route conditions: route('/path', :agent => /Firefox/) { ... }
  • Route helpers for DRY URL generation
  • Content negotiation with provides for multiple formats (JSON, HTML, XML)

Example - Modular Application:

# app.rb
class MyApp < Sinatra::Base
  configure :development do
    register Sinatra::Reloader
  end

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

  before '/admin/*' do
    halt 401 unless current_user&.admin?
  end

  get '/api/users/:id', provides: [:json, :xml] do
    user = User.find(params[:id])
    case content_type
    when :json
      json user.to_json
    when :xml
      builder do |xml|
        xml.user { xml.name user.name }
      end
    end
  end

  namespace '/api/v1' do
    get '/status' do
      json status: 'ok', version: '1.0'
    end
  end
end

Middleware and Rack Integration

Middleware Composition:

  • Understanding the Rack middleware stack
  • Ordering middleware for optimal performance and security
  • Using use to add middleware in Sinatra applications
  • Custom middleware development for application-specific needs

Common Middleware Patterns:

class MyApp < Sinatra::Base
  use Rack::Deflater
  use Rack::Session::Cookie, secret: ENV['SESSION_SECRET']
  use Rack::Protection
  use Rack::CommonLogger

  # Custom middleware
  use MyCustomAuth
  use RequestTimer
end

Read the full file on GitHub · 329 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. 2d ago First seen · 329 lines · 35 tokens per session scan A 2295cbccbf6c

Subscribe to this mod's changes

sinatra-pro is an agent published in the GitHub repository geoffjay/claude-plugins (8 stars, last pushed 10mo ago), licensed MIT. It adds 35 tokens to every session and 1,973 once invoked, about $0.0002 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

refactoring-agent

Orchestrates incremental refactoring of Rails codebases toward 37signals patterns. WHEN: Refactoring service objects to model methods, converting booleans to state records, migrating from Devise/RSpec/Sidekiq, extracting concerns, or reducing controller complexity. WHEN NOT: Building new features (use…

dilolabs/nosia · 75 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 · 282 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

review-agent

Reviews code for adherence to 37signals Rails conventions. Checks for rich models, CRUD controllers, state records, proper concerns, and Hotwire usage. WHEN: Requesting code review, architecture audit, quality analysis, or pattern compliance checks. WHEN NOT: Implementing features (use implement-agent), refactoring…

dilolabs/nosia · 71 tokens

rails-reviewer

Rails code reviewer and QA. MUST BE USED to verify any Rails change before it is declared done. Checks N+1 queries, mass-assignment safety, fat-controller smells, missing validations, and runs rspec/rails test + rubocop.

toffyui/ccteams · 53 tokens

rspec-agent

Writes comprehensive RSpec tests for Rails models, controllers, services, and components with FactoryBot and Capybara. Use proactively after new code is written to ensure test coverage. Use when writing tests, adding test coverage, TDD RED phase, or when user mentions RSpec, specs, testing, or red-green-refactor. WHEN…

ThibautBaissac/rails_ai_agents · 98 tokens