什么是 controller-patterns?
审查和更新现有的 Rails 控制器,并按照专业模式和最佳实践生成新的控制器。涵盖 RESTful 约定、授权模式、正确的错误处理和可维护的代码组织。 来源:rolemodel/rolemodel-skills。
审查和更新现有的 Rails 控制器,并按照专业模式和最佳实践生成新的控制器。涵盖 RESTful 约定、授权模式、正确的错误处理和可维护的代码组织。
通过命令行快速安装 controller-patterns AI 技能到你的开发环境
来源:rolemodel/rolemodel-skills。
Purpose This skill helps AI agents review existing Rails controllers and generate new controllers following professional patterns and best practices. It covers RESTful conventions, authorization patterns, proper error handling, and maintainable code organization that can be applied to any Rails application.
Implement authorization checks for all actions that interact with resources. This example uses Pundit, but the pattern applies to any authorization framework (CanCanCan, ActionPolicy, etc.).
Use beforeaction to DRY up your controllers by extracting common setup logic.
审查和更新现有的 Rails 控制器,并按照专业模式和最佳实践生成新的控制器。涵盖 RESTful 约定、授权模式、正确的错误处理和可维护的代码组织。 来源:rolemodel/rolemodel-skills。
为搜索与 AI 引用准备的稳定字段与命令。
npx skills add https://github.com/rolemodel/rolemodel-skills --skill controller-patterns审查和更新现有的 Rails 控制器,并按照专业模式和最佳实践生成新的控制器。涵盖 RESTful 约定、授权模式、正确的错误处理和可维护的代码组织。 来源:rolemodel/rolemodel-skills。
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/rolemodel/rolemodel-skills --skill controller-patterns 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/rolemodel/rolemodel-skills