/prometheus-react-skills:entity-graph-graphqlfrom prometheus-react-skills
Set up the GraphQL layer for @prometheus-ags/prometheus-entity-management: GQLClient, EntityDescriptor trees, response normalization into the Zustand entity graph, and typed hooks (useGQLEntity, useGQLList, useGQLMutation, useGQLSubscription). Supports schema-driven descriptor generation from .graphql files or introspection of a running endpoint. Sub-skills cover setup, hook codegen patterns, and wiring subscriptions through graphql-ws plus RealtimeManager.
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.
Read when SKILL.md points to them; scripts run unread.
This skill guides integration of @prometheus-ags/prometheus-entity-management GraphQL APIs with the shared entity graph. Queries and mutations normalize through EntityDescriptor definitions; results coexist with REST-loaded entities so Post:123 updates every subscriber regardless of transport.
.graphql types into EntityDescriptor configs.GQLClient.subscribe / useGQLSubscription or createGraphQLSubscriptionAdapter + RealtimeManager.| Layer | Responsibility |
|---|---|
GQLClient | query / mutate with dedupe; calls normalizeGQLResponse on success |
normalizeGQLResponse | Walks descriptor paths, upsertEntity, setEntityFetched |
| Hooks | useGQLEntity, useGQLList, useGQLMutation, useGQLSubscription — same graph as REST |
| Realtime | Optional: createGraphQLSubscriptionAdapter emits ChangeSet for RealtimeManager |
| Command | Purpose |
|---|---|
/entity-gql-setup | Scaffold createGQLClient, auth headers, and descriptor set from schema |
/entity-gql-hooks | Produce typed hook usage for specific operations (entity, list, mutation) |
/entity-gql-subscription | Wire WebSocket client + descriptors or adapter + manager |
prompts/specify.md: endpoint, SDL vs introspection, auth.prompts/plan.md: entity types, paths, relation nesting, side descriptors.prompts/execute.md: generate client module, descriptors, hook wrappers.prompts/reflect.md: verify graph writes, list keys, error handling.prompts/persist.md: document conventions for the repo.agents/schema-analyzer.md — Parse SDL / introspection JSON for types, connections, edges.agents/descriptor-generator.md — Emit EntityDescriptor trees and extractId rules.references/gql-normalization.md — How path, walk, and relations behave.references/descriptor-patterns.md — Relay connections, unions, interfaces.CLAUDE.md)useGraphStore directly; use hooks.fetch the GraphQL HTTP endpoint themselves — delegate to GQLClient (or a thin wrapper module the hook calls). The library’s hooks already encapsulate this pattern.GQLClient in a module imported by hooks.| Source | When to use | Agent |
|---|---|---|
Committed .graphql / .gql | Schema-first repos, codegen already in CI | schema-analyzer on SDL |
| Introspection JSON | No SDL in repo; need field-accurate types from a server | Run introspection once (dev/staging), store redacted schema.json, then analyzer |
Introspection (illustrative) — adjust headers and URL for your gateway:
curl -sS -X POST "$GRAPHQL_HTTP_URL" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"query":"query Introspect { __schema { types { name kind } } }"}' | jq . > schema-introspection.json
For full schema, use your stack’s standard tool (graphql-inspector, Apollo CLI, or get-introspection-query from graphql). Never commit production secrets embedded in schema description fields.
Monorepo examples use pnpm only.
AGENTS.md (opens in a new tab)CLAUDE.md (opens in a new tab)agents/descriptor-generator.md (opens in a new tab)agents/schema-analyzer.md (opens in a new tab)hooks/hooks.json (opens in a new tab)prompts/execute.md (opens in a new tab)prompts/persist.md (opens in a new tab)prompts/plan.md (opens in a new tab)prompts/reflect.md (opens in a new tab)prompts/specify.md (opens in a new tab)references/descriptor-patterns.md (opens in a new tab)references/gql-normalization.md (opens in a new tab)scripts/detect-orchestrators.sh (opens in a new tab)scripts/state-init.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
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-crud-pageScaffold a full CRUD page (list, create, edit, detail, delete) using useEntityCRUD with EntityTable, EntityDetailSheet, and EntityFormSheet. Enforces Components → Hooks → Stores: page composes only; useXxxCRUD hook wraps library CRUD; API module holds fetch/mutations.
/entity-crud-relationsRegister EntitySchema graphs with registerSchema: belongsTo, hasMany, manyToMany, listKeyPrefix alignment, invalidateTargetLists, globalListKeys, and verification that cascadeInvalidation matches list query keys.
/entity-crud-tableBuild EntityTable views with column helpers (textColumn, numberColumn, enumColumn, etc.), SortHeader, selectionColumn, and meta.entityMeta for filters; sync sorting and search with useEntityView via UseEntityViewResult.
/entity-gcSlash command /entity-gc — design application-level eviction for @prometheus-ags/prometheus-entity-management: removeEntity for stale entities, clearPatch for UI overlays, list refresh after bulk delete, route-based cleanup, and policies for long-lived sessions. Notes library has no automatic GC yet.
2 plugins in one repository ship this exact skill · first indexed Nov 27, 2026