---
Auto-invoked when agents need Rails conceptual documentation. Fetches guide sections from official Rails Guides based on topics like "routing" or "active_record_associations", using version-appropriate URLs and multiple fallback search methods.
/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.
reference.mdFetches conceptual documentation from official Rails Guides based on topics. Returns relevant guide sections with version-appropriate URLs.
Replaces: mcp__rails__search_docs MCP tool
Auto-invoked when agents need Rails concepts:
Agent: "How do I implement Action Cable subscriptions?"
*invokes rails-docs-search topic="action_cable"*
Manual invocation:
@rails-docs-search topic="active_record_associations"
@rails-docs-search topic="routing"
See reference.md for complete topic list. Common topics:
getting_started - Rails basics and first appactive_record_basics - ORM fundamentalsrouting - URL patterns and routescontrollers - Request/response handlingviews - Templates and renderingactive_record_associations - Relationships (has_many, belongs_to)active_record_validations - Data validationactive_record_callbacks - Lifecycle hooksaction_mailer - Email sendingaction_cable - WebSocketstesting - Rails testing guidesecurity - Security best practicesdebugging - Debugging techniquesconfiguring - Application configurationasset_pipeline - Asset managementcaching - Performance cachingInvokes: @rails-version-detector
Result: Rails 7.1.3
Maps to: https://guides.rubyonrails.org/v7.1/
Input: topic="active_record_associations"
Lookup: reference.md → "association_basics.html"
URL: https://guides.rubyonrails.org/v7.1/association_basics.html
Method 1: Context7 (Fastest):
Tool: context7_fetch
Query: "Rails [version] [topic]"
Method 2: Ref (Token-Efficient):
Tool: ref_search_documentation
Query: "Rails [version] [topic] documentation"
Then: ref_read_url
Method 3: Tavily (Search):
Tool: tavily_search
Query: "Rails [version] [topic] guide"
Method 4: WebFetch (Fallback):
Tool: WebFetch
URL: [constructed URL from reference.md]
Prompt: "Extract sections about [specific query]"
Note: WebFetch has a built-in 15-minute cache for faster responses
when repeatedly accessing the same URL within a session.
## Rails Guide: Active Record Associations (v7.1)
### belongs_to
A `belongs_to` association sets up a one-to-one connection...
### has_many
A `has_many` association indicates a one-to-many connection...
Source: https://guides.rubyonrails.org/v7.1/association_basics.html
Topic → Guide URL mapping in reference.md:
active_record_associations:
title: "Active Record Associations"
url_path: "association_basics.html"
version_support: "all"
keywords: [has_many, belongs_to, has_one, through]
routing:
title: "Rails Routing"
url_path: "routing.html"
version_support: "all"
keywords: [routes, resources, namespace]
## Rails Guide: [Topic Title] (v[X.Y])
[Fetched content from guide...]
### Key Points
- [Summary point 1]
- [Summary point 2]
**Source**: [full URL]
**Version**: [Rails version]
## Topic Not Found: [topic]
Available topics:
- getting_started
- active_record_basics
- routing
[...more topics...]
Try: @rails-docs-search topic="[one of above]"
## Rails Guide: [Topic] (v7.1)
⚠️ **Note**: Guide is for Rails 7.1, but project uses Rails 6.1.
Some features may not be available in your version.
[Content...]
Tools used (in order of preference):
reference.md topic mappingsOptional dependencies:
URL construction:
Base: https://guides.rubyonrails.org/
Versioned: https://guides.rubyonrails.org/v7.1/
Guide: https://guides.rubyonrails.org/v7.1/routing.html
Version handling:
/v8.0/ (or latest if 8.0 not published)/v7.1//v7.0//v6.1/Caching strategy:
{topic}:{version}Prompt Caching (Opus 4.5 Optimized):
Network failure:
⚠️ Failed to fetch guide from rubyonrails.org
Fallback: Check local knowledge or ask user for clarification.
URL attempted: [URL]
Invalid topic:
❌ Unknown topic: "[topic]"
Did you mean: [closest match from reference.md]?
See available topics: @rails-docs-search list
Version not supported:
⚠️ Rails [version] guides not available.
Using closest version: [fallback version]
Some information may differ from your Rails version.
Auto-invoked by:
Complements:
@rails-docs-search topic="routing,controllers"
→ Fetches both guides and combines relevant sections
@rails-docs-search topic="active_record_associations" keyword="polymorphic"
→ Focuses on polymorphic association sections only
@rails-docs-search list
→ Returns all available topics from reference.md
Test cases:
reference.mdThis 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 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 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.