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

wake-storefront-reference-patterns

Skill4 starsChanged 8 months agoMITView on GitHub

Wake Storefront reference to headless mapping. Use when migrating from Wake Storefront templates, porting Queries/*.graphql, or aligning with production patterns. Triggers on: migrate, reference, Queries, productId vs handle, attributeSelections, addToCartFromSpot.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

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

    When querying in partner/wholesale context, pass partnerAccessToken to product, search, hotsite.

    line 45
  2. Distinctive:

    Read reference Queries/*.graphql or SnippetQueries/*.graphql

    line 60

≈ “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 Reference Patterns

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

Mapping Wake Storefront reference implementations (Queries/, Snippets) to headless Storefront API patterns. Use when migrating from templates or aligning with production query patterns.

When to Use

  • Migrating from Wake Storefront reference to headless
  • Porting Queries/.graphql or SnippetQueries/.graphql
  • Understanding productId vs handle, attributeSelections vs options
  • Aligning headless code with production reference

Key Mappings

productId vs handle

Wake Native (Queries/)Shopify-like (src/graphql/)Notes
productId (Long)id, handleWake uses Long IDs; no handle
productVariantId (Long)variant idWake uses Long
attributeSelections(selected)options, selectedOptionsWake has matrix, selections

Rule: Target native Wake schema first. If reference uses Shopify-like layer, map to native (productId, productVariantId) for Storefront API calls.

attributeSelections

Reference uses attributeSelections(selected: $selections) with AttributeFilterInput. Pass { attributeId, value } per attribute. Resolves selectedVariant. See wake-product-variants skill for detail.

SingleProductData Fragment

Reference Queries often use SingleProductData or similar fragment. Contains: attributeSelections, matrix, selectedVariant, prices, images, customizations, subscriptionGroups. Extract fragment from reference and adapt for headless.

addToCartFromSpot

Wake-specific boolean on product. When true, product supports direct add-to-cart. Use with productVariantId and selections. Not in Shopify schema.

partnerAccessToken

When querying in partner/wholesale context, pass partnerAccessToken to product, search, hotsite. Reference may omit; add for headless when needed.

Reference Structure

PathPurpose
Queries/*.graphqlNative Wake queries (product, search, hotsite, common, home)
SnippetQueries/*.graphqlCheckout, wishlist, shipping, etc.
Snippets/UI snippets (HTML)
src/graphql/May use Shopify-like schema; different layer

See references/storefront-queries-index.md for Queries/*.graphql to use case mapping.

Migration Workflow

  1. Read reference Queries/.graphql or SnippetQueries/.graphql
  2. Extract root field, args, fragment
  3. Map to headless: productId not handle; attributeSelections not options
  4. Generate equivalent headless query/mutation
  5. Map reference fields to target framework (React, etc.)

References

  • Storefront Queries Index
  • 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.

Reviews can't be read right now.

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.