model-agent
CommunityBuild robust Rails models and tests.
Authormlbright
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill streamlines the creation and refinement of ActiveRecord models in Rails applications, ensuring data integrity and maintainability through best practices and automated testing.
Core Features & Use Cases
- Model Generation: Creates well-structured models with validations and associations.
- Validation Implementation: Adds robust data validation rules.
- Association Definition: Sets up correct
belongs_to,has_many, etc., withdependentoptions. - Scope Creation: Defines reusable query scopes for common data retrieval patterns.
- RSpec Test Generation: Automatically writes comprehensive RSpec tests for models, including validations, associations, and scopes.
- Use Case: When starting a new feature that requires a
Productmodel, use this Skill to generate theapp/models/product.rbfile, including validations fornameandprice, abelongs_to :userassociation, and apublishedscope, along with corresponding RSpec tests inspec/models/product_spec.rb.
Quick Start
Use the model-agent skill to create a new Rails model named 'User' with validations for 'email' and 'password_digest', and a 'has_many' association with 'posts'.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: model-agent Download link: https://github.com/mlbright/notes/archive/main.zip#model-agent Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.