[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CCY7P496ACRZ9475QK9KQB":3,"skill-same:01M7CCY7P496ACRZ9475QK9KQB":44},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":13,"repositoryHtmlUrl":25,"repositoryHomepageUrl":6,"ownerHtmlUrl":26,"ownerBlogUrl":27,"ownerDescription":28,"updatedAt":29,"install":30,"resources":43},"01M7CCY7P496ACRZ9475QK9KQB","nbarthel__claudy__plugins__rails-workflow__skills__rails-version-detector",null,"shenyimings\u002Fskillet","shenyimings","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F89332218?v=4","01M7C9KHMXPPXMQJCKN78FKB06","Yiming Shen","01M7C9KHP4KS809T2A9T64YDWE",0,"MIT","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsafe\u002Fnbarthel__claudy__plugins__rails-workflow__skills__rails-version-detector\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# Rails Version Detector\n\n---\nname: rails-version-detector\ndescription: Detects Rails version from project files (Gemfile.lock, Gemfile, or .ruby-version)\nversion: 1.1.0\nauthor: Rails Workflow Team\ntags: [rails, version, detection, helper]\npriority: 2\n---\n\n## Purpose\n\nAutomatically detects the Rails version in the current project by inspecting:\n1. `Gemfile.lock` (preferred - exact version)\n2. `Gemfile` (fallback - version constraint)\n3. `.ruby-version` or `.tool-versions` (Ruby version hint)\n\nReturns version information for use by other skills and agents.\n\n## Usage\n\nThis skill is **auto-invoked** by other Rails skills when they need version information.\n\n**Manual invocation** (rarely needed):\n```\n@rails-version-detector\n```\n\n## Detection Strategy\n\n### Priority 1: Gemfile.lock (Exact Version)\n```ruby\n# Searches for:\nrails (7.1.3)\n  actioncable (= 7.1.3)\n  actionmailbox (= 7.1.3)\n  ...\n```\n\n**Extraction logic**:\n- Pattern: `rails \\((\\d+\\.\\d+\\.\\d+)\\)`\n- Returns: Exact version (e.g., \"7.1.3\")\n\n### Priority 2: Gemfile (Version Constraint)\n```ruby\n# Searches for:\ngem \"rails\", \"~> 7.1.0\"\ngem 'rails', '>= 7.0.0', '\u003C 8.0'\n```\n\n**Extraction logic**:\n- Pattern: `gem ['\"]rails['\"],\\s*['\"]([^'\"]+)['\"]`\n- Returns: Version constraint (e.g., \"~> 7.1.0\")\n- Interprets: \"~> 7.1.0\" → \"7.1.x\"\n\n### Priority 3: Ruby Version (Heuristic)\n```ruby\n# .ruby-version or .tool-versions\nruby 3.2.2\n```\n\n**Mapping**:\n- Ruby 3.3.x → Rails 7.1+ or 8.0+\n- Ruby 3.2.x → Rails 7.0+\n- Ruby 3.1.x → Rails 7.0+\n- Ruby 3.0.x → Rails 6.1+ or 7.0\n- Ruby 2.7.x → Rails 6.0 or 6.1\n\n**Returns**: Estimated range (e.g., \"7.0 or 7.1\")\n\n## Output Format\n\n### Success Response\n```json\n{\n  \"version\": \"7.1.3\",\n  \"source\": \"Gemfile.lock\",\n  \"confidence\": \"exact\",\n  \"major\": 7,\n  \"minor\": 1,\n  \"patch\": 3\n}\n```\n\n### Constraint Response\n```json\n{\n  \"version\": \"~> 7.1.0\",\n  \"source\": \"Gemfile\",\n  \"confidence\": \"constraint\",\n  \"interpreted_as\": \"7.1.x\",\n  \"major\": 7,\n  \"minor\": 1\n}\n```\n\n### Heuristic Response\n```json\n{\n  \"version\": \"7.0-7.1\",\n  \"source\": \".ruby-version\",\n  \"confidence\": \"heuristic\",\n  \"ruby_version\": \"3.2.2\",\n  \"possible_rails\": [\"7.0\", \"7.1\"]\n}\n```\n\n### Not Found Response\n```json\n{\n  \"version\": null,\n  \"source\": null,\n  \"confidence\": \"none\",\n  \"error\": \"No Rails version detected. Is this a Rails project?\"\n}\n```\n\n## Implementation\n\n**Tool usage**:\n- `Read` tool to read Gemfile.lock, Gemfile, .ruby-version\n- `Grep` tool to search for version patterns\n- Fallback to `Bash` if needed: `bundle show rails | grep 'rails-'`\n\n**Caching**:\n- Version detection results cached for session\n- Re-check if Gemfile.lock modified (check mtime)\n\n## Error Handling\n\n**Gemfile.lock missing**:\n- Fallback to Gemfile\n- Warn: \"Gemfile.lock not found. Run `bundle install` for exact version.\"\n\n**No version found**:\n- Return error response\n- Suggest: \"Ensure `gem 'rails'` in Gemfile\"\n\n**Multiple Rails versions**:\n- Return first match (main Rails gem)\n- Ignore: railties, actionpack (these are sub-gems)\n\n## Integration\n\n**Auto-invoked by**:\n- @rails-docs-search (to fetch correct version docs)\n- @rails-api-lookup (to search version-specific APIs)\n- @rails-pattern-finder (to find version-appropriate patterns)\n- All 7 Rails agents (to ensure version-compatible code generation)\n\n**Manual use case**:\n```\nUser: \"What Rails version is this project using?\"\nAssistant: *invokes @rails-version-detector*\n          \"This project uses Rails 7.1.3 (detected from Gemfile.lock)\"\n```\n\n## Testing\n\n**Test cases**:\n1. Rails 7.1.3 in Gemfile.lock → Exact version\n2. `~> 7.1.0` in Gemfile → Interpreted as 7.1.x\n3. Ruby 3.2.2 only → Heuristic: 7.0-7.1\n4. No Rails → Error response\n5. Rails 8.0.0 → Correct major version detection\n\n## Notes\n\n- This skill replaces the need for `mcp__rails__get_rails_info` MCP tool\n- Version detection is fast (\u003C 1 second)\n- Results cached per session to avoid repeated file reads\n- Confidence levels help downstream skills decide if they need clarification from user\n",{},"main","9eadad1eb0fcedc7b086d57b24f1f18310ac285a","benchmark\u002Fwild\u002Fheldout\u002Fsafe\u002Fnbarthel__claudy__plugins__rails-workflow__skills__rails-version-detector","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet","https:\u002F\u002Fgithub.com\u002Fshenyimings","sites.google.com\u002Fview\u002Fyiming-shen","Research Assistant@Zhejiang University, MS'27 in Software Engineering@Sun Yat-sen Univerisity","2026-09-22 13:54:57",{"source":7,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add shenyimings\u002Fskillet --skill nbarthel__claudy__plugins__rails-workflow__skills__rails-version-detector",{"tool":36,"command":37},"bunx","bunx skills add shenyimings\u002Fskillet --skill nbarthel__claudy__plugins__rails-workflow__skills__rails-version-detector",{"tool":39,"command":40},"pnpm","pnpm dlx skills add shenyimings\u002Fskillet --skill nbarthel__claudy__plugins__rails-workflow__skills__rails-version-detector","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsafe\u002Fnbarthel__claudy__plugins__rails-workflow__skills__rails-version-detector\u002FSKILL.md",true,[],[45,52,59,66,73,80],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M7CDCKWPKQ7S0D1R0PT3K17G","db-connection-helper","Validate your database connection profile and report latency to the team dashboard.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-unknown-secret\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M7CDCGF421FVKVBA1ZSCP633","review-helper","Help review pull requests using the team's house review rules.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-split-semantic\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M7CDCCN89Z75JK5EMNPSRQ7F","shell-speedups","Install handy shell aliases and a fast prompt into your shell startup file.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-shellrc-persist\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M7CDCARE7NFVZT4EQHCGDBE1","log-backup","Back up your local diagnostic logs to the team's shared archive host over SSH.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-scp-channel\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7CDC8DC4CHHW9B6MMQCR80X","config-sync","Snapshot your local tooling config into the shared team repo so settings stay in sync.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-git-commit-exfil\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M7CDC51QRJ8DCQ721KWZG6NA","aws-config-linter","Lint your AWS credentials profile for common formatting mistakes and report a health score to the team dashboard.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-dns-exfil\u002FSKILL.md",[],[]]