plutonium-definition-query

Configure search, filters, scopes, and sorting for Plutonium resource definitions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Plutonium resource definitions require a unified configuration surface to govern how lists are searched, filtered, scoped, and sorted, ensuring consistent behavior across the UI and APIs.

Core Features & Use Cases

  • Define a search block to implement full-text or field-specific search across resource attributes.
  • Declare filters (text, boolean, date, association) to enable dynamic, user-friendly refinement panels.
  • Configure scopes (inline and named) and a default_scope to drive quick-filter decisions and default views.
  • Specify sortable columns and default_sort to produce predictable, stable ordering for resource collections.
  • Real-world use: tailor a PostDefinition to support searching by title, filtering by status, and sorting by created_at in the admin portal.

Quick Start

Configure a PostDefinition by adding a search block, filters, scopes, and sorts to control how resource lists behave.

Frequently Asked Questions about plutonium-definition-query

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

FAQPage Schema
How do I configure search and filters for Rails resource collections?

You can configure search and filters for Rails resource collections by defining a search block and declaring filter types within a Plutonium ResourceDefinition class, enabling full-text search and dynamic refinement panels across UI and APIs.

What is the best way to add sortable columns and default scopes to a Rails admin portal?

Adding sortable columns and default scopes to a Rails admin portal is done by specifying sortable attributes and a default_scope in your Plutonium resource definitions, which ensures predictable ordering and quick-filter views for collections.

Can I define field-specific search and association filters in Plutonium resource definitions?

Yes, you can define field-specific search and association filters in Plutonium resource definitions by implementing a search block for targeted attribute queries and declaring association filters to enable user-friendly refinement panels.

How does Plutonium handle default sorting and quick scopes for resource lists?

Plutonium handles default sorting and quick scopes by allowing you to configure a default_sort for stable ordering and declare inline or named scopes within ResourceDefinition classes to drive quick-filter decisions for resource lists.

Do I need a specific DSL to set up text, boolean, and date filters for Rails resources?

You need the Plutonium resource definition DSL to set up text, boolean, and date filters, as it provides the required configuration surface to declare dynamic filter panels and ensure consistent behavior across UI and APIs.