Spec Performance

A comprehensive performance tuning guide for the RSpec framework.

3|Updated Jan 9, 2026
One-click install
npx skills add https://github.com/bastos/ruby-plugin-marketplace --skill spec-performance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Spec Performance
Source: https://github.com/bastos/ruby-plugin-marketplace/tree/main/plugins/rspec/skills/spec-performance
Command: npx skills add https://github.com/bastos/ruby-plugin-marketplace --skill spec-performance

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Slow RSpec test suites degrade productivity and slow feedback. This skill provides structured guidance to profile, optimize, and parallelize Ruby specs, helping teams deliver faster feedback and higher test throughput.

Core Features & Use Cases

  • Profiling slow tests to identify bottlenecks and hotspots.
  • Optimizing test data usage and let/let! strategies to minimize DB writes.
  • Enabling parallel testing and speed-up techniques while preserving test integrity.
  • Replacing slow dependencies with fast mocks/stubs to reduce flakiness and latency.

Quick Start

Analyze your Rails/RSpec test suite to produce an actionable plan that reduces total runtime, including profiling commands and concrete code rewrites.

Frequently Asked Questions about Spec Performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I profile slow RSpec tests to find bottlenecks?

Profiling slow RSpec tests involves running specific profiling commands to identify runtime bottlenecks and hotspots. This skill provides actionable profiling commands to pinpoint the slowest tests in your Ruby on Rails suite.

What's the best way to optimize RSpec let and let! to reduce database writes?

Optimizing RSpec let and let! reduces database writes by adjusting test data strategies. This skill delivers concrete code rewrites and around hooks to minimize database writes and speed up test data setup.

How do I enable parallel testing for Ruby on Rails specs?

Enabling parallel testing for Rails specs requires configuring parallel environment setups while preserving test integrity. This skill provides configuration tips and setup steps to parallelize your RSpec test suite safely.

Can I use this skill to replace slow dependencies with mocks and stubs?

Yes, you can replace slow dependencies with fast mocks and stubs to reduce flakiness and latency. This skill includes strategies for substituting slow components with fast mocks and stubs in your RSpec tests.

Does this skill work with existing RSpec configurations in Rails?

Yes, this skill works with existing RSpec configurations by providing actionable steps, around hooks, and database strategy choices tailored for Ruby on Rails. It analyzes your current suite to produce an actionable runtime reduction plan.

Why does my RSpec test suite take so long to run?

Your RSpec test suite may be slow due to excessive database writes, unoptimized let/let! blocks, or lack of parallel testing. This skill identifies these bottlenecks through profiling and offers concrete code rewrites to improve throughput.