wake-template
Skill4 starsChanged 8 months agoMITView on GitHub
Wake Commerce storefront template (sometimes called a "theme") anatomy — the required root folders (Assets, Blocks, Components, Configs, Emails, Pages, Queries, Root, Snippets) and the contracts behind `Configs/components.json`, `Configs/pages.json`, `Configs/settings.json`, `Configs/emails.json`, the Snippets/SnippetQueries pairing, and the Wake Design Studio CMS (Blocks + `content_for_page` on hotsite pages, paired `Blocks/<type>.html` + `Blocks/<type>.schema.json` files, and the `wake_has_content_for_page` / `wake_content_for_page` runtime helpers). Use when scaffolding a new Wake template, registering a Component, wiring a Page to a Query in `pages.json`, binding a Snippet to a SnippetQuery, adding an Email, exposing a new static asset, authoring a Design Studio Block (schema + HTML), configuring a hotsite `content_for_page`, deciding between a Block and a Component, or explaining how data flows from Queries → Pages/Snippets → Components → Blocks in a Wake storefront project. Triggers include "Wake template", "Wake theme" (synonym), "template folder structure", "components.json", "pages.json", "settings.json", "emails.json", "Configs/", "register component", "bind query to page", "scaffold a Wake template", "Wake storefront structure", "hotsite content_for_page", "Snippets + SnippetQueries pairing", "Wake Design Studio", "Wake CMS", "Design Studio block", "Wake block schema", "block_data", "wake_content_for_page", "wake_has_content_for_page", ".schema.json block", "merchant editable hotsite", "Storefront 2.0 CMS".
In this repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- wake-checkout-flowSkill
- wake-hotsite-bannersSkill
- wake-product-variantsSkill
- wake-scribanSkill
- wake-storefront-apiSkill
- wake-storefront-reference-patternsSkill
- web-performance-auditSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Do not use this skill for Scriban syntax inside .html files (use wake-scriban).
- Very specific: line 103
Create the root tree with the nine top-level folders above (Assets/, Blocks/, Components/, Configs/, Emails/, Pages/, Queries/, Root/, …
- Very specific: line 104
Add the four contract files under Configs/: components.json (empty array), pages.json (empty array), settings.json (object with …
- Very specific: line 105
Put a real token in Configs/settings.json's access_token field (required — see references/settings.md).
- Very specific: line 106
Add Pages and register their Queries in Configs/pages.json — contract in references/pages.md.
≈ “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.
Files
Wake Template
Anatomy of a Wake Commerce storefront template. Use this skill whenever a prompt is about how a Wake template is shaped — its folders, its config files, how Pages find Queries, how Snippets are paired with SnippetQueries, how Components are registered, how Emails are wired to event types, and how Assets are referenced.
When to use this Skill
- Scaffolding a new Wake template project (minimum viable folder tree).
- Registering a Component in
Configs/components.jsonand understanding its entry shape. - Adding a Page and wiring it to a Query via
Configs/pages.json. - Pairing a Snippet in
Snippets/with a SnippetQuery inQueries/SnippetQueries/for dynamic rendering via the Storefront SDK. - Reading or editing
Configs/settings.jsonand knowing which keys Wake expects (access_token) vs arbitrary developer keys surfaced via{{ settings.key }}. - Adding a transactional email under
Emails/and mapping it to a Wake event inConfigs/emails.json. - Exposing a new CSS / JS / image asset under
Assets/and invoking it with theassethelper. - Adding a hotsite variant via
pages.json.customs[]+content_for_page. - Authoring a Design Studio CMS Block — paired
Blocks/<type>.html+Blocks/<type>.schema.json, authorized throughpages.jsoncontent_for_page[], rendered bywake_content_for_page. - Deciding whether new content should be a Block (merchant-editable through the CMS) or a Component (developer-only).
- Explaining the data flow: Queries → Pages (or Snippets) → injected
data.*→ Components → Blocks (block_data.*).
Do not use this skill for Scriban syntax inside .html files (use wake-scriban). For GraphQL query shape, schema discovery, or headless consumers of the Storefront API, refer to the Wake docs portal — that surface is outside this skill's scope.
Instructions
1. Root folders — one purpose each
A Wake template is a flat tree of nine top-level folders plus the four JSON files in Configs/. Keep the purpose of each folder in mind before deciding where a new file belongs.
| Folder | Purpose | Reference |
Assets/ | Static CSS, Fonts, Img, JS — invoked through the asset helper, never hand-linked. | references/assets.md |
Blocks/ | Design Studio CMS blocks. Each block is paired files — Blocks/<type>.html (Scriban, reads block_data.*) + Blocks/<type>.schema.json (editor field schema) — authorized per page via pages.json content_for_page[]. | references/blocks.md, references/design-studio.md |
Components/ | Reusable server-rendered fragments invoked inline — {{ name param: value }}. Every component is registered in Configs/components.json. | references/components.md |
Configs/ | The four contract files (components.json, pages.json, settings.json, colors.json) + emails.json + Locales/. Contracts of the template. | references/configs.md |
Emails/ | Transactional email bodies rendered from Wake event payloads, mapped to event types in Configs/emails.json. | references/emails.md |
Pages/ | Full-page HTML bodies. Wired to a root Query (and optional customs[]) through Configs/pages.json. | references/pages.md |
Queries/ | .graphql files that feed Pages. Queries/SnippetQueries/ is the paired subfolder feeding Snippets. | references/queries.md |
Root/ | Files served verbatim from the storefront root (robots.txt, sw.js). No templating. | references/folder-structure.md |
Snippets/ | Dynamic fragments rendered from the client via await client.snippet.render("name.html", ...) — each paired with a SnippetQuery of the same base name. | references/snippets.md |
For the full enumeration and the cross-folder relationships, see references/folder-structure.md.
2. Data flow — Queries → Pages / Snippets → Components
- A
.graphqlfile underQueries/(for Pages) orQueries/SnippetQueries/(for Snippets) declares the data envelope. Configs/pages.jsonbinds the Page HTML to its root Query (and optional per-URLcustoms[]overrides).- The Storefront runtime executes the Query and injects the result as
data.*when rendering the Page HTML. For Snippets, the SDK call passes variables to the SnippetQuery and injectsdata.*into the Snippet HTML. - The Page / Snippet composes reusable Components by inline invocation (
{{ product_price prices: product.prices }}). Components are resolved throughConfigs/components.json. Configs/settings.jsonexposes developer-authored values as{{ settings.key }}; theaccess_tokenkey authenticates the template's runtime GraphQL calls.
3. Design Studio CMS (Wake's visual editor)
Design Studio is the merchant-facing CMS in Wake Admin (Storefront 2.0). It composes hotsite pages from drag-and-drop Blocks that the agency authors. The MVP scope is hotsite pages — primarily the homepage (urlMatch: "").
The template enables it through three paired pieces:
Authorize the block types in
pages.json— on a hotsitecustoms[]entry, list the allowedtypes undercontent_for_page[]. This is the gatekeeper; a Block on disk that is not listed here is invisible to the merchant.{ "type": "hotsite", "path": "hotsite.html", "query": "home.graphql", "customs": [ { "urlMatch": "", "content_for_page": [ { "type": "banner_button" }, { "type": "product_carousel" } ] } ] }Define each Block under
Blocks/— paired files:Blocks/<type>.schema.json— drives the editor form (fields withtext,number,url,image_picker,color,select,checkbox).Blocks/<type>.html— Scriban template that reads merchant input asblock_data.<name>(one key persettings[].namein the schema).
The base filename, the schema's
type, and thepages.jsontypemust all match. Seereferences/blocks.md.Render the merchant's composition in the page body — use the runtime helpers, with a static fallback for the pre-CMS / between-campaigns state:
{{ if wake_has_content_for_page }} {{ wake_content_for_page }} {{ else }} {{## fallback markup — used until a layout is published ##}} {{ end }}wake_has_content_for_pagereports whether a published layout exists;wake_content_for_pageiterates the merchant's saved blocks and renders eachBlocks/<type>.html.
Block vs. Component — quick rule: if the merchant edits it through the CMS, it's a Block; if only the developer ever touches it, it's a Component. Both can be invoked from the same hotsite page, and a Block can itself call Components.
For the merchant-side capabilities (drafts, preview, campaign scheduling, version history), the full block contract, and migration patterns, see references/design-studio.md and references/blocks.md.
4. Scaffold a new template
- Create the root tree with the nine top-level folders above (
Assets/,Blocks/,Components/,Configs/,Emails/,Pages/,Queries/,Root/,Snippets/) plusQueries/SnippetQueries/. - Add the four contract files under
Configs/:components.json(empty array),pages.json(empty array),settings.json(object withaccess_token), andemails.json(empty array). For i18n, createConfigs/Locales/. - Put a real token in
Configs/settings.json'saccess_tokenfield (required — seereferences/settings.md). - Add Pages and register their Queries in
Configs/pages.json— contract inreferences/pages.md. - Register any new Components in
Configs/components.json— contract inreferences/components.md. - For dynamic fragments, drop the Snippet into
Snippets/and its SnippetQuery intoQueries/SnippetQueries/sharing the base name — contract inreferences/snippets.md.
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
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.

