hydrogen-predictive-search
Skill by remix-run
Guides developers building predictive search with @shopify/hydrogen. It covers the same-origin route handler, tracking URLs, custom fragments and framework bindings for search-as-you-type UI.
Install hydrogen-predictive-search
Built from the published package, never by AI.
git clone --depth 1 https://github.com/remix-run/remix-store /tmp/remix-store && mkdir -p ~/.claude/skills && cp -r /tmp/remix-store/.agents/skills/hydrogen-predictive-search ~/.claude/skills/hydrogen-predictive-searchRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install hydrogen-predictive-search in Claude Code
git clone --depth 1 https://github.com/remix-run/remix-store /tmp/remix-store && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/remix-store/.agents/skills/hydrogen-predictive-search ~/.gemini/antigravity-cli/skills/hydrogen-predictive-searchAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install hydrogen-predictive-search in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is a guide for adding, changing or reviewing predictive search in a Hydrogen storefront built with @shopify/hydrogen. It describes four layers: a Storefront API query helper, a same-origin route at /api/predictive-search, a framework-neutral client store, and framework provider or hooks. The guide keeps rendering app-owned, since Hydrogen supplies data, state, request lifecycle and URL helpers rather than a dropdown template.
The skill explains how to register the packaged route handler, build result links with getPredictiveSearchItemUrl() so tracking parameters are kept, and add custom fragments for extra result fields. It also sets rules for progressive enhancement, requiring a working /search link or GET form without JavaScript, and for native dialog behavior. It is written for developers working on Hydrogen storefronts.
Written from the project's SKILL.md and checked against it.
What it can do
- Server route setupRegisters the packaged predictive search route handler with createPredictiveSearchServerHandlers().
- Tracking URLsBuilds predictive result links with getPredictiveSearchItemUrl() and keeps trackingParameters intact.
- Custom fragmentsAdds extra result fields through additive fragments and makePredictiveSearchQueries().
- No-JavaScript fallbackKeeps search working through a real /search link or GET form when JavaScript is off.
- Client store behaviorPlaces debounce, aborts and stale response handling in the Hydrogen store instead of components.
- Modal guidanceDescribes a native dialog opened with showModal() and safe backdrop-dismiss handling.
- Verification checklistLists checks to confirm search works without JavaScript and preserves tracking parameters.
- Anti-patternsLists common mistakes such as calling Storefront API from browser UI or reusing /search?predictive=true.
What you need
- A Hydrogen storefront using @shopify/hydrogen
- A Storefront API client in the app
Try asking
- Add predictive search to my Hydrogen storefront search bar
- Check that my predictive search result links keep trackingParameters
- Review my search modal for a no-JavaScript fallback to /search
Good to know
- Does not provide a dropdown or autocomplete component; rendering stays app-owned.
- Framework-specific instructions are in a references/ directory.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/hydrogen-predictive-search/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to hydrogen-predictive-search
All alternatives →Shopify skill that lets an AI assistant set up and run a Shopify store through Shopify's official MCP server. It is for people who want to sell online, start a store, or manage an existing Shopify store.
Guides an AI assistant through building Shopify apps, extensions and themes. It covers the GraphQL Admin API, Shopify CLI, Polaris UI and Liquid. Intended for Shopify developers.
Searches Ticketmaster events and seat listings with pricing for people looking for event tickets. It returns Ticketmaster checkout links but cannot complete a purchase itself.
Analyzes ecommerce SEO for product pages, product schema, Google Shopping visibility, Amazon marketplace signals and keyword gaps. Built for stores, catalogs and product listings. Live Shopping and Amazon data needs the optional DataForSEO Merchant API.
Drafts replies to customer emails and tickets using order, refund, CRM and support desk data, in the owner's writing voice. Refunds and sends need the owner's approval, and with Shopify it also flags orders needing attention.
Reviews generated or changed WooCommerce code before it ships. It is for developers building extensions, payment and shipping integrations, checkout customizations, and order or product logic.
Compare with shopify, shopify-development or ticketmaster
hydrogen-predictive-search: common questions
Does predictive search work without JavaScript?
The guide requires the search trigger to be a real /search link or a role="search" GET form. The full search page then renders results server-side.
Which endpoint does browser autocomplete use?
It uses the same-origin route GET /api/predictive-search by default. The guide says to override it with predictiveSearchEndpoint if the route lives elsewhere.
Why use getPredictiveSearchItemUrl()?
It infers the standard storefront route from the item's __typename and keeps Storefront API trackingParameters without double-encoding.
How do I install hydrogen-predictive-search?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is hydrogen-predictive-search free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is hydrogen-predictive-search safe to use?
It scores 78 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to hydrogen-predictive-search?
Similar skills: shopify, shopify-development, ticketmaster, seo-ecommerce.
