plutonium-definition-actions

Define custom resource actions and interactions for Plutonium resources.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Plutonium resources often require custom operations that go beyond standard CRUD. This skill provides a structured way to define, expose, and reuse resource actions and interactions across different portals and definitions, ensuring consistent behavior and governance.

Core Features & Use Cases

  • Define action types such as resource_action, record_action, collection_record_action, and bulk_action with optional interactions.
  • Create interactive actions using Interaction classes and declarative inputs to drive business logic.
  • Inherit actions from a base ResourceDefinition and override or extend actions per portal for customization.
  • Ensure authorization and UI integration through policies and default CRUD plumbing.

Quick Start

Create a new action in a ResourceDefinition and pair it with an Interaction to enable a custom operation.

Frequently Asked Questions about plutonium-definition-actions

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

FAQPage Schema
How do I define custom resource actions in a Rails application beyond standard CRUD?

You can define custom resource actions in Rails by using a ResourceDefinition to declare action types like resource_action, record_action, or bulk_action, paired with Interaction classes to drive the underlying business logic and UI inputs.

What is the best way to add bulk actions to a resource portal?

The best way to add bulk actions to a resource portal is by declaring a bulk_action within your ResourceDefinition, optionally pairing it with an Interaction class to handle multi-record processing and declarative inputs.

Can I override inherited resource actions for a specific portal definition?

Yes, you can inherit actions from a base ResourceDefinition and override or extend them per portal, allowing customized behavior and governance while maintaining consistent UI integration and authorization checks.

How do interactive actions work with Interaction classes in Rails resources?

Interactive actions work by pairing an action declaration with an Interaction class that uses declarative inputs to capture user data, driving complex business logic directly from the resource UI.

Does defining custom resource actions require authorization checks?

Yes, defining custom resource actions includes ensuring authorization through policies and default CRUD plumbing, governing access to interactive, bulk, and simple actions across portals and definitions.

When should I use collection_record_action instead of a standard record_action?

Use collection_record_action when you need to apply operations across multiple records within a collection context, whereas record_action targets single record operations within your resource definition.