plutonium-model

Structure Plutonium resource models with Plutonium::Resource::Record and standard sections.

68|10|Updated Jan 10, 2024
One-click install
npx skills add https://github.com/radioactive-labs/plutonium-core --skill plutonium-model
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plutonium-model
Source: https://github.com/radioactive-labs/plutonium-core/tree/main/.claude/skills/plutonium-model
Command: npx skills add https://github.com/radioactive-labs/plutonium-core --skill plutonium-model

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Standardizes the structure and setup of Plutonium resource models to reduce boilerplate and ensure consistent behavior across Rails apps.

Core Features & Use Cases

  • Standard model template enforcing Concerns, Constants, Enums, and Associations
  • Guides for multi-tenant structures and rich attributes like HasCents and attachments
  • Use Case: Define a Property model with resource record behavior and common patterns

Quick Start

Create a new Rails model that includes Plutonium::Resource::Record and follow the section order described to implement a Resource.

Frequently Asked Questions about plutonium-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Rails resource models for multi-tenancy and associations?

Structure Plutonium resource models by including Plutonium::Resource::Record and organizing modules in a specific section order: Concerns, Constants, Enums, and Associations, reducing boilerplate across Rails applications.

What is the best way to define a Property model using Plutonium?

Define a Property model by including Plutonium::Resource::Record and applying guided patterns for rich attributes like HasCents, attachments, and multi-tenant structures within the standardized template.

How do I handle enums and attachments in Active Record with Plutonium?

Plutonium provides a standard model template that guides the organization of enums and attachments alongside associations and multi-tenant patterns within Active Record resource models.

Does Plutonium work with existing Rails multi-tenant applications?

Yes, Plutonium integrates with existing Rails applications by providing a standardized resource record structure that enforces consistent multi-tenant patterns, enums, and associations without requiring external dependencies.

When do I need to standardize resource models in a Rails app?

You need to standardize resource models when boilerplate accumulates across multiple Active Record definitions and you require consistent behavior for concerns, multi-tenancy, and rich attributes like HasCents.

What are the limitations of using Plutonium for resource model organization?

Plutonium focuses specifically on structuring resource models using Plutonium::Resource::Record and does not provide external dependencies, limiting its scope to standardizing Active Record patterns within the Rails ecosystem.