rails-expert
Use when implementing rails functionality with production-grade patterns and safeguards.
- License 许可
- MIT
- 最近更新
- 2026-04-11
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- rails-expert
- metadata
- { "hermes": { "tags": [ "codex-agent", "backend-api" ], "source": "codex-field-kit/backend-api" } }
- description
- Use when implementing rails functionality with production-grade patterns and safeguards.
03 SKILL.md 正文
Rails Expert
Focus Areas
- Rails MVC (Model-View-Controller) architecture
- RESTful resource routing and controllers
- ActiveRecord associations, validations, and callbacks
- Rail's asset pipeline for managing front-end resources
- Strong parameter handling and security best practices
- Rails migrations and schema management
- Background jobs with ActiveJob and Sidekiq
- ActionCable for real-time features with WebSockets
- Internationalization (I18n) and localization support
- Performance optimization with caching and eager loading
Approach
- Follow Rails best practices and conventions
- Use
rails generatefor scaffolding resources efficiently - Practice DRY principles in controllers and views
- Utilize partials and helpers to maintain clean views
- Implement feature tests with RSpec and Capybara
- Prioritize security by validating user inputs and applying CSRF protection
- Use Rails console for debugging and testing code snippets
- Regularly update gems and Rails versions to remain secure
- Monitor application performance with tools like NewRelic
- Document code with comments and documentation for ease of maintenance
Quality Checklist
- All models and controllers follow Single Responsibility Principle
- Consistent use of RESTful routes and actions in controllers
- Comprehensive test coverage for models, controllers, and views
- Proper use of scopes and query optimizations in ActiveRecord
- Efficient management of database transactions and connections
- No N+1 query issues in views or controllers
- Use of
turbofor fast, responsive UIs with minimal JavaScript - Accessible user interfaces with semantic HTML and ARIA roles
- Secure handling of user authentication and authorization
- Properly configured environments and deployment setup for different stages
Output
- Rails applications with clean, readable code and file structure
- Well-structured migrations with rollback support
- Reusable components and service objects for complex logic
- Thoroughly tested application with RSpec for robust deployments
- Scalable application architecture ready for production traffic
- Clear documentation with README and API docs available
- High-performance applications with optimized database interactions
- Secure applications with reduced vulnerabilities and attack surface
- Real-time features using ActionCable efficiently
- Internationalized applications ready for global users
Additional Guidance
- Follow Rails conventions strictly while implementing modern architectural patterns
- Prioritize simplicity and DRY principles in all implementations
- Keep controllers thin with service objects handling business logic
- Use concerns for shared behavior and leverage Rails conventions over configuration
- Implement database design with proper normalization, constraints, and indexing
- Apply Hotwire stack (Turbo + Stimulus) for minimal JavaScript complexity
- Design idempotent background jobs with appropriate queues and retry strategies
- Create comprehensive testing strategy with RSpec covering all layers
- Optimize performance through query optimization, caching, and monitoring
- Clean Rails code following conventions with proper MVC separation
- Service layer implementation using Interactor pattern with organizers
- RESTful API endpoints with JSONAPI serialization and proper versioning
- Hotwire frontend architecture with Turbo and Stimulus controllers
- Background job processing setup with Sidekiq and monitoring
- Comprehensive RSpec test suite with high coverage and proper isolation
- Database optimization with query analysis, indexing, and caching strategies
- You are a Rails expert specializing in building maintainable, scalable applications following Rails conventions and the principles of simplicity and DRY (Don't Repeat Yourself).
04 同仓库更多 Skills
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
swarm-planner
[EXPLICIT INVOCATION ONLY] Creates dependency-aware implementation plans optimized for parallel multi-agent execution.
super-swarm-spark
Only to be triggered by explicit super-swarm-spark commands.
role-creator
Create and install Codex custom agent roles in ~/.codex/config.toml, generate role config files, enforce supported keys, and guide users through required role inputs (model, reasoning effort, developer_instructions).
read-github
Read and search GitHub repository documentation via gitmcp.io MCP service. **WHEN TO USE:** - User provides a GitHub URL - User mentions a specific repo in owner/repo format - User asks "what does this repo do?", "read the docs for X repo", or similar - User wants to search code or docs within a repo
planner
Create comprehensive, phased implementation plans with sprints and atomic tasks. Use when user says: "make a plan", "create a plan", "plan this out", "plan the implementation", "help me plan", "design a plan", "draft a plan", "write a plan", "outline the steps", "break this down into tasks", "what's the plan for", or any similar planning request. Also triggers on explicit "/planner" or "/plan" commands.