agentleFS
wake-engineeringwake-engineering/ai-plugin/skills/wake-storefront-api/SKILL.md

wake-storefront-api

Skill4 starsChanged 8 months agoMITView on GitHub

Wake Commerce Storefront API for headless storefronts. Use when building product pages, search, checkout, cart, or customer flows. Triggers on: Wake Storefront API, Wake Commerce GraphQL, product queries, checkout flow, cart, headless storefront.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use partnerAccessToken: when querying in partner/wholesale context.

    line 33
  2. Distinctive:

    Select only needed fields: Do not over-fetch; GraphQL allows precise selection.

    line 35
  3. Very specific:

    Use productsByOffset for paginated results (limit, offset, sortKey, sortDirection, filters)

    line 49
  4. Distinctive:

    When Storefront API returns errors: surface user-friendly message.

    line 67
  5. Very specific:

    When productId or checkoutId is invalid: return 404 or equivalent.

    line 68
  6. Very specific:

    When partner token is missing but required: inform user to configure partnerAccessToken.

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Wake Storefront API

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

GraphQL-based Storefront API for Wake Commerce headless storefronts. Covers products, search, checkout, cart, and customer operations.

When to Use

  • Building product listing, detail, or search pages
  • Implementing checkout or cart flows
  • Integrating customer account features
  • Writing GraphQL queries for Wake Commerce
  • Migrating or extending Wakelabs storefront patterns

API Overview

The Storefront API is GraphQL. Base URL and auth depend on partner configuration. Key operations:

OperationRoot FieldUse Case
Productproduct(productId, partnerAccessToken)Product detail, variants, prices
Searchsearch(query, partnerAccessToken)Product search, filters, pagination
Checkoutcheckout(checkoutId)Cart contents, shipping, totals
CartSee references/checkout-cart.mdMini cart, add to cart

Core Principles

  1. Use partnerAccessToken when querying in partner/wholesale context.
  2. Avoid N+1: Batch related data in a single query; use fragments for reuse.
  3. Select only needed fields: Do not over-fetch; GraphQL allows precise selection.
  4. Handle @include(if:) for conditional checkout data when hasCheckout is false.

Product Queries

See references/products.md for:

  • Product detail with variants and attribute selections
  • SingleProductData fragment usage
  • Price fields (listPrice, price, discountPercentage, installmentPlans)
  • Image URLs with dimensions

Search Queries

  • Root: search(query, partnerAccessToken)
  • Use productsByOffset for paginated results (limit, offset, sortKey, sortDirection, filters)
  • Aggregations: filters, priceRanges, minimumPrice, maximumPrice
  • Items: productId, productName, alias, images, prices, promotions, addToCartFromSpot

Checkout & Cart

See references/checkout-cart.md for:

  • Checkout query structure
  • Products in checkout (listPrice, price, quantity, customization)
  • shippingFee, subtotal, total
  • Mini cart and add-to-cart patterns

Customer

See references/customer.md for customer-related operations.

Error Handling

  • When Storefront API returns errors: surface user-friendly message; do not expose internal paths or stack traces.
  • When productId or checkoutId is invalid: return 404 or equivalent; use .maybeSingle() for optional queries.
  • When partner token is missing but required: inform user to configure partnerAccessToken.

References

  • Product query patterns
  • Checkout and cart patterns
  • Customer API patterns
  • Wake Commerce docs: wakecommerce.readme.io

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.