/prometheus-react-skills:entity-gql-hooksfrom prometheus-react-skills
Slash command /entity-gql-hooks — produce typed useGQLEntity, useGQLList, useGQLMutation wrappers for concrete GraphQL documents; wire queryKey, getItems, getPagination, sideDescriptors, and invalidateLists for @prometheus-ags/prometheus-entity-management.
Ships in prometheus-react-skills. 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.
User has (or will have) GQLClient + descriptors and needs React hook wrappers for specific operations.
For each operation, choose hook:
useGQLEntityuseGQLListuseGQLMutationType parameters
TData: shape of data from the operation (narrow as much as possible).TEntity: normalized entity stored in graph (must extend Record<string, unknown>).List wiring
queryKey: include all filter/sort variables that should isolate list state.getItems: defensive ?? [] for nullable connections.getPagination: map your schema’s page info.Mutations
descriptors when payload includes entities to merge.invalidateLists: pass serializeKey-compatible keys from list hooks, or raw string keys if using graph store’s list invalidation API consistently.refs
useRef for options; wrappers should pass stable client reference.List invalidation after mutations
invalidateLists expects the same string key the list hook uses internally: serializeKey(queryKey) from @prometheus-ags/prometheus-entity-management (see src/engine.ts). Example:import { serializeKey } from "@prometheus-ags/prometheus-entity-management";
const LIST_KEY = ["Post", "list", "dashboard"] as const;
export function usePostsList() {
return useGQLList<PostsData, Post>({
/* ... */
queryKey: [...LIST_KEY],
});
}
export function useUpdatePost() {
return useGQLMutation<UpdateData, Post>({
client: gqlClient,
document: UPDATE_POST,
type: "Post",
descriptors: [postDescriptor],
invalidateLists: [serializeKey([...LIST_KEY])],
});
}
export function usePostSubscription(id: string) {
return useGQLSubscription<SubData>({
client: gqlClient,
wsClient,
document: POST_CHANGED,
variables: { id },
descriptors: [postDescriptor],
enabled: !!id,
});
}
useState alongside graph-backed hooks.sideDescriptors when the query returns multiple entity types that UI reads elsewhere.../prompts/execute.md — code patternssrc/graphql/hooks.tsWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub prometheus-ags/prometheus-skill-system --plugin prometheus-react-skills28 skills in this plugin
/entity-auditSlash command /entity-audit — run full codebase audit against @prometheus-ags/prometheus-entity-management CLAUDE.md rules: component/store boundaries, hook I/O, registerSchema coverage, JSDoc on public hooks, and realtime/list patterns. Produces a severitized report using references/audit-checklist.md.
/entity-crud-formBuild EntityFormSheet and EntityDetailSheet configurations from FieldDescriptor arrays: field types, enum options, readonly/create/edit flags, custom editControl/render, and wiring to useEntityCRUD buffers and actions.
/entity-Other plugins' skills for the same job
2 plugins in one repository ship this exact skill · first indexed Nov 27, 2026