Weaverse Hydrogen logo

Weaverse Hydrogen

Organization
Weaverse
weaverse-hydrogen

Build Shopify Hydrogen storefronts with Weaverse — components, schemas, loaders, theming, data fetching, React Router v7, deployment, and advanced features.

Overview

PublisherWeaverse
Repositoryshopify-hydrogen-skills
Skill nameweaverse-hydrogen
Stars
87
Forks
26
Bundled files
18
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 18 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Weaverse on GitHub. Read the source before you install it.

Installation

Install the Weaverse Hydrogen AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Weaverse/shopify-hydrogen-skills.git /tmp/shopify-hydrogen-skills
mkdir -p .claude/skills
cp -r /tmp/shopify-hydrogen-skills/skills/weaverse-hydrogen .claude/skills/weaverse-hydrogen
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Weaverse Hydrogen in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Weaverse Hydrogen on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Weaverse Hydrogen is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Weaverse Hydrogen — Agent Skill

Build Shopify Hydrogen storefronts with Weaverse visual page builder. Docs: https://docs.weaverse.io | GitHub: https://github.com/Weaverse

Live Documentation

Run these from this skill's own folder. The helpers ship inside the sibling shopify-hydrogen skill, so ../shopify-hydrogen/scripts/ exists whenever the whole pack is installed.

If you installed this skill on its own, that folder is absent and the commands below fail with MODULE_NOT_FOUND. Add the helpers once:

bash
npx skills add Weaverse/shopify-hydrogen-skills --skill shopify-hydrogen

The references/ files in this skill remain a usable offline fallback if you would rather not install it.

For the most up-to-date Weaverse documentation, use these scripts:

  • node ../shopify-hydrogen/scripts/search_weaverse_docs.mjs "<query>" — search Weaverse docs
  • node ../shopify-hydrogen/scripts/get_weaverse_page.mjs "<page-path>" — fetch a specific page (use paths from search results)
  • Weaverse docs: https://docs.weaverse.io

Examples:

bash
node ../shopify-hydrogen/scripts/search_weaverse_docs.mjs "component schema"
node ../shopify-hydrogen/scripts/search_weaverse_docs.mjs "data fetching"
node ../shopify-hydrogen/scripts/get_weaverse_page.mjs "development-guide/component-schema"
node ../shopify-hydrogen/scripts/get_weaverse_page.mjs "api-reference/weaverse-client"

The reference files below provide offline context but may not reflect the latest changes.


What is Weaverse?

Weaverse is a visual page builder for Shopify Hydrogen. It lets merchants customize storefronts via a drag-and-drop Studio while developers build type-safe React components with schemas that define the editor UI.

Stack: React 19 · React Router v7 · Shopify Hydrogen · TypeScript · Tailwind CSS · Vite


1. Project Structure

app/
├── components/        # Reusable UI components
├── graphql/           # GraphQL queries & fragments
├── hooks/             # Custom React hooks
├── routes/            # React Router v7 route files
├── sections/          # Weaverse section components ← YOUR WORK GOES HERE
├── styles/            # Global styles + Tailwind
├── weaverse/
│   ├── components.ts  # Component registry
│   ├── schema.server.ts  # Theme schema (global settings)
│   └── csp.ts         # Content Security Policy for Weaverse
├── entry.client.tsx
├── entry.server.tsx
└── root.tsx           # Wrapped with withWeaverse(App)
server.ts              # WeaverseClient initialization
vite.config.ts
react-router.config.ts
tailwind.config.js
.env

2. Component Anatomy

Every Weaverse component has up to 3 exports from a single file (or directory):

tsx
// app/sections/my-section/index.tsx

// 1. Default export — React component
function MySection(props: MySectionProps) { ... }
export default MySection;

// 2. Schema export — editor configuration
export let schema = createSchema({ ... });

// 3. Loader export (optional) — server-side data fetching
export let loader = async (args: ComponentLoaderArgs<DataType>) => { ... };

Minimal Example

tsx
import { createSchema } from '@weaverse/hydrogen';
import type { HydrogenComponentProps } from '@weaverse/hydrogen';

interface BannerProps extends HydrogenComponentProps {
  heading: string;
  description: string;
}

function Banner({ heading, description, children, ...rest }: BannerProps) {
  return (
    <section {...rest} className="py-16 px-4 text-center">
      <h2 className="text-3xl font-bold">{heading}</h2>
      <p className="mt-4 text-lg text-gray-600">{description}</p>
      {children}
    </section>
  );
}

export default Banner;

export let schema = createSchema({
  type: 'banner',
  title: 'Banner',
  settings: [
    {
      group: 'Content',
      inputs: [
        { type: 'text', name: 'heading', label: 'Heading', defaultValue: 'Hello World' },
        { type: 'textarea', name: 'description', label: 'Description', defaultValue: 'Welcome to our store.' },
      ],
    },
  ],
  presets: {
    heading: 'Hello World',
    description: 'Welcome to our store.',
  },
});

