mcpField
R
rails-guides

rails-guides

github.com/midudev开发7.0k56 次安装2 周前更新
代码仓库

关于 rails-guides

这是一套按框架主题整理的 Rails 官方文档参考技能,供开发者和编码 Agent 在开发应用时查阅 Rails 概念与 API。

主要功能

  1. 01Rails 安装与配置
  2. 02Active Record 与数据库主题
  3. 03控制器、视图与路由
  4. 04任务、邮件、存储与测试
  5. 05安全、性能与扩展

适用场景

  1. 01开发应用时查询 Rails 行为
  2. 02查看数据库、路由或控制器模式
  3. 03参考测试与安全指南
  4. 04了解 Rails 扩展和升级主题

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/midudev/autoskills --skill rails-guides

安装后在 Claude Code 中输入/rails-guides确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/
action_cable_overview.md
action_controller_advanced_topics.md
action_controller_overview.md
action_mailbox_basics.md
action_mailer_basics.md
action_text_overview.md
action_view_helpers.md
action_view_overview.md
active_job_basics.md
active_model_basics.md
active_record_basics.md
active_record_callbacks.md
active_record_composite_primary_keys.md
active_record_encryption.md
active_record_migrations.md
active_record_multiple_databases.md
active_record_postgresql.md
active_record_querying.md
active_record_validations.md
active_storage_overview.md
active_support_core_extensions.md
active_support_instrumentation.md
api_app.md
asset_pipeline.md
association_basics.md
autoloading_and_reloading_constants.md
caching_with_rails.md
command_line.md
configuring.md
debugging_rails_applications.md

详细介绍

Rails 指南

开发期间参考的 Rails 官方文档。

主题索引

入门
  • references/getting_started.md — Rails 基础知识、MVC 概览、第一个应用的操作指南
  • references/command_line.md — rails 命令、生成器、rake 任务
  • references/configuring.md — 环境、初始化器、凭据、database.yml
  • references/autoloading_and_reloading_constants.md — Zeitwerk、模块命名、重新加载行为
  • references/initialization.md — Rails 启动顺序、railties、引擎
Active Record
  • references/active_record_basics.md — 模型、CRUD、约定、迁移
  • references/active_record_querying.md — 查找器、作用域、联接、预加载、explain
  • references/active_record_validations.md — 内置验证器、自定义验证器、错误
  • references/active_record_callbacks.md — 生命周期钩子、after_commit、skip_callback
  • references/association_basics.md — belongs_to、has_many、has_one、HABTM、多态
  • references/active_record_migrations.md — 架构变更、可逆迁移、db:migrate
  • references/active_record_encryption.md — 静态数据的属性加密
  • references/active_record_composite_primary_keys.md — 多列主键
  • references/active_record_multiple_databases.md — 多数据库配置、分片、只读副本
  • references/active_record_postgresql.md — PostgreSQL 专属功能(hstore、jsonb、数组)
  • references/active_model_basics.md — 在 ActiveRecord 外使用 ActiveModel、表单对象
Action Controller
  • references/action_controller_overview.md — 控制器、params、过滤器、会话、Cookie
  • references/action_controller_advanced_topics.md — 流式处理、实时功能、metal、HTTP 身份验证
  • references/routing.md — 资源、命名空间、约束、命名路由、URL 助手
Action View
  • references/action_view_overview.md — 模板、局部模板、布局、格式
  • references/action_view_helpers.md — form_with、link_to、tag、content_tag、资源助手
  • references/form_helpers.md — form_with、字段助手、嵌套表单、上传
  • references/layouts_and_rendering.md — render、redirect_to、respond_to、布局继承
前端 / Hotwire
  • references/working_with_javascript_in_rails.md — Import Maps、Turbo、Stimulus 概览
  • references/action_text_overview.md — 使用 Trix 实现富文本、附件
任务与邮件程序
  • references/active_job_basics.md — 任务类、队列、重试、测试助手
  • references/action_mailer_basics.md — 邮件程序、模板、投递、预览
  • references/action_mailbox_basics.md — 收件邮件的路由与处理
存储
  • references/active_storage_overview.md — 文件上传、变体、直接上传、S3/GCS/Azure
测试
  • references/testing.md — Minitest、固定数据、测试类型、助手、断言
实时功能
  • references/action_cable_overview.md — WebSocket、通道、广播、连接
安全与性能
  • references/security.md — SQL 注入、XSS、CSRF、批量赋值、安全响应头
  • references/caching_with_rails.md — 片段缓存、动作缓存、HTTP 缓存、缓存存储
  • references/asset_pipeline.md — Sprockets、Propshaft、预编译、摘要
  • references/tuning_performance_for_deployment.md — Puma、连接池、GC
国际化
  • references/i18n.md — 翻译文件、区域设置、复数形式、日期格式
API 与 Rack
  • references/api_app.md — 仅 API 的 Rails、精简中间件栈
  • references/rails_on_rack.md — 中间件栈、Rack 集成
扩展 Rails
  • references/engines.md — 可挂载引擎、隔离命名空间、钩子、测试
  • references/generators.md — 自定义生成器、模板、覆盖默认值
  • references/plugins.md — 创建基于 gem 的插件、核心扩展、测试
高级
  • references/active_support_core_extensions.md — String、Array、Hash、Date 扩展
  • references/active_support_instrumentation.md — 通知、日志订阅器
  • references/association_basics.md — 关联选项、预加载策略
  • references/debugging_rails_applications.md — debug gem、logger、web-console、byebug
  • references/error_reporting.md — Error::Reporter、Sentry 集成
  • references/threading_and_code_execution.md — 线程安全、执行器、重新加载器
  • references/upgrading_ruby_on_rails.md — 版本升级路径、弃用处理

评论

支持 Markdown