Performance Check
ZeroDeng01/sublinkPro
Checklist for reviewing code changes that touch queries, APIs, rendering, caching or algorithms for performance, scalability and resource-usage problems.
Identifies and fixes Rails performance issues including N+1 queries, slow queries, and memory problems.
$ npx skills add ThibautBaissac/rails_ai_agents --skill performance-optimization -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ThibautBaissac/rails_ai_agents performance-optimization --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/performance-optimization .claude/skills/performance-optimization && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "performance-optimization" agent skill from https://github.com/ThibautBaissac/rails_ai_agents/tree/main/.agents/skills/performance-optimization into .claude/skills/performance-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performance-optimization", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ThibautBaissac/rails_ai_agents/tree/main/.agents/skills/performance-optimizationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ThibautBaissac/rails_ai_agents --skill performance-optimization -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ThibautBaissac/rails_ai_agents performance-optimization --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/performance-optimization .agents/skills/performance-optimization && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "performance-optimization" agent skill from https://github.com/ThibautBaissac/rails_ai_agents/tree/main/.agents/skills/performance-optimization into .agents/skills/performance-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performance-optimization", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ThibautBaissac/rails_ai_agents --skill performance-optimization -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ThibautBaissac/rails_ai_agents performance-optimization --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/performance-optimization .cursor/skills/performance-optimization && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "performance-optimization" agent skill from https://github.com/ThibautBaissac/rails_ai_agents/tree/main/.agents/skills/performance-optimization into .cursor/skills/performance-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performance-optimization", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ThibautBaissac/rails_ai_agents.git --path .agents/skills/performance-optimization--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ThibautBaissac/rails_ai_agents --skill performance-optimization -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ThibautBaissac/rails_ai_agents performance-optimization --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/performance-optimization .gemini/skills/performance-optimization && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "performance-optimization" agent skill from https://github.com/ThibautBaissac/rails_ai_agents/tree/main/.agents/skills/performance-optimization into .gemini/skills/performance-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performance-optimization", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ThibautBaissac/rails_ai_agents performance-optimizationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ThibautBaissac/rails_ai_agents --skill performance-optimization -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/performance-optimization .github/skills/performance-optimization && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "performance-optimization" agent skill from https://github.com/ThibautBaissac/rails_ai_agents/tree/main/.agents/skills/performance-optimization into .github/skills/performance-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performance-optimization", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ThibautBaissac/rails_ai_agents --skill performance-optimization -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ThibautBaissac/rails_ai_agents performance-optimization --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/performance-optimization .opencode/skills/performance-optimization && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "performance-optimization" agent skill from https://github.com/ThibautBaissac/rails_ai_agents/tree/main/.agents/skills/performance-optimization into .opencode/skills/performance-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performance-optimization", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
performance-optimizationIdentifies and fixes Rails performance issues including N+1 queries, slow queries, and memory problems.
Performance Optimization is an agent skill from ThibautBaissac/rails_ai_agents. Identifies and fixes Rails performance issues including N+1 queries, slow queries, and memory problems. Use when optimizing queries, fixing N+1 issues, improving response times, or when user mentions performance, slow, optimization, or Bullet gem. WHEN NOT: Caching-specific patterns (use caching-strategies), adding new features, or general code quality improvements unrelated to speed.
Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/memory-and-profiling.md`, `references/n-plus-one.md` and `references/query-optimization.md`).
It sits in Development, covering Performance optimization, Query optimization and Backend development. The repository describes itself as: Specialized AI skills, agents, rules and hooks for modern Rails AI driven-development + Spec-Driven-Development kit + MCP. The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 03622f2. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadGrepGlobBashFrom allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are ruby).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Performance Optimization loads about 1.2k tokens when it runs, and up to ~3.6k if it reads all its reference files. Until then it costs about 103 tokens; SKILL.md has 452 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Read, Grep, Glob, BashAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from ThibautBaissac/rails_ai_agents at commit 03622f2, republished under its MIT licence (© ThibautBaissac). 452 words, ~1,209 tokens.
.claude/skills/performance-optimization/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.Performance optimization focuses on:
# Gemfile
group :development, :test do
gem 'bullet' # N+1 detection
gem 'rack-mini-profiler' # Request profiling
gem 'memory_profiler' # Memory analysis
endN+1 queries occur when code loads a collection then makes a separate query for each associated record. The Bullet gem detects these automatically. Fix them with eager loading via includes, preload, or eager_load.
| Method | Use When |
|---|---|
includes | Most cases (Rails chooses best strategy) |
preload | Forcing separate queries, large datasets |
eager_load | Filtering on association, need single query |
joins | Only need to filter, don't need association data |
Key patterns: Bullet configuration, eager loading methods, scoped eager loading, counter caches, N+1 specs with query count assertions.
See references/n-plus-one.md for all code examples and patterns.
Optimize queries by selecting only needed columns, using batch processing for large datasets, and choosing efficient existence checks.
| Pattern | Bad | Good |
|---|---|---|
| Column selection | User.all.map(&:name) | User.pluck(:name) |
| Large iterations | Event.all.each { ... } | Event.find_each { ... } |
| Existence checks | .any? / .present? | .exists? |
| Collection size | .length (loads all) | .size (smart) |
Add indexes for: foreign keys, columns in WHERE/ORDER BY/JOIN clauses, and unique constraints. Use composite indexes for multi-column queries. Use partial indexes for filtered subsets.
Use Event.where(...).explain(:analyze) to inspect query plans. Set up slow query logging via ActiveSupport::Notifications to catch queries over a threshold.
See references/query-optimization.md for all code examples and patterns.
Use memory_profiler to detect memory issues. Prefer pluck over loading full AR objects, use find_each for streaming, and use update_all / in_batches for bulk operations.
Provides per-request profiling in development. Shows query count, timing, and flamegraphs (with stackprof gem). Access via the profiler badge or ?pp=flamegraph.
See references/memory-and-profiling.md for all code examples and patterns.
| Problem | Solution |
|---|---|
| N+1 on belongs_to | includes(:association) |
| N+1 on has_many | includes(:association) |
| Slow COUNT | Add counter_cache |
| Loading all columns | Use select or pluck |
| Large dataset iteration | Use find_each |
| Missing index on FK | Add index on *_id columns |
| Slow WHERE clause | Add index on filtered column |
| Loading unused associations | Remove from includes |
explain(:analyze), check slow query logs, profile memory© ThibautBaissac, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files (references) in .agents/skills/performance-optimization of ThibautBaissac/rails_ai_agents.
Open the folder on GitHubat commit 03622f2
Performance Optimization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Performance Optimization this skillThibautBaissac/rails_ai_agents | 665 | — | ~1.2k | Automated safety check: Notes | MIT | |
| Performance CheckZeroDeng01/sublinkPro | 1.7k | — | ~1.8k | Automated safety check: Pass | MIT | |
| Performancekid-sid/claude-spellbook | 189 | — | ~3.8k | Automated safety check: Pass | MIT | |
| Keybase RPC Log Analysiskeybase/client | 9.3k | — | ~3k | Automated safety check: Pass | BSD-3-Clause | |
| Groovy 5 Developer Guideapache/grails-core | 2.9k | — | ~3k | Automated safety check: Pass | Apache-2.0 | |
| WooCommerce Backend Conventionswoocommerce/woocommerce | 11k | 1 repos | ~614 | Automated safety check: Pass | Custom licence |
ZeroDeng01/sublinkPro
Checklist for reviewing code changes that touch queries, APIs, rendering, caching or algorithms for performance, scalability and resource-usage problems.
kid-sid/claude-spellbook
A skill your agent uses when diagnosing a slow HTTP endpoint or high-latency service — profiling, adding an application-level cache, offloading CPU-bound work to threads or workers, or defining a…
keybase/client
Captures a clean Keybase service log and analyzes it for redundant, duplicated or looping RPCs, then checks whether a caching fix reduced the calls.
apache/grails-core
Guidance for Groovy 5 work in Grails projects: syntax, closures, traits, DSLs, metaprogramming, Spock tests, static compilation and Java 21 integration.
woocommerce/woocommerce
Guides agents writing or changing WooCommerce backend PHP so new classes, hooks and unit tests follow the project's conventions.
ben-manes/caffeine
Searches synthetic workloads for cases where Caffeine's adaptive eviction policy falls short of its achievable hit rate, then classifies each gap by cause.
ThibautBaissac/rails_ai_agents
Audits Rails application accessibility against WCAG 2.2 Level AA, detects violations with axe-core / Lighthouse / Pa11y, and reports remediation guidance for ERB views, ViewComponents, Stimulus…
ThibautBaissac/rails_ai_agents
Implements real-time features with Action Cable and WebSockets.
ThibautBaissac/rails_ai_agents
Configures Active Storage for file uploads with variants and direct uploads.
ThibautBaissac/rails_ai_agents
Implements authentication using Rails 8 built-in generator. An agent skill from ThibautBaissac/rails_ai_agents.
ThibautBaissac/rails_ai_agents
Implements Rails caching patterns for performance optimization.
ThibautBaissac/rails_ai_agents
Implements internationalization with Rails I18n for multi-language support.
Categories
Identifies and fixes Rails performance issues including N+1 queries, slow queries, and memory problems. Performance Optimization is an agent skill from ThibautBaissac/rails_ai_agents. Identifies and fixes Rails performance issues including N+1 queries, slow queries, and memory problems.
Performance Optimization fits situations like: optimizing queries; fixing N+1 issues; improving response times; user mentions performance.
Run `npx skills add ThibautBaissac/rails_ai_agents --skill performance-optimization -a claude-code`. Or copy the skill folder (.agents/skills/performance-optimization in ThibautBaissac/rails_ai_agents) into .claude/skills/performance-optimization in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ThibautBaissac/rails_ai_agents --skill performance-optimization -a codex`. Or copy the skill folder (.agents/skills/performance-optimization in ThibautBaissac/rails_ai_agents) into .agents/skills/performance-optimization in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ThibautBaissac/rails_ai_agents --skill performance-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/performance-optimization, .gemini/skills/performance-optimization, .github/skills/performance-optimization and .opencode/skills/performance-optimization in your project.
SKILL.md names no scripts, command-line tools or credentials: Performance Optimization is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Grep, Glob, Bash.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Performance Optimization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.4k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Performance Optimization: Performance Check (ZeroDeng01/sublinkPro, 1.7k stars), Performance (kid-sid/claude-spellbook, 189 stars), Keybase RPC Log Analysis (keybase/client, 9.3k stars) and Groovy 5 Developer Guide (apache/grails-core, 2.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ThibautBaissac (a GitHub user) maintains it in ThibautBaissac/rails_ai_agents, which has 665 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on June 1, 2026.
Source: ThibautBaissac/rails_ai_agents on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.