hydrogen
CLAUDE.md2.1k starsChanged 8 months agoMITView on GitHub
Changesets track what packages need new releases and at what version bump level. They can be added via pnpm changeset add or by manually creating a markdown file with proper YAML frontmatter (either method is fine). If changes affect packages/*/src/** or packages/*/package.json, a changeset is required. These changesets go into Hydrogen's changelog, and are also used to generate upgrade instructions. Write the changeset as if the audience is a merchant building with Hydrogen. Any change to templates/skeleton must include a…
Trending
Quiet since June.about the whole repository
Who's talking about Shopify/hydrogen
- Shopify/hydrogen-demo-store“Remix to react-router and other dep upgrades”GitHub · Nov 24, 2025 · 8 reactions
- Shopify/hydrogen-v1“CartProvider V2 ”GitHub · Aug 5, 2022 · 6 reactions
- BuilderIO/builder-shopify-hydrogen“Cannot use the builder/react sdk in the new version of shopify-hydrogen using Remix”GitHub · Feb 14, 2023 · 5 reactions
- vitejs/vite“Use ESM for SSR builds”GitHub · May 12, 2022 · 4 reactions
- Shopify/hydrogen-v1“Move cart queries to an API endpoint”GitHub · Apr 5, 2022 · 4 reactions
The biggest 5 of 29 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 29
Talked about on GitHub and Bluesky (29 times).
On GitHub · 28
- Nov 24, 2025Remix to react-router and other dep upgrades — Shopify/hydrogen-demo-store8 reactions · 1 comment
- Aug 5, 2022CartProvider V2 — Shopify/hydrogen-v16 reactions · 15 comments
- Feb 14, 2023Cannot use the builder/react sdk in the new version of shopify-hydrogen using Remix — BuilderIO/builder-shopify-hydrogen5 reactions · 11 comments
- May 12, 2022Use ESM for SSR builds — vitejs/vite4 reactions · 3 comments
- Apr 5, 2022Move cart queries to an API endpoint — Shopify/hydrogen-v14 reactions · 9 comments
23 more on GitHub
- Mar 30, 2022Introduce Link prefetch behavior — Shopify/hydrogen-v14 reactions
- Dec 7, 2021Default preloading queries — Shopify/hydrogen-v14 reactions · 5 comments
- Jun 30, 2023Adds Hydrogen 2.0 (via Remix) Adapter — netlify/remix-compute3 reactions · 16 comments
- Apr 27, 2023createWithCache_unstable not working on Oxygen — sanity-io/hydrogen-sanity-demo3 reactions · 5 comments
- Oct 24, 2022[BUG] Environment variables in `hydrogen.config.ts` don't work with `npm run preview` — Shopify/hydrogen-v13 reactions
- Sep 1, 2022Cloudflare adapter disables known cloudflare worker "compatible" dependencies — solidjs/solid-start3 reactions · 24 comments
- May 19, 2022Consider implementing Link prefetching for mobile — Shopify/hydrogen-v13 reactions · 3 comments
- May 18, 2022Bug [Flight]: Hydration fails when suspended components introduce new client components — react/react3 reactions · 4 comments
- Apr 20, 2022[Hydrogen docs]: Content fixes in source files — Shopify/hydrogen-v13 reactions · 1 comment
- Mar 28, 2022Do not cache GraphQL errors — Shopify/hydrogen-v13 reactions · 2 comments
- Feb 8, 2022Standardize `data` prop across components — Shopify/hydrogen-v13 reactions · 2 comments
- Jan 18, 2022Improvements to API Routing — Shopify/hydrogen-v13 reactions · 2 comments
- Jun 4, 2026chore(deps): bump turbo-stream and @shopify/hydrogen in /packages/tokpulse-hydrogen — Hardonian/TokPulse2 reactions · 5 comments
- Feb 7, 2023[BUG] CartLineQuantityAdjustButton clears lineItem attributes — Shopify/hydrogen-react2 reactions · 5 comments
- Nov 14, 2022Fix preload cache ballooning — Shopify/hydrogen-v12 reactions · 5 comments
- Aug 17, 2022Expose the private token and storefrontId within Hydrogen config — Shopify/hydrogen-v12 reactions · 7 comments
- Jul 14, 2022Improve CSS support in server components — Shopify/hydrogen-v12 reactions · 8 comments
- Jul 12, 2022HMR in server components — Shopify/hydrogen-v12 reactions · 1 comment
- Jul 11, 2022Add assets proxy in Oxygen — Shopify/hydrogen-v12 reactions · 1 comment
- Jun 14, 2022Upgrade to React v18.2 — Shopify/hydrogen-v12 reactions · 2 comments
- May 23, 2022Replace `graphql-tag` with internal `gql` utility — Shopify/hydrogen-v12 reactions · 4 comments
- Mar 10, 2022Support mutations & refreshing RSC responses from API endpoints — Shopify/hydrogen-v12 reactions · 2 comments
- Dec 31, 2021React Server Components — vikejs/vike2 reactions · 7 comments
On Bluesky · 1
- Sep 13, 2025If I need to build a storefront, I'd probably check out Medusa [1] or Shopify Hydrogen [2]. Otherwise, probably Elixir/Phoenix and LiveView… — @nezteb.net3 likes and reposts
In this repository9 other files it gives its agents.
- templates/skeleton/AGENTS.mdAGENTS.md
- cookbook/CLAUDE.mdCLAUDE.md
- e2e/CLAUDE.mdCLAUDE.md
- templates/skeleton/CLAUDE.mdCLAUDE.md
- templates/skeleton/.cursor/rules/hydrogen-react-router.mdcCursor rule
- e2e-test-writingSkill
- hydrogen-dev-workflowSkill
- hydrogen-release-processSkill
- hydrogen-versioningSkill
The file
We split this CLAUDE.md into the rules it gives an agent
9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
If changes affect packages/*/src/ or packages/*/package.json, a changeset is required.
- Distinctive: line 17
If forgotten: new scaffolded projects will use a stale template until someone catches the gap.
- Very specific: line 23
If forgotten: Hydrogen consumers will not get the hydrogen-react update until a separate Hydrogen release happens to include it.
- Very specific: line 49
When @shopify/cli detects @shopify/cli-hydrogen in dependencies, it loads the plugin
- Very specific: line 69
When developers run npm create @shopify/hydrogen@latest:
- Distinctive: line 72
No network fetch required—the template is pre-bundled at build time
- Very specific: line 178
After Shopify CLI releases a new version containing updated @shopify/cli-hydrogen, whether further action is required depends on what the …
- Very specific: line 182
Create changesets for the skeleton template AND @shopify/cli-hydrogen AND @shopify/create-hydrogen
- Distinctive: line 187
No further action required after Shopify CLI releases
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md 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
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Changeset Rules
Changesets track what packages need new releases and at what version bump level. They can be added via pnpm changeset add or by manually creating a markdown file with proper YAML frontmatter (either method is fine).
If changes affect packages/*/src/** or packages/*/package.json, a changeset is required.
These changesets go into Hydrogen's changelog, and are also used to generate upgrade instructions. Write the changeset as if the audience is a merchant building with Hydrogen.
Rule 1: Skeleton Template Changes
Any change to templates/skeleton must include a changeset specifying a patch bump for both @shopify/cli-hydrogen and @shopify/create-hydrogen (in addition to skeleton itself). See the Quick Reference below for details.
If forgotten: new scaffolded projects will use a stale template until someone catches the gap.
Rule 2: hydrogen-react Changes
The entire contents of hydrogen-react are re-exported in Hydrogen. Any changeset for hydrogen-react must also specify a corresponding bump for hydrogen.
If forgotten: Hydrogen consumers will not get the hydrogen-react update until a separate Hydrogen release happens to include it.
For the full release process (standard, back-fix, snapshot, failure recovery), see the hydrogen-release-process skill. For versioning semantics, see the hydrogen-versioning skill.
CLI Dependency Graph
The Hydrogen CLI system works through a plugin architecture:
Developer's Project (e.g., skeleton template)
├── package.json
│ └── devDependencies
│ └── @shopify/cli
│
└── npm scripts
└── "shopify hydrogen dev" commands
↓
@shopify/cli (main CLI)
↓
@shopify/cli-hydrogen (plugin)
↓
Hydrogen commands availableHow it works:
- @shopify/cli: The main Shopify CLI installed in project's devDependencies
- @shopify/cli-hydrogen: Plugin package that adds
hydrogensubcommands - When
@shopify/clidetects@shopify/cli-hydrogenin dependencies, it loads the plugin - This enables commands like
shopify hydrogen dev,shopify hydrogen build, etc. - The plugin uses oclif framework for command structure and hooks
Example flow:
- Developer runs
npm run devin their project - This executes
shopify hydrogen dev --codegen @shopify/clireceives the command and delegates to@shopify/cli-hydrogen- The hydrogen plugin executes the dev server with MiniOxygen
Skeleton Template and Project Scaffolding
Skeleton Template Location
The skeleton template is the default starter template for new Hydrogen projects:
- Located at
templates/skeleton/in the Hydrogen repo - Serves as the foundation for
npm create @shopify/hydrogen@latest - Includes both TypeScript configuration (default) and can be transpiled to JavaScript
How Project Scaffolding Works
When developers run npm create @shopify/hydrogen@latest:
- Default behavior: Uses the skeleton template bundled inside
@shopify/create-hydrogen- No network fetch required—the template is pre-bundled at build time
- This is why
create-hydrogenmust be bumped when skeleton changes
--templateflag:--template skeletonis the same as leaving the flag out--template demo-storeor a GitHub repository URL clones that repository, for community templates and alternative starters
<details>
<summary>Technical Details: The Bundling Chain</summary>During a Hydrogen release, templates are bundled through this chain:
templates/skeleton/
↓ bundled into
@shopify/cli-hydrogen (dist/assets/templates/)
↓ bundled into
@shopify/create-hydrogen (bundles cli-hydrogen at build time)
↓ published to npm
npm create @shopify/hydrogen@latestThe dist branch also receives compiled templates for alternative distribution methods.
</details>Quick Reference: Contributing to Skeleton or CLI
I'm Updating the Skeleton Template
Required changeset packages:
skeleton— the source you changed@shopify/cli-hydrogen— bundles skeleton into its dist@shopify/create-hydrogen— bundles cli-hydrogen into its dist
⚠️ Important: When you run pnpm run changeset add, it only shows packages with
actual code changes. You must manually select cli-hydrogen and create-hydrogen
even though you didn't change their code. Alternatively, manually add those lines
to the changeset file after creation.
Example changeset:
---
"skeleton": patch
"@shopify/cli-hydrogen": patch
"@shopify/create-hydrogen": patch
---
Update skeleton template with [description of your changes]Canonical example: See PR #3232 for a complete skeleton update with proper changeset.
<details>
<summary>Why all three packages?</summary>See the "Technical Details: The Bundling Chain" section above. If you only bump skeleton, the npm packages won't rebuild with your changes. If you only bump cli-hydrogen, the create-hydrogen package won't include the updated CLI. All three must be bumped to ensure npm create @shopify/hydrogen@latest gets your changes.
</details>I'm Updating the CLI (cli-hydrogen)
Scenario A: CLI-only change (no init/scaffolding impact)
- Just bump
@shopify/cli-hydrogen - Examples: bug fixes in non-init commands such as
dev,build, orcheck; new flags for existing commands
Scenario B: Change affects the init command, scaffolding process, or CLI assets
- Bump both
@shopify/cli-hydrogenand@shopify/create-hydrogen - Examples: changes to how
hydrogen init(which powersnpm create @shopify/hydrogen) works; changes to virtual-route templates or other files inpackages/cli/assets/
<details>
<summary>When does a CLI change affect scaffolding?</summary>create-hydrogen bundles two things from @shopify/cli-hydrogen:
- The
initcommand code — tree-shaken from theinitentry point and its transitive dependencies only - The full
dist/assetsdirectory — templates, virtual routes, tailwind configs, and other shared assets
"Does this change affect the init command, or any files in packages/cli/assets/?"
- Yes → bump both
cli-hydrogenandcreate-hydrogen - No → just bump
cli-hydrogen
For non-init command changes (bug fixes to commands such as dev/build/check, new non-init commands): these reach newly scaffolded projects through the skeleton's @shopify/cli version. If those changes need to be in new scaffolds quickly, follow the circular dependency release cycle described in Skeleton's CLI Version (Post-Release Action) under Understanding the Circular Dependency below.
</details>Understanding the Circular Dependency
The CLI system has an inherent circular dependency, but it's manageable:
@shopify/cli-hydrogen (bundles skeleton)
↓ is included in
@shopify/cli (main Shopify CLI)
↓ is used by
skeleton template's devDependencies
↓ which is bundled in
@shopify/cli-hydrogen (circular!)The circular dependency exists but is manageable:
We break the cycle with a simple rule: skeleton changes → bump all three packages (skeleton, cli-hydrogen, create-hydrogen). This ensures the release includes everything needed.
Skeleton's CLI Version (Post-Release Action):
After Shopify CLI releases a new version containing updated @shopify/cli-hydrogen, whether further action is required depends on what the cli-hydrogen changes contained:
If cli-hydrogen had actual changes (any code changes: bug fixes, new commands, refactors — anything beyond just adding a changeset to bundle a new skeleton template):
- Manually update skeleton's
@shopify/clidependency to the new Shopify CLI version - Create changesets for the skeleton template AND
@shopify/cli-hydrogenAND@shopify/create-hydrogen - This triggers another cli-hydrogen release (now bundling the updated skeleton) and another Shopify CLI release
- Required so new Hydrogen storefronts are created with the latest cli-hydrogen changes
If cli-hydrogen changes were ONLY a changeset to re-bundle the skeleton (no actual code changes to cli-hydrogen itself):
- No further action required after Shopify CLI releases
- The skeleton's
@shopify/cliversion does not need to be updated
The key question: "Were there actual code changes to cli-hydrogen, beyond just adding a changeset to bundle an updated skeleton?"
- Yes → Manually update skeleton's CLI version and release another cli-hydrogen cycle
- No → Done
Security concerns
All content inside of secrets.ejson is sensitive and must NEVER be exposed. We have a pre-commit hook to encrypt any newly added secrets. Some of the secrets inside are used in E2E tests, so we must also be careful to NEVER console.log (or otherwise leak/print) anything that was derived from inside of secrets.ejson.
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.

