[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CCXW20APQA4GZ0XCT46TMV":3,"skill-same:01M7CCXW20APQA4GZ0XCT46TMV":50},{"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},"01M7CCXW20APQA4GZ0XCT46TMV","nbarthel__claudy__plugins__rails-workflow__skills__rails-api-lookup",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-api-lookup\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# Rails API Lookup\n\n---\nname: rails-api-lookup\ndescription: Looks up Rails API documentation for specific classes\u002Fmethods using Ref (primary) or WebFetch (fallback) with API reference\nversion: 1.2.0\nauthor: Rails Workflow Team\ntags: [rails, api, documentation, reference, ref]\npriority: 3\n---\n\n## Purpose\n\nFetches precise API documentation from official Rails API docs for specific classes, modules, and methods. Returns signatures, parameters, return values, and usage examples.\n\n**Replaces**: `mcp__rails__search_docs` MCP tool (API-specific queries)\n\n## Usage\n\n**Auto-invoked** when agents need API details:\n```\nAgent: \"What parameters does validates :email accept?\"\n*invokes rails-api-lookup class=\"ActiveModel::Validations\" method=\"validates\"*\n```\n\n**Manual invocation**:\n```\n@rails-api-lookup class=\"ActiveRecord::Base\" method=\"where\"\n@rails-api-lookup class=\"ActionController::Base\"\n@rails-api-lookup module=\"ActiveSupport::Concern\"\n```\n\n## Supported Lookups\n\nSee `reference.md` for complete class\u002Fmodule list. Common APIs:\n\n### Active Record\n- `ActiveRecord::Base` - Model base class\n- `ActiveRecord::Relation` - Query interface (where, joins, etc.)\n- `ActiveRecord::Associations` - Association methods\n- `ActiveRecord::Validations` - Validation methods\n- `ActiveRecord::Callbacks` - Callback methods\n\n### Action Controller\n- `ActionController::Base` - Controller base class\n- `ActionController::Metal` - Minimal controller\n- `ActionController::API` - API controller\n\n### Action View\n- `ActionView::Base` - View rendering\n- `ActionView::Helpers` - View helpers\n- `ActionView::Template` - Template handling\n\n### Active Support\n- `ActiveSupport::Concern` - Module mixins\n- `ActiveSupport::Callbacks` - Callback framework\n- `ActiveSupport::TimeWithZone` - Time handling\n\n## Search Process\n\n### Step 1: Version Detection\n```\nInvokes: @rails-version-detector\nResult: Rails 7.1.3\nMaps to: https:\u002F\u002Fapi.rubyonrails.org\u002Fv7.1\u002F\n```\n\n### Step 2: Class\u002FMethod Mapping\n```\nInput: class=\"ActiveRecord::Base\" method=\"where\"\nLookup: reference.md → \"ActiveRecord\u002FQueryMethods.html#method-i-where\"\nURL: https:\u002F\u002Fapi.rubyonrails.org\u002Fv7.1\u002FActiveRecord\u002FQueryMethods.html#method-i-where\n```\n\n### Step 3: Content Fetch\n\n**Method 1: Context7 (Fastest)**:\n```\nTool: context7_fetch\nQuery: \"Rails [version] [class] [method] API\"\n```\n\n**Method 2: Ref (Token-Efficient)**:\n```\nTool: ref_search_documentation\nQuery: \"Rails [version] [class] [method] API documentation\"\nThen: ref_read_url\n```\n\n**Method 3: Tavily (Search)**:\n```\nTool: tavily_search\nQuery: \"Rails [version] [class] [method] API documentation\"\n```\n\n**Method 4: WebFetch (Fallback)**:\n```\nTool: WebFetch\nURL: [constructed URL from reference.md]\nPrompt: \"Extract method signature, parameters, and examples for [method]\"\n```\n\n### Step 4: Response Formatting\n```ruby\n## ActiveRecord::QueryMethods#where (v7.1)\n\n**Signature**: `where(**opts)`\n\n**Parameters**:\n- `opts` (Hash) - Conditions as key-value pairs\n- `opts` (String) - Raw SQL conditions\n- `opts` (Array) - SQL with placeholders\n\n**Returns**: `ActiveRecord::Relation`\n\n**Examples**:\nUser.where(name: 'Alice')\nUser.where(\"age > ?\", 18)\nUser.where(age: 18..65)\n\n**Source**: https:\u002F\u002Fapi.rubyonrails.org\u002Fv7.1\u002FActiveRecord\u002FQueryMethods.html#method-i-where\n```\n\n## Reference Lookup\n\n**Class\u002FMethod → API URL mapping** in `reference.md`:\n\n```yaml\nActiveRecord::Base:\n  url_path: \"ActiveRecord\u002FBase.html\"\n  common_methods:\n    - save: \"method-i-save\"\n    - update: \"method-i-update\"\n    - destroy: \"method-i-destroy\"\n\nActiveRecord::QueryMethods:\n  url_path: \"ActiveRecord\u002FQueryMethods.html\"\n  common_methods:\n    - where: \"method-i-where\"\n    - joins: \"method-i-joins\"\n    - includes: \"method-i-includes\"\n```\n\n## Output Format\n\n### Class Overview\n```ruby\n## ActiveRecord::Base (v7.1)\n\nActive Record base class for all models.\n\n**Inherits from**: Object\n**Includes**: ActiveModel::Validations, ActiveRecord::Persistence\n\n**Common Methods**:\n- `.create` - Creates and saves record\n- `#save` - Saves record to database\n- `#update` - Updates attributes and saves\n- `#destroy` - Deletes record from database\n\n**Source**: https:\u002F\u002Fapi.rubyonrails.org\u002Fv7.1\u002FActiveRecord\u002FBase.html\n```\n\n### Method Details\n```ruby\n## ActiveRecord::Base#save (v7.1)\n\n**Signature**: `save(options = {})`\n\n**Parameters**:\n- `validate` (Boolean, default: true) - Run validations before saving\n- `context` (Symbol) - Validation context\n- `touch` (Boolean, default: true) - Update timestamps\n\n**Returns**:\n- `true` if saved successfully\n- `false` if validation failed\n\n**Raises**:\n- `ActiveRecord::RecordInvalid` if `save!` and validation fails\n\n**Examples**:\n```ruby\nuser.save                    # => true\u002Ffalse\nuser.save(validate: false)   # skip validations\nuser.save!                   # raises on failure\n```\n\n**Source**: [full URL]\n```\n\n### Not Found Response\n```markdown\n## Class\u002FMethod Not Found: [class]#[method]\n\nSearched in: Rails [version] API docs\n\nSuggestions:\n- Check spelling: \"ActiveRecord::Base\" (not \"ActiveRecords::Base\")\n- Try class overview: @rails-api-lookup class=\"ActiveRecord::Base\"\n- Search guides instead: @rails-docs-search topic=\"active_record_basics\"\n\nCommon classes:\n- ActiveRecord::Base\n- ActionController::Base\n- ActiveSupport::Concern\n```\n\n## Implementation Details\n\n**Tools used** (in order of preference):\n1. **@rails-version-detector** - Get project Rails version\n2. **Read** - Load `reference.md` API mappings\n3. **context7_fetch** (primary) - Fetch API docs via Context7 MCP\n4. **ref_search_documentation** (secondary) - Search Rails API docs via Ref MCP\n5. **tavily_search** (tertiary) - Optimized search via Tavily MCP\n6. **WebFetch** (fallback) - Fetch API docs if MCPs not available\n7. **Grep** (optional) - Search for method names in cached docs\n\n**Optional dependencies**:\n- **context7-mcp**: Fastest API documentation\n- **ref-tools-mcp**: Token-efficient API doc fetching\n- **tavily-mcp**: Optimized search for LLMs\n- If neither installed: Falls back to WebFetch (still works!)\n\n**URL construction**:\n```\nBase: https:\u002F\u002Fapi.rubyonrails.org\u002F\nVersioned: https:\u002F\u002Fapi.rubyonrails.org\u002Fv7.1\u002F\nClass: https:\u002F\u002Fapi.rubyonrails.org\u002Fv7.1\u002FActiveRecord\u002FBase.html\nMethod: https:\u002F\u002Fapi.rubyonrails.org\u002Fv7.1\u002FActiveRecord\u002FBase.html#method-i-save\n```\n\n**Version handling**:\n- Rails 8.x → `\u002Fv8.0\u002F`\n- Rails 7.1.x → `\u002Fv7.1\u002F`\n- Rails 7.0.x → `\u002Fv7.0\u002F`\n- Rails 6.1.x → `\u002Fv6.1\u002F`\n\n**Caching strategy**:\n- Cache API documentation for session\n- Re-fetch if version changes\n- Cache key: `{class}:{method}:{version}`\n\n**Prompt Caching (Opus 4.5 Optimized)**:\n- Use 1-hour cache duration for extended thinking tasks\n- API signatures rarely change - maximize cache reuse\n- Cache prefix: Include Rails version + common class list in system prompt\n- Reduces token costs significantly for repeated API lookups\n\n## Error Handling\n\n**Network failure**:\n```markdown\n⚠️ Failed to fetch API docs from api.rubyonrails.org\n\nFallback: Use Claude's knowledge (may be less accurate)\nURL attempted: [URL]\n```\n\n**Invalid class name**:\n```markdown\n❌ Unknown class: \"[class]\"\n\nDid you mean: [closest match from reference.md]?\n\nTip: Use full module path (e.g., \"ActiveRecord::Base\", not \"Base\")\n```\n\n**Method not found**:\n```markdown\n⚠️ Method \"[method]\" not found in [class]\n\nClass exists, but method not documented or name incorrect.\n\nAvailable methods in [class]:\n- [method1]\n- [method2]\n[...from reference.md...]\n```\n\n## Integration\n\n**Auto-invoked by**:\n- All 7 Rails agents when they need precise API signatures\n- @rails-model-specialist for ActiveRecord methods\n- @rails-controller-specialist for ActionController methods\n- @rails-view-specialist for ActionView helpers\n\n**Complements**:\n- @rails-docs-search (concepts vs API details)\n- @rails-pattern-finder (API usage vs code patterns)\n\n## Special Features\n\n### Multiple methods lookup\n```\n@rails-api-lookup class=\"ActiveRecord::Base\" method=\"save,update,destroy\"\n→ Returns all three method signatures\n```\n\n### Inheritance chain\n```\n@rails-api-lookup class=\"User\" inherit=true\n→ Shows methods from User, ApplicationRecord, ActiveRecord::Base\n```\n\n### Version comparison\n```\n@rails-api-lookup class=\"ActiveRecord::Base\" method=\"save\" compare=\"7.0,7.1\"\n→ Shows differences between versions\n```\n\n## Testing\n\n**Test cases**:\n1. class=\"ActiveRecord::Base\" method=\"save\" → Exact signature\n2. class=\"UnknownClass\" → Error with suggestions\n3. Network down → Graceful fallback\n4. Rails 8.0 method lookup → Uses v8.0 docs\n5. Method with multiple signatures → Lists all variants\n\n## Notes\n\n- API docs fetched live (not stored in plugin)\n- Reference mappings maintained in `reference.md`\n- Version-appropriate URLs ensure API accuracy\n- WebFetch tool handles HTML parsing\n- This skill focuses on **API signatures**, use @rails-docs-search for **concepts**\n- Method anchors use Rails convention: `#method-i-name` (instance), `#method-c-name` (class)\n",{},"main","9eadad1eb0fcedc7b086d57b24f1f18310ac285a","benchmark\u002Fwild\u002Fheldout\u002Fsafe\u002Fnbarthel__claudy__plugins__rails-workflow__skills__rails-api-lookup","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-api-lookup",{"tool":36,"command":37},"bunx","bunx skills add shenyimings\u002Fskillet --skill nbarthel__claudy__plugins__rails-workflow__skills__rails-api-lookup",{"tool":39,"command":40},"pnpm","pnpm dlx skills add shenyimings\u002Fskillet --skill nbarthel__claudy__plugins__rails-workflow__skills__rails-api-lookup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsafe\u002Fnbarthel__claudy__plugins__rails-workflow__skills__rails-api-lookup\u002FSKILL.md",true,[44],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"reference.md","REFERENCE","参考文档",11723,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsafe\u002Fnbarthel__claudy__plugins__rails-workflow__skills__rails-api-lookup\u002Freference.md",[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"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":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"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":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"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":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"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":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"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":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"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",[],[]]