/enonic-skills:enonic-guillotine-query-builderfrom enonic-skills
Composes, debugs, and optimizes Guillotine GraphQL queries for Enonic XP headless content delivery. Covers query construction, variable usage, filtering, aggregation, pagination, sorting, and TypeScript type generation from the auto-generated Guillotine schema. Use when writing or troubleshooting Guillotine queries, querying custom content types through GraphQL, or generating typed interfaces from Guillotine responses. Don't use for content type XML definitions, non-Enonic GraphQL APIs (Apollo, Hasura), server-side lib-content queries, or Guillotine deployment and CORS configuration.
Ships in enonic-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.
Step 1: Scan the workspace for existing Guillotine usage
node scripts/find-guillotine-targets.mjs . to inventory files containing Guillotine markers (query strings, library imports, endpoint references).guillotine, queryDsl, queryDslConnection, or /lib/guillotine in .ts, .js, .graphql, and .gql files.query(query: "...") string-based fields are found, the project uses the deprecated 5.x-style API; if queryDsl / queryDslConnection are found, the project uses 6.x+ DSL. Check for exports.extensions in guillotine/guillotine.js to detect Guillotine 7 Extensions API usage.Step 2: Load the Guillotine API reference
references/guillotine-reference.md before composing any query.references/compatibility.md when the workspace targets or migrates between Guillotine versions.Step 3: Determine the query shape
get(key).getChildren(key) or getChildrenConnection(key) for pagination.queryDsl(query) for a flat list or queryDslConnection(query) for pagination, aggregations, or highlighting.getType(name) or getTypes.queryDslConnection, getChildrenConnection) and guide the caller to pass after / first.queryDslConnection — these features are not available on queryDsl.Step 4: Construct the content type fragment
.) and colons (:) with underscores (_), and removing hyphens (-) while capitalizing the following letter. The first letter of each segment after a colon is capitalized. Example: com.enonic.app.myapp:BlogPost → com_enonic_app_myapp_BlogPost. For built-in types: portal:template-folder → portal_TemplateFolder.data field: ... on <GraphQLTypeName> { data { ... } }.processedHtml and optionally links, images, macros sub-fields. Use the processHtml input argument for absolute URLs, srcset widths (imageWidths), or responsive sizes (imageSizes).Step 5: Build query filters and sorting
QueryDSLInput must contain exactly one expression field.boolean with must, should, mustNot, and filter arrays.range expression with gt/gte/lt/lte and the correct DSLExpressionValueInput type (localDate, localDateTime, instant, long, double).SortDslInput with field and direction (ASC / DESC).references/examples.md when the query pattern matches a documented example.Step 6: Add aggregations and highlighting (if needed)
aggregations as an array of AggregationInput objects on queryDslConnection.name and exactly one aggregation type field (terms, dateRange, stats, etc.).highlight with a properties array specifying propertyName for each field to highlight.aggregationsAsJson and highlightAsJson on the connection result.Step 7: Generate TypeScript types (if requested)
assets/guillotine-query.template.ts as the starting template.__APP_KEY__, __CONTENT_TYPE__, __GRAPHQL_TYPE__, and __FIELDS__ placeholders with the actual content type values.Data interface matching the content type schema fields requested in the query.ContentConnection<T> generic with the specific content type.Step 8: Set site context (if applicable)
siteKey on the guillotine field or instruct the caller to set the X-Guillotine-SiteKey HTTP header.${site} placeholder in path arguments for site-relative queries._path(type: siteRelative) to return site-relative paths.Step 9: Validate the query
queryDsl / queryDslConnection are used instead of the deprecated query / queryConnection.QueryDSLInput objects contain exactly one expression field.DSLExpressionValueInput objects contain exactly one value type field.pageUrl / mediaUrl / imageUrl / attachmentUrl use Json type for params argument, not String.references/troubleshooting.md if the query returns unexpected nulls, empty results, or type errors.get returns null, verify the key is a valid content path or ID and that the correct branch (draft vs master) is targeted.queryDsl returns empty results, simplify to matchAll: {} to confirm data exists, then re-add filters one at a time.queryDslConnection, not queryDsl.query field is used, read references/compatibility.md to migrate to queryDsl with DSL syntax.scripts/find-guillotine-targets.mjs cannot run, scan the workspace manually for Guillotine markers and continue.assets/guillotine-query.template.ts (opens in a new tab)references/compatibility.md (opens in a new tab)references/examples.md (opens in a new tab)references/guillotine-reference.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)scripts/find-guillotine-targets.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
enonic-skills@webmaxru-ai-native-dev is listed by webmaxru/ai-native-dev — review the source before installing
npx claudepluginhub webmaxru/ai-native-dev --plugin enonic-skills8 skills in this plugin
/enonic-app-managerGuides developers through Enonic CLI commands for sandbox management, project scaffolding, local development, app deployment, and CI/CD pipeline generation. Use when creating Enonic XP sandboxes, starting or stopping local instances, scaffolding projects from starters, running dev mode with hot-reload, deploying apps, or generating CI/CD workflows for Enonic apps. Don't use for writing XP application code (controllers, content types), querying via Guillotine or lib-content APIs, configuring non-Enonic environments, or Docker/Kubernetes deployment of XP./enonic-content-managementGenerates Enonic XP scripts for bulk content operations — creating, updating, querying, migrating, and transforming content using lib-content and lib-node APIs. Covers the query DSL (NoQL), aggregations, batch processing, task controllers for long-running operations, and export/import workflows. Use when writing bulk content creation, update, or deletion scripts, querying with NoQL syntax, migrating content between environments, running long-running task operations, or working with aggregations and paginated retrieval. Do not use for Guillotine GraphQL frontend queries, content type schema definitions, single contentLib.get() calls, or non-Enonic data migration tools./enonic-content-type-generatorGenerates Enonic XP content type XML schema definitions from natural-language descriptions. Covers structured content modeling including input types, form layout, option sets, item sets, mixins, x-data, and content-type inheritance. Use when creating, scaffolding, or generating Enonic XP content type definitions, adding fields or sets to existing content types, or querying Enonic XP input types and super-types. Do not use for non-Enonic content modeling, GraphQL queries, JavaScript/TypeScript controllers, or generic XML editing unrelated to Enonic schemas./enonic-controller-generatorGenerates Enonic XP controller files (TypeScript/JavaScript) and paired XML descriptors for pages, parts, and layouts. Covers lib-portal imports, HTTP handler exports, region definitions, Thymeleaf/Mustache rendering, and response processors. Use when scaffolding page controllers with regions, part controllers with config access, layout controllers with multi-region support, or response processors for Enonic XP sites. Do not use for content type schemas, headless Next.js/React frontends, GraphQL Guillotine queries, or non-Enonic web frameworks./enonic-event-managerSets up Enonic XP event listeners, webhook configurations, and external system integrations triggered by content lifecycle events. Covers lib-event listener registration, node event filtering, outbound webhook configuration via com.enonic.xp.webhooks.cfg, custom HTTP service controllers for inbound webhooks, task-based async processing with lib-task, and outbound HTTP calls with lib-httpClient. Use when listening for content publish/create/update/delete events, configuring outbound webhooks, building HTTP service endpoints for inbound webhooks, or triggering async processing on content changes. Do not use for content querying, frontend component development, non-Enonic event systems, or GitHub webhook configuration./enonic-library-referenceEnonic XP server-side JavaScript/TypeScript API reference for all /lib/xp/* libraries. Provides function signatures, parameters, return types, and usage examples for lib-content, lib-node, lib-auth, lib-portal, lib-context, lib-event, lib-task, lib-repo, lib-io, lib-mail, lib-schema, lib-project, lib-export, lib-scheduler, lib-value, lib-i18n, lib-websocket, lib-admin, lib-app, lib-auditlog, lib-cluster, lib-common, lib-grid, and lib-vhost. Use when looking up Enonic XP library functions, parameter shapes, return types, or usage examples. Do not use for Guillotine GraphQL queries, content type schema definitions, Enonic CLI commands, or non-Enonic JavaScript APIs.