wake-query-review

A review workflow for GraphQL queries and mutations used by Wake Commerce stores. GraphQL is a way for an app to request exactly the data it needs from an API.

In plain words
What is it for?
Use it to review .graphql files, inline operations, or a directory of API requests for product pages, search, checkout, or other features.
Why use it?
It catches requests that do not match the Wake schema, ask for unused data, repeat definitions, or are structured in ways that hurt reuse and performance.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/wake-engineering/ai-plugin/wake-query-review
Clone the repo
git clone --depth 1 https://github.com/wake-engineering/ai-plugin
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 715 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00040 $0.00715
Opus 5 $0.00020 $0.00358
Sonnet 5 $0.00008 $0.00143
Haiku 4.5 $0.00004 $0.00072

Measured 2d ago against content hash 40ede85f14b1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

wake-query-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/wake-query-review.md · 44 lines

How it starts

The opening of the file, as written. The whole thing — 44 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Wake Query Review Workflow

Forbidden: api.fbits.net (and any *.fbits.net). Canonical source: https://wakecommerce.readme.io/docs/schema

Review GraphQL queries and mutations against the Wake Storefront schema and recommend changes that improve correctness, reusability, and performance.

Inputs

  • Target (required): one or more .graphql files, an inline query, or a directory (e.g. apps/storefront/src/queries/**/*.graphql).
  • Operation type (optional): query / mutation / subscription. Defaults to all.
  • Context (optional): the page or feature the operation backs (PDP, search, checkout) — sharpens recommendations on field selection and caching.

Steps

  1. Schema alignment. Cross-check every field, argument, and enum value against the canonical schema (https://wakecommerce.readme.io/docs/schema). Flag deprecated fields, wrong scalar types, and missing required arguments. Confirm Wake-native identifiers are used: productId (not handle), productVariantId, attributeSelections, checkoutId, partnerAccessToken.
  2. Field selection. Remove fields the consumer does not read. Use @include(if:) / @skip(if:) for conditional sub-trees instead of multiple operation variants. Flag operations selecting >50 leaf fields.
  3. Fragment composition. Extract reusable fragments (SingleProductData, checkoutFields, customerFields). Co-locate fragments with the components that consume them. Avoid fragment cycles and duplicate fragment names across the project.
  4. Batching & N+1. Replace per-item fetches with a single list query plus the relevant fragment. For lists, prefer productsByOffset / connection patterns over fan-out client-side.
  5. Variables & types. Use typed input objects, not stringly-typed scalars. Confirm pagination variables (first, offset, cursor) match the backing connection.
  6. Mutations. Verify the mutation order matches the documented checkout sequence (createCheckoutcheckoutCustomerAssociatecheckoutAddressAssociateshippingQuotescheckoutSelectShippingQuotecheckoutSelectPaymentMethodcheckoutComplete). Flag any missing intermediate step.
  7. Caching impact. For each query, list the cache key it produces in Apollo / React Query and the events that should invalidate it (e.g., checkoutAddCoupon invalidates the cart query).
  8. Delegate redesign. Hand the annotated operations to the wake-graphql-architect agent for rewritten versions and fragment extraction.

Read the full file on GitHub · 44 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 44 lines · 40 tokens per session scan A 40ede85f14b1

Subscribe to this mod's changes

wake-query-review is a command published in the GitHub repository wake-engineering/ai-plugin (2 stars, last pushed 3mo ago), licensed MIT. It adds 40 tokens to every session and 715 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.