rails-pagination-kaminari

rails-pagination-kaminari is a skill for Claude Code, Codex from Shoebtamboli/rails_claude_skills. It costs 89 tokens per session (3,884 once invoked), scanned A, original, MIT.

Guidance for adding page-by-page navigation to Ruby on Rails applications with Kaminari. Pagination splits a long list of records, such as users or posts, into smaller pages or supports loading them incrementally.

In plain words
What is it for?
Use it to paginate database records, API endpoints, arrays, or custom collections, including custom page sizes, themes, and infinite-scroll interfaces.
Why use it?
It helps keep large lists and API responses manageable and provides ready-made navigation links that can be customized.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to paginate database records, API endpoints, arrays, or custom collections, including custom page sizes, themes, and infinite-scroll interfaces.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shoebtamboli/rails_claude_skills/rails-pagination-kaminari
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.

Any agent
npx skills add Shoebtamboli/rails_claude_skills --skill rails-pagination-kaminari
Clone the repo
git clone --depth 1 https://github.com/Shoebtamboli/rails_claude_skills

Made for: Claude Code, Codex.

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-pagination-kaminari

README.md
[![agentmods](https://agentmods.dev/badge/skills/shoebtamboli/rails_claude_skills/rails-pagination-kaminari/github.svg)](https://agentmods.dev/skills/shoebtamboli/rails_claude_skills/rails-pagination-kaminari)
Your own site
<a href="https://agentmods.dev/skills/shoebtamboli/rails_claude_skills/rails-pagination-kaminari"><img src="https://agentmods.dev/badge/skills/shoebtamboli/rails_claude_skills/rails-pagination-kaminari/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 rails-pagination-kaminari

Your own site · 80×15
<a href="https://agentmods.dev/skills/shoebtamboli/rails_claude_skills/rails-pagination-kaminari"><img src="https://agentmods.dev/badge/skills/shoebtamboli/rails_claude_skills/rails-pagination-kaminari.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,884 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.00089 $0.03884
Opus 5 $0.00044 $0.01942
Sonnet 5 $0.00018 $0.00777
Haiku 4.5 $0.00009 $0.00388

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

Security

Grade A, and why

rails-pagination-kaminari 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 12d 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.

lib/generators/claude/skills_library/rails-pagination-kaminari/SKILL.md · 623 lines

How it starts

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

Rails Pagination with Kaminari

Kaminari is a scope and engine-based pagination library that provides a clean, powerful, customizable paginator for Rails applications. It's non-intrusive, chainable with ActiveRecord, and highly customizable.

Quick Setup

# Add to Gemfile
bundle add kaminari

# Generate configuration file (optional)
rails g kaminari:config

# Generate view templates for customization (optional)
rails g kaminari:views default

Basic Usage

Controller Pagination

# app/controllers/posts_controller.rb
class PostsController < ApplicationController
  def index
    @posts = Post.order(:created_at).page(params[:page])
    # Returns 25 items per page by default
  end
end

View Helper

<!-- app/views/posts/index.html.erb -->
<%= paginate @posts %>

That's it! Kaminari automatically adds pagination links.

Core Methods

Page Scope

# Basic pagination
User.page(1)                    # First page, 25 items
User.page(params[:page])        # Dynamic page from params

# Custom per-page
User.page(1).per(50)            # 50 items per page

# Chaining with scopes
User.active.order(:name).page(params[:page]).per(20)

# With associations
User.includes(:posts).page(params[:page])

Pagination Metadata

users = User.page(2).per(20)

users.current_page      #=> 2
users.total_pages       #=> 10
users.total_count       #=> 200
users.limit_value       #=> 20
users.first_page?       #=> false
users.last_page?        #=> false
users.next_page         #=> 3
users.prev_page         #=> 1
users.out_of_range?     #=> false

Configuration

Global Configuration

# config/initializers/kaminari_config.rb
Kaminari.configure do |config|
  config.default_per_page = 25        # Default items per page
  config.max_per_page = 100           # Maximum allowed per page
  config.max_pages = nil              # Maximum pages (nil = unlimited)
  config.window = 4                   # Inner window size
  config.outer_window = 0             # Outer window size
  config.left = 0                     # Left outer window
  config.right = 0                    # Right outer window
  config.page_method_name = :page     # Method name (change if conflicts)
  config.param_name = :page           # URL parameter name
end

Read the full file on GitHub · 623 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 623 lines · 89 tokens per session scan A d76bed3ca0de

Subscribe to this mod's changes

rails-pagination-kaminari is a skill published in the GitHub repository Shoebtamboli/rails_claude_skills (16 stars, last pushed 2mo ago), licensed MIT. It adds 89 tokens to every session and 3,884 once invoked, about $0.0004 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-30.

Related

Other skills, from other repositories

rails-load-defaults

Incrementally upgrade Rails config.loaddefaults by walking through each newframeworkdefaults config one at a time. Use this skill whenever the user mentions loaddefaults upgrade, newframeworkdefaults, framework defaults, or wants to bring their Rails app's default configuration up to match their Rails version. Also…

ombulabs/claude-code_rails-load-defaults-skill · 120 tokens

layered-rails

Write, refactor, and review Rails code using layered architecture principles from "Layered Design for Ruby on Rails Applications". Use when writing or refactoring Rails code — models, controllers, services, jobs, mailers, policies, forms, query objects, presenters, view components, state machines, serializers, or…

palkan/layered-rails-skills · 225 tokens

ruby-on-rails

Comprehensive Ruby on Rails 8.1 best-practices skill covering MVC, Active Record, routing, views, background jobs, storage, security, testing, performance, Kamal/Thruster deployment, and engines/generators. Use when the user mentions Rails, Ruby on Rails, ActiveRecord, ActiveJob, ActionMailer, ActionCable, Active…

display-design-studio/skills · 151 tokens

rails-expert

Rails 7+ specialist that optimizes Active Record queries with includes/eagerload, implements Turbo Frames and Turbo Streams for partial page updates, configures Action Cable for WebSocket connections, sets up Sidekiq workers for background job processing, and writes comprehensive RSpec test suites. Use when building…

Jeffallan/claude-skills · 104 tokens

new

Create a new project to start development quickly.

clacky-ai/openclacky · 10 tokens

ruby-expert

Expert-level Ruby development with Rails, modern features, testing, and best practices. Use when the user mentions Ruby on Rails, RSpec, gem, Sinatra, or metaprogramming, or when the task involves Ruby 3+ Features, Object-Oriented, Functional Features, or Pattern Matching.

personamanagmentlayer/pcl · 64 tokens