CtrlK
BlogDocsLog inGet started
Tessl Logo

performance-optimization

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.

Install with Tessl CLI

npx tessl i github:ThibautBaissac/rails_ai_agents --skill performance-optimization
What are skills?

85

Does it follow best practices?

Agent success when using this skill

Validation for skill structure

SKILL.md
Review
Evals

Evaluation results

91%

-7%

Slow Events Listing — Query Optimization

N+1 eager loading and query optimization

Criteria
Without context
With context

Uses includes for venue

100%

100%

Uses includes for organizer

100%

100%

No eager_load for simple associations

100%

100%

Model scope for eager loading

100%

100%

Counter cache on Comment

100%

100%

Counter cache on EventVendor

100%

100%

Migration adds counter cache columns

100%

100%

No .count on associations in view or controller

100%

75%

pluck or select used appropriately

75%

37%

CHANGES.md explains method selection

100%

100%

Scope used in controller

100%

100%

Correct includes nesting syntax

100%

50%

Without context: $0.3175 · 1m 30s · 14 turns · 63 in / 4,929 out tokens

With context: $0.4076 · 1m 12s · 20 turns · 380 in / 4,044 out tokens

83%

Concert Ticket Platform — Database Migration and Bulk Data Backfill

Database indexing and batch operations

Criteria
Without context
With context

Index on user_id FK

100%

100%

Index on show_id FK

100%

100%

Index on venue_id FK

100%

100%

Composite index for user+status query

100%

100%

Partial index for active statuses

0%

0%

MIGRATION_NOTES explains each index

100%

100%

Bulk update uses update_all

100%

100%

No AR object instantiation for bulk update

100%

100%

Script runnable via rails runner

100%

100%

Index comment order matters

100%

100%

No redundant single-column indexes

100%

100%

Covering or include index considered

0%

0%

Without context: $0.2241 · 59s · 10 turns · 11 in / 3,239 out tokens

With context: $0.3573 · 1m 17s · 15 turns · 64 in / 3,907 out tokens

93%

9%

Rails Performance Monitoring Infrastructure Setup

Performance monitoring tooling setup

Criteria
Without context
With context

bullet gem in dev/test group

100%

100%

rack-mini-profiler gem present

100%

100%

stackprof gem present

100%

100%

Bullet dev config block

60%

100%

Bullet.raise in test env

100%

100%

rack-mini-profiler position config

100%

100%

rack-mini-profiler start_hidden false

100%

100%

Slow query subscriber threshold 100ms

55%

100%

Bullet RSpec before/after hooks

100%

100%

QueryCounter module

100%

100%

around_action log_query_count

90%

100%

warn_on_records_fetched config

0%

0%

memory_profiler gem present

100%

100%

Bullet.raise NOT in development

100%

100%

Without context: $0.4195 · 1m 53s · 17 turns · 18 in / 6,529 out tokens

With context: $0.7894 · 2m 13s · 36 turns · 335 in / 8,145 out tokens

Evaluated
Agent
Claude Code

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.