---
Automatically detects Rails version from Gemfile.lock, Gemfile, or Ruby version files. Used by other Rails skills to ensure version-compatible code generation and documentation lookups.
/plugin marketplace add nbarthel/claudy/plugin install rails-workflow@claudyThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Automatically detects the Rails version in the current project by inspecting:
Gemfile.lock (preferred - exact version)Gemfile (fallback - version constraint).ruby-version or .tool-versions (Ruby version hint)Returns version information for use by other skills and agents.
This skill is auto-invoked by other Rails skills when they need version information.
Manual invocation (rarely needed):
@rails-version-detector
# Searches for:
rails (7.1.3)
actioncable (= 7.1.3)
actionmailbox (= 7.1.3)
...
Extraction logic:
rails \((\d+\.\d+\.\d+)\)# Searches for:
gem "rails", "~> 7.1.0"
gem 'rails', '>= 7.0.0', '< 8.0'
Extraction logic:
gem ['"]rails['"],\s*['"]([^'"]+)['"]# .ruby-version or .tool-versions
ruby 3.2.2
Mapping:
Returns: Estimated range (e.g., "7.0 or 7.1")
{
"version": "7.1.3",
"source": "Gemfile.lock",
"confidence": "exact",
"major": 7,
"minor": 1,
"patch": 3
}
{
"version": "~> 7.1.0",
"source": "Gemfile",
"confidence": "constraint",
"interpreted_as": "7.1.x",
"major": 7,
"minor": 1
}
{
"version": "7.0-7.1",
"source": ".ruby-version",
"confidence": "heuristic",
"ruby_version": "3.2.2",
"possible_rails": ["7.0", "7.1"]
}
{
"version": null,
"source": null,
"confidence": "none",
"error": "No Rails version detected. Is this a Rails project?"
}
Tool usage:
Read tool to read Gemfile.lock, Gemfile, .ruby-versionGrep tool to search for version patternsBash if needed: bundle show rails | grep 'rails-'Caching:
Gemfile.lock missing:
bundle install for exact version."No version found:
gem 'rails' in Gemfile"Multiple Rails versions:
Auto-invoked by:
Manual use case:
User: "What Rails version is this project using?"
Assistant: *invokes @rails-version-detector*
"This project uses Rails 7.1.3 (detected from Gemfile.lock)"
Test cases:
~> 7.1.0 in Gemfile → Interpreted as 7.1.xmcp__rails__get_rails_info MCP toolThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.