ソース情報
- リポジトリ
- vercel/shop
- ソースの最終更新活動
- 2026年7月29日 15:45
- 検出された SKILL.md の言語
- 英語
- スター
- 55
- フォーク
- 13
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/vercel/shop --skill enable-shopify-menusコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
SOC 職業分類に基づく
SKILL.md を表示中
| name | enable-shopify-menus |
| description | Replace the hardcoded nav and footer menus with Shopify-powered menus. |
By default, the storefront's nav and footer render hardcoded fallback items: an inline const items: MenuItem[] = [...] in Nav (components/nav/index.tsx) and an empty const items: MenuItem[] = [] in Footer (components/footer/index.tsx). The components themselves (QuickLinks, MobileMenu, Footer's FooterMenu) already consume MenuItem[] in Shopify shape and render up to three levels of nesting. This skill swaps that inline default to a live Shopify menu fetched by handle, keeping the inline items as the fallback if the menu is missing or empty.
Ask the user two questions in order:
Ask for each selected menu. Defaults: main-menu for nav, footer for footer.
Wait for the user to answer before proceeding.
Skip this section if the user did not select the nav menu.
Edit components/nav/index.tsx. Add the getMenu import and swap the data source:
import { getMenu } from "@/lib/shopify/operations/menu";
Inside Nav, keep the existing inline default and swap the data source so the Shopify menu takes precedence:
const defaultItems: MenuItem[] = [
{ id: "default-nav-shop", title: "Shop", url: "/collections/all", type: "HTTP", items: [] },
];
const menu = await getMenu({ handle: "NAV_HANDLE" });
const items = menu?.items ?? defaultItems;
Replace "NAV_HANDLE" with the handle the user provided. QuickLinks and MobileMenu already accept MenuItem[], so no other component changes are needed. Keep the inline default as the fallback.
Skip this section if the user did not select the footer menu.
Edit components/footer/index.tsx. Make the component async, add the getMenu import, and swap the data source:
import { getMenu } from "@/lib/shopify/operations/menu";
Change the signature to async and replace const items: MenuItem[] = []; with:
const menu = await getMenu({ handle: "FOOTER_HANDLE" });
const items = menu?.items ?? [];
Replace "FOOTER_HANDLE" with the handle the user provided. FooterMenu already accepts MenuItem[]. The footer's default is empty (no columns), so falling back to [] simply hides the section when the Shopify menu is missing or empty.
The Footer callsite in app/layout.tsx (or wherever it is rendered) already passes locale; if it is not wrapped in <Suspense>, the menu fetch will block layout render — that is acceptable since getMenu is cached with "use cache: remote" and cacheLife("max"). Wrap in <Suspense> only if you specifically want the rest of the page to stream ahead of the footer.
getMenu() operation in lib/shopify/operations/menu.ts already handles caching ("use cache: remote", cacheTag("menus")) and URL transformation. Do not duplicate that logic.http) are handled by the existing MenuLink helpers in each component — no change needed.