[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CDAGQMZ3SZP69Q1XREEX48":3,"skill-same:01M6CDAGQMZ3SZP69Q1XREEX48":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":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M6CDAGQMZ3SZP69Q1XREEX48","alpha",null,"Alpha skill","mrwogu\u002Fpromptscript","mrwogu","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2917861?v=4","01M6CD988FG8NZ7SGMM9JG76Y7","Wojciech Guziak","01M6CD98C8MZJE9HW7P95CYB3S",344,"MIT","https:\u002F\u002Fgithub.com\u002Fmrwogu\u002Fpromptscript\u002Fblob\u002Fmain\u002Fpackages\u002Fresolver\u002Fsrc\u002F__tests__\u002F__fixtures__\u002Fmd-imports\u002Fskill-dir\u002Falpha\u002FSKILL.md",[],[5,19],"alpha skill","2026-11-10 10:12:30",false,"---\nname: rails-upgrade-4-to-5\ndescription: Upgrade a Ruby on Rails app from 4.x to 5.x — dual-boot via next_rails, ApplicationRecord introduction, ActionCable arrival, strong parameters becoming mandatory, params no longer hash-like, the version hop sequence, the Rails 5.1 system tests and `yarn` arrival, the Rails 5.2 ActiveStorage + credentials. Use when upgrading from Rails 4 to 5, the user mentions ApplicationRecord, strong parameters, params.permit, ActionCable, the params HashWithIndifferentAccess change, or asks how to leave Rails 4.\n---\n\n# Rails 4 → 5 Upgrade\n\n> Rails 4.2 → 5.0 is one of the biggest API breaks in the past decade. `params` stop being a Hash. Strong parameters become mandatory. ApplicationRecord arrives. Treat as a multi-month project for a non-trivial app.\n\n## The opinion\n\n> **Dual-boot with `next_rails`. Hop 4.2 → 5.0 → 5.1 → 5.2. Ruby 2.2.2+ for Rails 5.0; Ruby 2.5+ for 5.2. Budget weeks-to-months for a non-trivial app.**\n\n## The hop sequence\n\n```\n4.2 → 5.0 → 5.1 → 5.2\n```\n\n## Core patterns\n\n### Pattern 1: 4.2 → 5.0 — the breaking changes\n\n**Required code changes:**\n\n```ruby\n# Rails 4 — base model inheriting from ActiveRecord::Base\nclass User \u003C ActiveRecord::Base\nend\n\n# Rails 5 — inherit from ApplicationRecord\nclass User \u003C ApplicationRecord\nend\n\n# Generate the new base class\nbin\u002Frails generate application_record\n```\n\n**`params` change — biggest gotcha:**\n\n```ruby\n# Rails 4 — params was a HashWithIndifferentAccess\nparams[:user][:email]                 # worked\nparams.permit(:foo, :bar)             # explicit but not required\nUser.create(params[:user])            # silently allowed any column\n\n# Rails 5 — params is ActionController::Parameters\nparams[:user][:email]                 # works (subclass of Hash)\nparams.merge(...)                     # returns Parameters, not Hash\nUser.create(params[:user])            # raises ForbiddenAttributesError — must permit\n```\n\nAudit every `Model.create(params[:foo])` \u002F `update(params[:foo])` call. Add `permit`.\n\n**Other 5.0 changes:**\n- ActionCable arrives (no impact unless you use it).\n- `belongs_to` is required by default (`optional: true` to opt out).\n- Test framework default switches; `Rails.test` may need `--clean` runs.\n- `head :ok` after a `respond_to` block is no longer needed (slight behavior change).\n\n### Pattern 2: 5.0 → 5.1\n\n- yarn arrives for managing JS packages.\n- System tests (Capybara wrapper) ship.\n- `form_for` \u002F `form_tag` start to be deprecated in favor of `form_with`.\n- `secrets.yml` partially deprecated (full deprecation in 5.2).\n\n### Pattern 3: 5.1 → 5.2\n\n- Active Storage ships (file uploads).\n- Encrypted credentials (`config\u002Fcredentials.yml.enc`) replace `secrets.yml`.\n- `Date.current` recommended over `Date.today` for time-zone safety.\n\n```bash\n# Migrate secrets.yml → credentials\nEDITOR=vim bin\u002Frails credentials:edit\n# Paste secrets.yml contents into the encrypted file\n```\n\n### Pattern 4: `belongs_to` required\n\n```ruby\n# Rails 4 — nil author was allowed silently\nclass Post \u003C ApplicationRecord\n  belongs_to :author\nend\n\n# Rails 5 — validation fires on save if author is nil\n# Either fix the data or opt out:\nbelongs_to :author, optional: true\n```\n\nAudit every `belongs_to` for `optional: true` cases.\n\n## Common mistakes to refuse\n\n- Don't skip 5.0 (the Parameters change has to land cleanly).\n- Don't allow `Model.create(params[:foo])` in 5.0+; permit everything.\n- Don't migrate ActionCable + ApplicationRecord + secrets.yml in the same PR.\n\n## See also\n\n- `rails-upgrade-3-to-4` — previous hop\n- `rails-upgrade-5-to-6` — next hop\n\n## Sources\n\n- [Rails 5.0 release notes](https:\u002F\u002Fguides.rubyonrails.org\u002F5_0_release_notes.html)\n- [Rails 5.2 release notes](https:\u002F\u002Fguides.rubyonrails.org\u002F5_2_release_notes.html)\n- [Strong Parameters](https:\u002F\u002Fapi.rubyonrails.org\u002Fclasses\u002FActionController\u002FStrongParameters.html)\n- [Encrypted credentials guide](https:\u002F\u002Fguides.rubyonrails.org\u002Fsecurity.html#custom-credentials)\n- [FastRuby — Rails 5 upgrade walkthrough](https:\u002F\u002Fwww.fastruby.io\u002Fblog)\n","# Rails 4 → 5 Upgrade\n\n> Rails 4.2 → 5.0 is one of the biggest API breaks in the past decade. `params` stop being a Hash. Strong parameters become mandatory. ApplicationRecord arrives. Treat as a multi-month project for a non-trivial app.\n\n## The opinion\n\n> **Dual-boot with `next_rails`. Hop 4.2 → 5.0 → 5.1 → 5.2. Ruby 2.2.2+ for Rails 5.0; Ruby 2.5+ for 5.2. Budget weeks-to-months for a non-trivial app.**\n\n## The hop sequence\n\n```\n4.2 → 5.0 → 5.1 → 5.2\n```\n\n## Core patterns\n\n### Pattern 1: 4.2 → 5.0 — the breaking changes\n\n**Required code changes:**\n\n```ruby\n# Rails 4 — base model inheriting from ActiveRecord::Base\nclass User \u003C ActiveRecord::Base\nend\n\n# Rails 5 — inherit from ApplicationRecord\nclass User \u003C ApplicationRecord\nend\n\n# Generate the new base class\nbin\u002Frails generate application_record\n```\n\n**`params` change — biggest gotcha:**\n\n```ruby\n# Rails 4 — params was a HashWithIndifferentAccess\nparams[:user][:email]                 # worked\nparams.permit(:foo, :bar)             # explicit but not required\nUser.create(params[:user])            # silently allowed any column\n\n# Rails 5 — params is ActionController::Parameters\nparams[:user][:email]                 # works (subclass of Hash)\nparams.merge(...)                     # returns Parameters, not Hash\nUser.create(params[:user])            # raises ForbiddenAttributesError — must permit\n```\n\nAudit every `Model.create(params[:foo])` \u002F `update(params[:foo])` call. Add `permit`.\n\n**Other 5.0 changes:**\n- ActionCable arrives (no impact unless you use it).\n- `belongs_to` is required by default (`optional: true` to opt out).\n- Test framework default switches; `Rails.test` may need `--clean` runs.\n- `head :ok` after a `respond_to` block is no longer needed (slight behavior change).\n\n### Pattern 2: 5.0 → 5.1\n\n- yarn arrives for managing JS packages.\n- System tests (Capybara wrapper) ship.\n- `form_for` \u002F `form_tag` start to be deprecated in favor of `form_with`.\n- `secrets.yml` partially deprecated (full deprecation in 5.2).\n\n### Pattern 3: 5.1 → 5.2\n\n- Active Storage ships (file uploads).\n- Encrypted credentials (`config\u002Fcredentials.yml.enc`) replace `secrets.yml`.\n- `Date.current` recommended over `Date.today` for time-zone safety.\n\n```bash\n# Migrate secrets.yml → credentials\nEDITOR=vim bin\u002Frails credentials:edit\n# Paste secrets.yml contents into the encrypted file\n```\n\n### Pattern 4: `belongs_to` required\n\n```ruby\n# Rails 4 — nil author was allowed silently\nclass Post \u003C ApplicationRecord\n  belongs_to :author\nend\n\n# Rails 5 — validation fires on save if author is nil\n# Either fix the data or opt out:\nbelongs_to :author, optional: true\n```\n\nAudit every `belongs_to` for `optional: true` cases.\n\n## Common mistakes to refuse\n\n- Don't skip 5.0 (the Parameters change has to land cleanly).\n- Don't allow `Model.create(params[:foo])` in 5.0+; permit everything.\n- Don't migrate ActionCable + ApplicationRecord + secrets.yml in the same PR.\n\n## See also\n\n- `rails-upgrade-3-to-4` — previous hop\n- `rails-upgrade-5-to-6` — next hop\n\n## Sources\n\n- [Rails 5.0 release notes](https:\u002F\u002Fguides.rubyonrails.org\u002F5_0_release_notes.html)\n- [Rails 5.2 release notes](https:\u002F\u002Fguides.rubyonrails.org\u002F5_2_release_notes.html)\n- [Strong Parameters](https:\u002F\u002Fapi.rubyonrails.org\u002Fclasses\u002FActionController\u002FStrongParameters.html)\n- [Encrypted credentials guide](https:\u002F\u002Fguides.rubyonrails.org\u002Fsecurity.html#custom-credentials)\n- [FastRuby — Rails 5 upgrade walkthrough](https:\u002F\u002Fwww.fastruby.io\u002Fblog)\n",{"name":25,"description":26},"rails-upgrade-4-to-5","Upgrade a Ruby on Rails app from 4.x to 5.x — dual-boot via next_rails, ApplicationRecord introduction, ActionCable arrival, strong parameters becoming mandatory, params no longer hash-like, the version hop sequence, the Rails 5.1 system tests and `yarn` arrival, the Rails 5.2 ActiveStorage + credentials. Use when upgrading from Rails 4 to 5, the user mentions ApplicationRecord, strong parameters, params.permit, ActionCable, the params HashWithIndifferentAccess change, or asks how to leave Rails 4.","master","b45dc3fabf3946024f23f2b6d4b3c07cb288cfbb","packages\u002Fresolver\u002Fsrc\u002F__tests__\u002F__fixtures__\u002Fmd-imports\u002Fskill-dir\u002Falpha",7,"https:\u002F\u002Fgithub.com\u002Fmrwogu\u002Fpromptscript","https:\u002F\u002Fgetpromptscript.dev\u002F","https:\u002F\u002Fgithub.com\u002Fmrwogu","AI Developer Experience","2026-11-09 13:55:29",{"source":8,"skillName":25,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add mrwogu\u002Fpromptscript --skill rails-upgrade-4-to-5",{"tool":42,"command":43},"bunx","bunx skills add mrwogu\u002Fpromptscript --skill rails-upgrade-4-to-5",{"tool":45,"command":46},"pnpm","pnpm dlx skills add mrwogu\u002Fpromptscript --skill rails-upgrade-4-to-5","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmrwogu\u002Fpromptscript\u002Fblob\u002Fmain\u002Fpackages\u002Fresolver\u002Fsrc\u002F__tests__\u002F__fixtures__\u002Fmd-imports\u002Fskill-dir\u002Falpha\u002FSKILL.md",true,[50],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"evals.md","REFERENCE","参考文档",768,"https:\u002F\u002Fgithub.com\u002FMadBomber\u002Fexperiments\u002Fblob\u002Fmaster\u002Fai_misc\u002Fskills\u002Frails-skills\u002F19-rails-upgrade-4-to-5\u002Fevals.md",[57,93,102,118,141,163],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":73,"publishedAt":20},"01M6CDARG1R0SC1QS30MG6NH4Z","promptscript","PromptScript language expert for reading, writing, modifying, and troubleshooting .prs files. Use when working with PromptScript syntax, creating or editing .prs files, adding blocks like @identity, @standards, @restrictions, @shortcuts, @skills, or @agents, configuring promptscript.yaml, resolving compilation errors, understanding inheritance (@inherit), composition (@use, @extend, @override), contextual @header metadata, or migrating AI instructions to PromptScript. Also use when asked about the 50 built-in coding agent compilation targets, including GitHub Copilot, Claude Code, Cursor, Antigravity, Factory AI, and AGENTS.md-based platforms, or about the bundle and prompt-text targets for application prompts.","https:\u002F\u002Fgithub.com\u002Fmrwogu\u002Fpromptscript\u002Fblob\u002Fmain\u002Fskills\u002Fpromptscript\u002FSKILL.md",[63,68],{"categoryNo":64,"categoryName":65,"taxonomyType":66,"taxonomyTypeDesc":67},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",{"categoryNo":69,"categoryName":70,"taxonomyType":71,"taxonomyTypeDesc":72},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[59,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92],"kilo","windsurf","reading","factory-ai","goose","Composition","files","writing","text","inheritance","for","read","write","coding","identity","standards","gemini","kiro-cli","expert",{"skillNo":94,"name":92,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":20},"01M6CDANHZWNCXCKZQSGVZW8S8","Base expert skill","https:\u002F\u002Fgithub.com\u002Fmrwogu\u002Fpromptscript\u002Fblob\u002Fmain\u002Fpackages\u002Fresolver\u002Fsrc\u002F__tests__\u002F__fixtures__\u002Fskill-references\u002Fskills\u002Fexpert\u002FSKILL.md",[],[92,99,100,101],"base","references","spring",{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":109,"publishedAt":20},"01M6CDAK4J08AXZ8ZKX9VWP9NE","tdd-workflow","Test-driven development workflow","https:\u002F\u002Fgithub.com\u002Fmrwogu\u002Fpromptscript\u002Fblob\u002Fmain\u002Fpackages\u002Fresolver\u002Fsrc\u002F__tests__\u002F__fixtures__\u002Fregistry\u002Fnative-skills\u002Ftdd-workflow\u002FSKILL.md",[108],{"categoryNo":64,"categoryName":65,"taxonomyType":66,"taxonomyTypeDesc":67},[110,111,112,113,114,115,116,117],"tdd workflow","tdd","workflow","driven","test-driven","test","development workflow","development",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":122,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":128,"publishedAt":20},"01M6CDAEB3EZ86CQSYM28J34ZS","pdf-processing","Extract PDF text, fill forms, merge files. Use when handling PDFs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmrwogu\u002Fpromptscript\u002Fblob\u002Fmain\u002Fpackages\u002Fformatters\u002Fsrc\u002F__tests__\u002Ffixtures\u002Fplatform-contracts\u002Fgemini\u002Fskill.md",[125],{"categoryNo":126,"categoryName":127,"taxonomyType":66,"taxonomyTypeDesc":67},"01JBSEEDCAT000000000000002","文档处理",[129,130,131,132,133,80,134,82,135,136,137,138,139,140],"processing","pdf processing","PDF","org","example","use","merge","extract","when","fill","extract pdf","forms",{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":145,"categories":146,"keywords":150,"publishedAt":20},"01M6CDABP7FSQ9BY079P1QWJR2","react-component-patterns","Conventions for writing React components in this codebase.","https:\u002F\u002Fgithub.com\u002Fmrwogu\u002Fpromptscript\u002Fblob\u002Fmain\u002Fpackages\u002Fformatters\u002Fsrc\u002F__tests__\u002Ffixtures\u002Fplatform-contracts\u002Fcursor\u002Fskill.md",[147],{"categoryNo":148,"categoryName":149,"taxonomyType":66,"taxonomyTypeDesc":67},"01JBSEEDCAT000000000000009","前端开发",[151,152,153,154,155,156,157,81,158,159,160,84,161,162],"react component","patterns","component","react","react component patterns","ui","tsx","components","react components","packages","codebase","conventions",{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":173,"publishedAt":20},"01M6CDA8P4H25QD7EPHBJQCEEV","deploy-app","Deploy the application to staging or production environments. Use when deploying code or when the user mentions deployment, releases, or environments.","https:\u002F\u002Fgithub.com\u002Fmrwogu\u002Fpromptscript\u002Fblob\u002Fmain\u002Fpackages\u002Fformatters\u002Fsrc\u002F__tests__\u002Ffixtures\u002Fplatform-contracts\u002Fcodex\u002Fskill.md",[169,172],{"categoryNo":170,"categoryName":171,"taxonomyType":66,"taxonomyTypeDesc":67},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":69,"categoryName":70,"taxonomyType":71,"taxonomyTypeDesc":72},[174,175,176,177,134,178,179,180,181,137,182,183],"deploy","deploy app","app","deployment","code","releases","Production","user","environments","application"]