Key Rules

  • Spread {...rest} on the root element — required for Weaverse Studio interaction.
  • Render {children} if the component accepts child components (childTypes).
  • forwardRef is optional in React 19. If using React 18, wrap with forwardRef and attach ref to root element.
  • type must be unique across all components, use kebab-case (e.g., hero-banner).

3. Component Registration

Components must be registered in app/weaverse/components.ts:

tsx
import type { HydrogenComponent } from '@weaverse/hydrogen';

// MUST use namespace imports (import * as X), NOT default imports
import * as HeroBanner from '~/sections/hero-banner';
import * as FeaturedCollection from '~/sections/featured-collection';
import * as ProductCard from '~/sections/product-card';

export let components: HydrogenComponent[] = [
  HeroBanner,
  FeaturedCollection,
  ProductCard,
];

Common mistake: Using import HeroBanner from ... — this won't work. Always import * as HeroBanner from ....


4. Schema with createSchema()

tsx
import { createSchema } from '@weaverse/hydrogen';

export let schema = createSchema({
  type: 'my-component',          // Unique kebab-case identifier
  title: 'My Component',         // Display name in Studio
  limit: 1,                      // Max instances per page (optional)
  enabled: ({ page, group }) =>  // Dynamic insertion availability (optional)
    ['PRODUCT', 'COLLECTION'].includes(page.type) && group === 'body',
  settings: [                    // Editor UI groups
    {
      group: 'Content',
      inputs: [
        { type: 'text', name: 'heading', label: 'Heading', defaultValue: 'Title' },
        { type: 'richtext', name: 'body', label: 'Body' },
        { type: 'image', name: 'image', label: 'Image' },
        {
          type: 'select', name: 'layout', label: 'Layout',
          configs: {
            options: [
              { value: 'grid', label: 'Grid' },
              { value: 'list', label: 'List' },
            ],
          },
          defaultValue: 'grid',
        },
      ],
    },
  ],
  childTypes: ['product-card', 'button'],  // Allowed child component types
  presets: {                     // Defaults when component is added to page
    heading: 'Title',
    layout: 'grid',
    children: [
      { type: 'product-card' },
      { type: 'product-card' },
    ],
  },
});

inspector is deprecated — always use settings.

enabledOn is deprecated — move page/group checks into enabled. The callback is synchronous, runs in the storefront preview, and receives { page: { id, type, handle, locale }, group }. Errors, Promises, and non-boolean results hide the component from new insertion without affecting existing instances. Studio currently evaluates the body group.

Page types for enabled: INDEX, PRODUCT, ALL_PRODUCTS, COLLECTION, COLLECTION_LIST, PAGE, BLOG, ARTICLE, CUSTOM


5. Input Types (Quick Reference)

