[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CBAEYZEVCWM79MZFQQ7X5B":3,"skill-same:01M6CBAEYZEVCWM79MZFQQ7X5B":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":26,"linkOnly":27,"markdownContent":28,"markdownBody":29,"frontMatter":30,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":39,"ownerHtmlUrl":40,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":41,"install":42,"resources":55},"01M6CBAEYZEVCWM79MZFQQ7X5B","ruby-rails",null,"Ruby on Rails best practices with MVC, ActiveRecord, and testing","shahboura\u002Fagents-opencode","shahboura","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F210767?v=4","01M6C6WKTBT0NH92BEPQRHQSYM","Shehab El Hadidy","01M6C6WKYXG8AE68MCGBNE5ZFR",2,"MIT","https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fruby-rails\u002FSKILL.md",[],[19,20,21,22,23,24,25],"ruby","rails","ruby rails","testing","development","best practices","opencode","2026-11-10 10:12:30",false,"---\nname: ruby-rails\ndescription: Ruby on Rails best practices with MVC, ActiveRecord, and testing\nlicense: MIT\ncompatibility: opencode\nmetadata:\n  author: shahboura\n  version: \"2.0.0\"\n  audience: developers\n  workflow: development\n---\n\n## What I do\n- Enforce Rails MVC conventions with proper layer responsibilities\n- Apply ActiveRecord patterns for models, validations, and associations\n- Guide testing, authentication, authorization, and background job patterns\n\n## When to use me\nUse this when building or maintaining Ruby on Rails applications.\n\n## Key Rules\n- Use RESTful routing for all resources — follow Rails conventions\n- Keep controllers thin — only HTTP concerns; move business logic to models or service objects\n- Use `before_action` for shared setup; always use strong parameters for mass assignment\n- ActiveRecord models own validations, associations, scopes, and callbacks\n- Extract complex multi-step logic into Service Objects with `ActiveRecord::Base.transaction`\n- Use scopes for reusable query logic — prefer scopes over class methods for chainability\n- Use the project's test runner and fixture strategy consistently (for example RSpec + FactoryBot or Rails test + fixtures)\n- Use established authN\u002FauthZ libraries (for example Devise\u002FSorcery\u002FAuth0 SDK and Pundit\u002FCanCanCan) based on project needs\n- Use ActiveJob with an appropriate backend (for example Sidekiq, Solid Queue); handle missing records explicitly\n- In API-only token-auth setups, CSRF is often unnecessary; do not disable CSRF globally for cookie\u002Fsession flows\n- Use eager loading (`includes`, `preload`) to prevent N+1 queries\n- Callbacks should be simple — use `deliver_later` for mailers, never `deliver_now` in callbacks\n- Migrations must have both `up` and `down` (or reversible `change`); add indexes on foreign keys\n- Use a verify-fix-verify loop: run the validation commands below, fix any failures, and rerun until all checks pass\n\n## Naming Conventions\n- `snake_case` for files\u002Fmethods\u002Fvariables\n- `CamelCase` for classes\u002Fmodules\n- Service objects should use verb-oriented names (`CreateInvoice`, `RegisterUser`)\n- Scope names should be intention-revealing and chain-safe\n\n## Common Pitfalls\n- Fat controllers with hidden business logic\n- N+1 queries due to missing eager loading\n- Authorization checks scattered across controllers\u002Fviews\n- Long-running work executed inline instead of background jobs\n\n## Example Patterns\n```ruby\nclass RegisterUser\n  def initialize(params)\n    @params = params\n  end\n\n  def call\n    User.transaction do\n      user = User.create!(@params)\n      UserProfile.create!(user:, onboarding_state: \"pending\")\n      user\n    end\n  end\nend\n```\n\n## Validation Commands\nPrefer project scripts when present; use defaults below otherwise.\n\n```bash\nrails test  # or project-configured test runner (e.g., rspec)\nrubocop\nbrakeman\nbundle audit\n```\n","## What I do\n- Enforce Rails MVC conventions with proper layer responsibilities\n- Apply ActiveRecord patterns for models, validations, and associations\n- Guide testing, authentication, authorization, and background job patterns\n\n## When to use me\nUse this when building or maintaining Ruby on Rails applications.\n\n## Key Rules\n- Use RESTful routing for all resources — follow Rails conventions\n- Keep controllers thin — only HTTP concerns; move business logic to models or service objects\n- Use `before_action` for shared setup; always use strong parameters for mass assignment\n- ActiveRecord models own validations, associations, scopes, and callbacks\n- Extract complex multi-step logic into Service Objects with `ActiveRecord::Base.transaction`\n- Use scopes for reusable query logic — prefer scopes over class methods for chainability\n- Use the project's test runner and fixture strategy consistently (for example RSpec + FactoryBot or Rails test + fixtures)\n- Use established authN\u002FauthZ libraries (for example Devise\u002FSorcery\u002FAuth0 SDK and Pundit\u002FCanCanCan) based on project needs\n- Use ActiveJob with an appropriate backend (for example Sidekiq, Solid Queue); handle missing records explicitly\n- In API-only token-auth setups, CSRF is often unnecessary; do not disable CSRF globally for cookie\u002Fsession flows\n- Use eager loading (`includes`, `preload`) to prevent N+1 queries\n- Callbacks should be simple — use `deliver_later` for mailers, never `deliver_now` in callbacks\n- Migrations must have both `up` and `down` (or reversible `change`); add indexes on foreign keys\n- Use a verify-fix-verify loop: run the validation commands below, fix any failures, and rerun until all checks pass\n\n## Naming Conventions\n- `snake_case` for files\u002Fmethods\u002Fvariables\n- `CamelCase` for classes\u002Fmodules\n- Service objects should use verb-oriented names (`CreateInvoice`, `RegisterUser`)\n- Scope names should be intention-revealing and chain-safe\n\n## Common Pitfalls\n- Fat controllers with hidden business logic\n- N+1 queries due to missing eager loading\n- Authorization checks scattered across controllers\u002Fviews\n- Long-running work executed inline instead of background jobs\n\n## Example Patterns\n```ruby\nclass RegisterUser\n  def initialize(params)\n    @params = params\n  end\n\n  def call\n    User.transaction do\n      user = User.create!(@params)\n      UserProfile.create!(user:, onboarding_state: \"pending\")\n      user\n    end\n  end\nend\n```\n\n## Validation Commands\nPrefer project scripts when present; use defaults below otherwise.\n\n```bash\nrails test  # or project-configured test runner (e.g., rspec)\nrubocop\nbrakeman\nbundle audit\n```\n",{"name":5,"license":15,"metadata":31,"description":7,"compatibility":25},{"author":9,"version":32,"audience":33,"workflow":23},"2.0.0","developers","main","9b951b5b2e5d07d427baff330db5deb2a8c67511",".opencode\u002Fskills\u002Fruby-rails",0,"https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode","https:\u002F\u002Fagnts.elkodr.com\u002F","https:\u002F\u002Fgithub.com\u002Fshahboura","2026-11-05 13:30:42",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add shahboura\u002Fagents-opencode --skill ruby-rails",{"tool":48,"command":49},"bunx","bunx skills add shahboura\u002Fagents-opencode --skill ruby-rails",{"tool":51,"command":52},"pnpm","pnpm dlx skills add shahboura\u002Fagents-opencode --skill ruby-rails","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fruby-rails\u002FSKILL.md",true,[],[57,63,72,77,82,87],{"skillNo":58,"name":59,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":26},"01M6CBBX1C6NV7VY8XK21DV5FW","python","https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fvalidate-agents\u002Fvalid\u002F.opencode\u002Fskills\u002Fpython\u002FSKILL.md",[],[59],{"skillNo":64,"name":65,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":26},"01M6CBBVB7W6ABJH8XP3Z8PPMK","docs-validation","https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fvalidate-agents\u002Fvalid\u002F.opencode\u002Fskills\u002Fdocs-validation\u002FSKILL.md",[],[69,70,71],"docs","validation","docs validation",{"skillNo":73,"name":59,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":26},"01M6CBBT2WC781609MH5RN7KM7","https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fvalidate-agents\u002Funknown-skill\u002F.opencode\u002Fskills\u002Fpython\u002FSKILL.md",[],[59],{"skillNo":78,"name":65,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":26},"01M6CBBRNY6TDRZ5627GC8436D","https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fvalidate-agents\u002Funknown-skill\u002F.opencode\u002Fskills\u002Fdocs-validation\u002FSKILL.md",[],[69,70,71],{"skillNo":83,"name":59,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":26},"01M6CBBQDS170GBYA1CVW3DC5D","https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fvalidate-agents\u002Finline-skill\u002F.opencode\u002Fskills\u002Fpython\u002FSKILL.md",[],[59],{"skillNo":88,"name":65,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":26},"01M6CBBP222WAW802YHY37F48A","https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fvalidate-agents\u002Finline-skill\u002F.opencode\u002Fskills\u002Fdocs-validation\u002FSKILL.md",[],[69,70,71]]