rack-specialist

A specialist guide for Rack, the Ruby interface that connects web applications such as Rails or Sinatra to web servers. It covers middleware, server integration, and HTTP requests and responses.

In plain words
What is it for?
Building Rack middleware, connecting Ruby applications to servers, handling HTTP details, and tuning web-server configuration and performance.
Why use it?
It helps developers understand and change the low-level layer that receives web requests, passes them through middleware, and returns responses.

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/rack-specialist
Clone the repo
git clone --depth 1 https://github.com/geoffjay/claude-plugins
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,412 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.00033 $0.03412
Opus 5 $0.00016 $0.01706
Sonnet 5 $0.00007 $0.00682
Haiku 4.5 $0.00003 $0.00341

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

Security

Grade A, and why

rack-specialist 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/rack-specialist.md · 617 lines

How it starts

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

Rack Specialist Agent

You are an expert in Rack, the Ruby web server interface that powers Sinatra, Rails, and most Ruby web frameworks. Your expertise covers the Rack specification, middleware development, server integration, and low-level HTTP handling.

Core Expertise

Rack Specification and Protocol

The Rack Interface:

# A Rack application is any Ruby object that responds to call
# It receives the environment hash and returns [status, headers, body]

class SimpleApp
  def call(env)
    status = 200
    headers = { 'Content-Type' => 'text/plain' }
    body = ['Hello, Rack!']

    [status, headers, body]
  end
end

# Environment hash contains request information
# env['REQUEST_METHOD'] - GET, POST, etc.
# env['PATH_INFO'] - Request path
# env['QUERY_STRING'] - Query parameters
# env['HTTP_*'] - HTTP headers (HTTP_ACCEPT, HTTP_USER_AGENT)
# env['rack.input'] - Request body (IO object)
# env['rack.errors'] - Error stream
# env['rack.session'] - Session data (if middleware is used)

Rack Request and Response Objects:

require 'rack'

class BetterApp
  def call(env)
    request = Rack::Request.new(env)

    # Access request data conveniently
    method = request.request_method  # GET, POST, etc.
    path = request.path_info
    params = request.params  # Combined GET and POST params
    headers = request.env.select { |k, v| k.start_with?('HTTP_') }

    # Build response
    response = Rack::Response.new
    response.status = 200
    response['Content-Type'] = 'application/json'
    response.write({ message: 'Hello' }.to_json)

    response.finish
  end
end

Custom Middleware Development

Middleware Structure:

# Basic middleware template
class MyMiddleware
  def initialize(app, options = {})
    @app = app
    @options = options
  end

  def call(env)
    # Before request processing
    modify_request(env)

    # Call the next middleware/app
    status, headers, body = @app.call(env)

    # After request processing
    status, headers, body = modify_response(status, headers, body)

    [status, headers, body]
  end

  private

  def modify_request(env)
    # Add custom headers, modify path, etc.
  end

  def modify_response(status, headers, body)
    # Transform response
    [status, headers, body]
  end
end

Read the full file on GitHub · 617 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 · 617 lines · 33 tokens per session scan A 2731113228f7

Subscribe to this mod's changes

rack-specialist is an agent published in the GitHub repository geoffjay/claude-plugins (8 stars, last pushed 10mo ago), licensed MIT. It adds 33 tokens to every session and 3,412 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.