blueprint-gem
<essential_principles>
# Good - concise
fields :id, :name, :email, :created_at
# Only use singular when needed
field :full_name do |user|
"#{user.first_name} #{user.last_name}"
end
</essential_principles>
<quick_reference>
fields :email, :name, :created_at end
Usage
UserBlueprint.render(user) # JSON string UserBlueprint.render_as_hash(user) # Ruby Hash
</pattern>
<pattern name="computed-field">
```ruby
field :full_name do |user|
"#{user.first_name} #{user.last_name}"
end
# With options access
field :display_name do |user, options|
options[:admin] ? user.admin_name : user.public_name
end
Usage
UserBlueprint.render(user, view: :extended)
</pattern>
<pattern name="conditional-field">
```ruby
field :salary, if: ->(field_name, user, options) { options[:show_salary] }
field :age, unless: ->(field_name, user, options) { user.hide_age? }
</quick_reference>
- Create a new blueprint
- Understand a specific concept (views, associations, transformers, etc.)
- Debug a blueprint issue
- Something else
For option 2, specify the concept and I'll load the relevant reference.
After reading, apply the knowledge to the user's specific situation.
<reference_index>
Core Concepts:
- fields-and-identifiers.md - Fields, identifiers, computed fields, field options
- views.md - Views, include/exclude, view inheritance
- associations.md - Nested blueprints, polymorphic associations
Advanced:
- configuration.md - Global config, JSON generators, field sorting
- transformers-and-extractors.md - Custom transformers and extractors
- conditionals-and-defaults.md - Conditional fields, defaults, nil handling
Troubleshooting:
- anti-patterns.md - Common mistakes and how to fix them
</reference_index>
<workflows_index>
| Workflow | Purpose |
|---|---|
| create-blueprint.md | Create a new blueprint with proper structure |
| </workflows_index> |
More from faqndo97/ai-skills
kamal-deployment
Deploy containerized applications (especially Rails) to VPS using Kamal 2. Covers deploy.yml configuration, accessories (PostgreSQL, Redis, Sidekiq), SSL/TLS, secrets management, CI/CD with GitHub Actions, database backups, server hardening, debugging, and scaling. Use when setting up Kamal, configuring deployments, troubleshooting deploy issues, or managing production infrastructure with Kamal.
31stimulus
Build Stimulus controllers from scratch through production. Full lifecycle - create, debug, test, optimize, integrate with Turbo. Covers targets, values, actions, outlets, and UI patterns.
22ruby-llm
Build AI-powered Ruby applications with RubyLLM. Full lifecycle - chat, tools, streaming, Rails integration, embeddings, and production deployment. Covers all providers (OpenAI, Anthropic, Gemini, etc.) with one unified API.
20ruby-on-rails
Build Ruby on Rails features from scratch through production. Full lifecycle - build, debug, test, optimize, refactor. Follows Vanilla Rails philosophy (37signals/DHH), SOLID principles, and Rails 8 patterns.
19noticed
Build Rails notifications with the noticed gem. Full lifecycle - create notifiers, configure delivery methods (email, Slack, push, SMS, ActionCable), debug, and test. Covers individual and bulk delivery patterns.
15shadcn-ui
Build production-ready React/Next.js UIs with shadcn/ui components. Full lifecycle - install, customize, compose, debug, optimize. Covers components, forms, tables, theming, animations, and hooks.
14