TypeReturnsUse For
textstringSingle-line text
textareastringMulti-line text
richtextstring (HTML)Rich text with formatting
urlstringURLs/links
imageWeaverseImage objectImage picker from Shopify Files
videoWeaverseVideo objectVideo picker from Shopify Files
colorstring (#hex)Color picker
rangenumberSlider (requires configs: { min, max, step })
switchbooleanToggle on/off
selectstringDropdown (requires configs: { options })
toggle-groupstringButton group (requires configs: { options })
headingSection header in settings panel (no data)
datepickernumber (timestamp)Date/time picker
productShopify productProduct picker
collectionShopify collectionCollection picker
blogShopify blogBlog picker
articleShopify articleArticle picker
metaobjectShopify metaobjectMetaobject picker
product-listShopify products[]Multi-product picker
collection-listShopify collections[]Multi-collection picker

→ Full details: references/04-input-settings.md


6. Data Fetching

tsx
import type { ComponentLoaderArgs, HydrogenComponentProps } from '@weaverse/hydrogen';

type MyData = { collectionHandle: string };

export let loader = async ({ weaverse, data }: ComponentLoaderArgs<MyData>) => {
  let { storefront } = weaverse;
  return await storefront.query(COLLECTION_QUERY, {
    variables: { handle: data.collectionHandle },
  });
};

// Derive props type from loader return
type Props = HydrogenComponentProps<Awaited<ReturnType<typeof loader>>> & MyData;

function MyComponent({ loaderData, ...rest }: Props) {
  let collection = loaderData?.collection;
  return <section {...rest}>{collection?.title}</section>;
}
export default MyComponent;

Key patterns:

  • weaverse.storefront.query() — Shopify Storefront API
  • weaverse.fetchWithCache(url, options) — External APIs with caching
  • Promise.all([...]) — Parallel fetching
  • shouldRevalidate: true on schema inputs that affect the loader

→ Full details: references/05-data-fetching.md


7. Styling & Theming

Tailwind CSS is the primary styling approach.

Global theme settings are defined in app/weaverse/schema.server.ts and applied via CSS variables:

tsx
// app/components/GlobalStyle.tsx
import { useThemeSettings } from '@weaverse/hydrogen';

export function GlobalStyle() {
  let settings = useThemeSettings();
  if (!settings) return null;
  return (
    <style dangerouslySetInnerHTML={{ __html: `
      :root {
        --color-primary: ${settings.colorPrimary};
        --body-base-size: ${settings.bodyBaseSize}px;
        --heading-base-size: ${settings.headingBaseSize}px;
      }
    `}} />
  );
}

CVA (Class Variance Authority) for component variants:

tsx
import { cva } from 'class-variance-authority';
let buttonVariants = cva('inline-flex items-center rounded font-medium', {
  variants: {
    variant: { primary: 'bg-blue-600 text-white', secondary: 'bg-gray-200' },
    size: { sm: 'h-8 px-3 text-sm', md: 'h-10 px-4', lg: 'h-12 px-6' },
  },
  defaultVariants: { variant: 'primary', size: 'md' },
});

→ Full details: references/06-styling-theming.md


8. Weaverse API (Key Hooks & Utilities)

APIPurpose
createSchema()Define component schema with Zod validation
WeaverseClientServer-side client (initialized in server.ts)
weaverse.loadPage({ type, handle })Load page data in route loaders
weaverse.loadThemeSettings()Load global theme settings
weaverse.fetchWithCache(url)Cached external API fetching
withWeaverse(App)HOC wrapping root App in root.tsx
useWeaverse()Access global Weaverse instance
useThemeSettings()Access global theme settings
useItemInstance()Access a specific component instance
useParentInstance()Access parent component instance
useChildInstances()Access child component instances

→ Full details: references/10-weaverse-api.md


9. Server Setup (server.ts)

tsx
import { WeaverseClient } from '@weaverse/hydrogen';
import { components } from '~/weaverse/components';
import { themeSchema } from '~/weaverse/schema.server';

export async function createAppLoadContext(request, env, executionContext) {
  let hydrogenContext = createHydrogenContext({ env, request, cache, waitUntil, session, /* ... */ });
  return {
    ...hydrogenContext,
    weaverse: new WeaverseClient({
      ...hydrogenContext,
      request,
      cache,
      themeSchema,
      components,
    }),
  };
}

10. Route Integration

tsx
// app/routes/($locale)._index.tsx
import { WeaverseHydrogenRoot } from '@weaverse/hydrogen';

export async function loader({ context }: LoaderFunctionArgs) {
  let weaverseData = await context.weaverse.loadPage({ type: 'INDEX' });
  return { weaverseData };
}

export default function Homepage() {
  return <WeaverseHydrogenRoot />;
}

For product pages:

tsx
export async function loader({ context, params }: LoaderFunctionArgs) {
  let weaverseData = await context.weaverse.loadPage({
    type: 'PRODUCT',
    handle: params.productHandle,
  });
  return { weaverseData, /* other data */ };
}

Reference Index

For detailed information on specific topics, read these reference files:

#FileTopic
01references/01-project-structure.mdProject structure & file anatomy
02references/02-creating-components.mdComponent creation & registration
03references/03-component-schema.mdcreateSchema(), settings, childTypes, presets, enabled
04references/04-input-settings.mdAll input types & configurations
05references/05-data-fetching.mdLoaders, Storefront API, caching
06references/06-styling-theming.mdTailwind, theme settings, CVA, CSS variables
07references/07-react-router-7.mdReact Router v7 conventions
08references/08-hydrogen-fundamentals.mdHydrogen framework essentials
09references/09-deployment.mdOxygen, Docker, env vars
10references/10-weaverse-api.mdAll hooks & WeaverseClient API
11references/11-advanced-features.mdLocalization, data connectors, CSP
12references/12-pilot-theme.mdPilot theme patterns & conventions
13references/13-migration-v5.mdRemix → React Router v7 migration
14references/14-sdk-caching-and-diagnostics.mdSDK 5.15.x caching, Builder diagnostics headers, nested multi-instance pages, client upgrades

Examples

FileShows
examples/hero-banner.tsxComplete section with schema, settings groups, childTypes, presets
examples/featured-collection.tsxSection with loader, Storefront API query
examples/product-card.tsxChild component example
examples/components-registry.tsRegistration pattern

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Weaverse Hydrogen AI skill do?

Build Shopify Hydrogen storefronts with Weaverse — components, schemas, loaders, theming, data fetching, React Router v7, deployment, and advanced features.

Why use Weaverse Hydrogen on TypingMind?

Because you install it once and use it with any model. Weaverse Hydrogen is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Weaverse Hydrogen in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Weaverse/shopify-hydrogen-skills/tree/main/skills/weaverse-hydrogen. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Weaverse Hydrogen?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Weaverse Hydrogen?

As many as you like. As long as a model supports skills, you can use Weaverse Hydrogen with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Weaverse Hydrogen AI skill free?

It is published on GitHub by Weaverse. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