Intelligently analyze RSpec test failures and provide actionable debugging guidance.
From rubyistnpx claudepluginhub jwplatta/agent-cubicle --plugin rubyistThis skill uses the workspace's default tool permissions.
scripts/README.mdscripts/analyze_failures.shscripts/run_tests.shSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides implementation of event-driven hooks in Claude Code plugins using prompt-based validation and bash commands for PreToolUse, Stop, and session events.
Intelligently analyze RSpec test failures and provide actionable debugging guidance.
This skill activates when:
Automatically identify common failure patterns:
NoMethodError Patterns:
Expectation Failures:
Database/State Issues:
For each failure, suggest:
Immediate Checks:
Investigation Steps:
puts or binding.pry at strategic pointsLikely Fixes:
Evaluate test quality:
Good Signs:
Warning Signs:
Identify untested scenarios:
Failure Detected:
Failure/Error: expect(user.full_name).to eq("John Doe")
expected: "John Doe"
got: "John"
Analysis Response:
Failure: User#full_name incomplete
Immediate Cause:
The full_name method is only returning the first name.
Investigation Steps:
Check the implementation at lib/user.rb:15
# Current implementation (likely):
def full_name
first_name
end
Verify test data:
# Check that your factory/test setup has both names
user = User.new(first_name: "John", last_name: "Doe")
Suggested Fix:
# lib/user.rb:15
def full_name
[first_name, last_name].compact.join(' ')
end
Additional Considerations:
compact)Suggested Additional Tests:
context 'when last_name is missing' do
it 'returns only first_name' do
user = User.new(first_name: "John", last_name: nil)
expect(user.full_name).to eq("John")
end
end
When tests are slow:
Identify Bottlenecks:
bundle exec rspec --profileOptimization Suggestions:
Database-Heavy Tests:
build_stubbed instead of createlet instead of let! where possibleExternal Services:
Factory Optimization:
build instead of createOffer to:
binding.pry at failure pointSuggest tests for: