/ruby-rails:cucumber-gherkinfrom ruby-rails
Writes and manages Cucumber feature files and Ruby step definitions for BDD testing in Ruby/Rails projects. Covers Gherkin syntax, hooks, tags, data tables, and Capybara integration.
Ships in ruby-rails. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
BDD testing framework with plain-text executable specifications and Ruby step definitions.
Feature file (.feature) ──> Step Definitions (Ruby) ──> System under test
Feature: Short description
Optional multi-line description.
Background:
Given common setup for all scenarios
Rule: Business rule grouping (Gherkin 6+)
Scenario: Concrete example
Given an initial context
When an action occurs
Then expected outcome
And additional assertion
But negative assertion
Scenario Outline: Parameterized
Given there are <start> items
When I remove <remove> items
Then I should have <remaining> items
Examples:
| start | remove | remaining |
| 12 | 5 | 7 |
| 20 | 5 | 15 |
Step keywords: Given (setup), When (action), Then (assertion), And/But (continuation), * (bullet)
Data tables:
Given the following users exist:
| name | email | role |
| Alice | [email protected] | admin |
Doc strings:
Given a blog post with content:
"""markdown
# My Post Title
Content here.
"""
Tags: @smoke @critical on Feature/Rule/Scenario/Examples. Expressions: @smoke and not @slow, (@smoke or @critical) and not @wip
# Cucumber Expressions (preferred)
Given('I have {int} cucumbers in my belly') do |count|
@belly = Belly.new
@belly.eat(count)
end
When('I wait {int} hour(s)') do |hours|
@belly.wait(hours)
end
Then('my belly should growl') do
expect(@belly.growling?).to be true
end
# Data table
Given('the following users exist:') do |table|
table.hashes.each { |row| User.create!(row) }
end
# Doc string
Given('a JSON payload:') do |json|
@payload = JSON.parse(json)
end
Cucumber Expressions: {int}, {float}, {word}, {string}, {} (anonymous). Optional: cucumber(s). Alternatives: color/colour.
State sharing: Use instance variables (@user) or World modules:
module MyWorld
def current_user
@current_user ||= create(:user)
end
end
World(MyWorld)
Before do |scenario|
@browser = Browser.new
end
After do |scenario|
save_screenshot("failure.png") if scenario.failed?
end
Before('@database') do
DatabaseCleaner.start
end
After('@database') do
DatabaseCleaner.clean
end
BeforeAll do
# once before any scenario
end
AfterAll do
# once after all scenarios
end
Order: BeforeAll > (Before > Background > Steps > After) per scenario > AfterAll
bundle exec cucumber
cucumber --tags "@smoke and not @wip"
cucumber features/login.feature:10
cucumber --dry-run
cucumber --format html --out report.html
bundle exec parallel_cucumber features/
Declarative over imperative:
# Good # Avoid
When "Bob" logs in When I visit "/login"
Then he sees his dashboard And I enter "bob" in "username"
And I click "Login"
For comprehensive details:
references/gherkin-syntax.md — Complete Gherkin language reference (keywords, data tables, tags, i18n)references/step-definitions.md — Ruby step definition patterns (data tables, doc strings, custom parameter types, World context, organization)references/hooks-config.md — Hooks, cucumber.yml configuration, reporters, Capybara integrationreferences/best-practices.md — Anti-patterns, naming conventions, collaboration patterns, refactoringWhat SKILL.md sets; muted values are Claude Code's defaults
13 skills in this plugin
/brakemanStatic analysis security vulnerability scanner for Ruby on Rails applications. Use when analyzing Rails code for security issues, running security audits, reviewing code for vulnerabilities, setting up security scanning in CI/CD, managing security warnings, or investigating specific vulnerability types (SQL injection, XSS, command injection, etc.). Also use when configuring Brakeman, reducing false positives, or integrating with automated workflows./design-patterns-rubyComprehensive Ruby implementations of Gang of Four (GoF) design patterns. Use when implementing object-oriented design solutions, refactoring to reduce coupling, solving architecture problems, or when user mentions specific patterns (Factory, Singleton, Observer, Strategy, etc.) in Ruby context./postgresql-rails-analyzerComprehensive PostgreSQL configuration and usage analysis for Rails applications. Use when Claude Code needs to analyze a Rails codebase for database performance issues, optimization opportunities, or best practice violations. Detects N+1 queries, missing indexes, suboptimal database configurations, anti-patterns, and provides actionable recommendations. Ideal for performance audits, optimization tasks, or when users ask to "analyze the database", "check for N+1 queries", "optimize PostgreSQL", "review database performance", or "suggest database improvements"./railsComprehensive Ruby on Rails v8.1 development guide with detailed documentation for Active Record, controllers, views, routing, testing, jobs, mailers, and more. Use when working on Rails applications, building Rails features, debugging Rails code, writing migrations, setting up associations, configuring Rails apps, or answering questions about Rails best practices and patterns./rails-generatorsCreate expert-level Ruby on Rails generators for models, services, controllers, and full-stack features, plus application templates for whole-app setup. Use when building custom generators, scaffolds, code generation tools, or Rails application templates (rails new -m, app:template, starter-app automation, multi-tenant setup), or when the user mentions Rails generators, Thor DSL, or automated code generation./review-ruby-codeComprehensive Ruby and Rails code review using Sandi Metz rules and SOLID principles. Analyzes changed files in current branch vs base branch, runs rubycritic and simplecov, identifies OOP violations, Rails anti-patterns, security issues, code smells, and test coverage gaps. Outputs REVIEW.md with VSCode-compatible file links. Use when reviewing Ruby/Rails code, conducting code reviews, checking for design issues, pull request review, code quality analysis, or when user mentions Sandi Metz, POODR, 99 Bottles, SOLID, Law of Demeter, or "Tell Don't Ask".npx claudepluginhub el-feo/ai-context --plugin ruby-railsOther plugins' skills for the same job