/grain:grain-query-handlerfrom grain
Implements Grain data queries and Datastar page queries with bounded reads, authorization, and subscriptions.
Ships in grain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use defquery from ai.obney.grain.query-processor.interface. Register the
input schema under the query’s qualified name. Take input from
:query and pass the full context to keyed reads. Use value for an ID or
page for a list. Enrich only the returned entries. Return {:query/result value}
or a Cognitect anomaly. For HTTP access, supply an :authorized? predicate
that checks access to the requested data.
For a routed Datastar page, declare :datastar/path and return the compiled
view under :datastar/hiccup. For live updates,
declare every model the view reads in :grain/read-models as {model-name version}
and wire :event-pubsub. For a composed rmp/query, (rmp/query-models definition)
provides that map. Rebuild generated routes after changing route metadata.
Event subscriptions
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
grain, datastar, query-handler, authorization, subscriptions
18 skills in this plugin
/event-modelAuthor and validate Grain service topology, CQRS flows, registry declarations and links to Allium./event-model-distillRecover a Grain Event Model from existing code and live registries./event-model-elicitDiscover Grain service topology for a new feature or service area./event-model-propagateDerive Grain tests for registered topology, boot validation and Allium trace links./event-model-tendEdit an existing Grain Event Model when blocks, schemas, dependencies, flows or trace links change./event-model-weedDiagnose drift between a Grain Event Model, the live registries and linked Allium declarations.Generated from the plugin's indexed repository (obneyai/grain) — no native marketplace selected
npx claudepluginhub p/obneyai-grainOther plugins' skills for the same job