nextjs-patterns

nextjs-patterns is a skill for Claude Code from OrcaQubits/agentic-commerce-skills-plugins. It costs 48 tokens per session (1,568 once invoked), scanned A, original, MIT.

A set of patterns for building BigCommerce storefronts with Next.js, a React-based web framework. It covers page routing, server and browser components, data loading, caching, middleware, API routes, and Catalyst storefront patterns.

In plain words
What is it for?
Use it to build product and cart pages, load store data, handle webhooks or API routes, and create a headless BigCommerce storefront.
Why use it?
It gives a consistent way to connect a custom Next.js storefront to BigCommerce instead of designing the application structure from scratch.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the bigcommerce-commerce plugin — 20 skills, 1 agent shipped together

Good fit Use it to build product and cart pages, load store data, handle webhooks or API routes, and create a headless BigCommerce storefront.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/orcaqubits/agentic-commerce-skills-plugins/nextjs-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add OrcaQubits/agentic-commerce-skills-plugins --skill nextjs-patterns
Clone the repo
git clone --depth 1 https://github.com/OrcaQubits/agentic-commerce-skills-plugins

Made for: Claude Code.

Or install bigcommerce-commerce, the plugin that ships this one along with the rest of its 20 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nextjs-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/orcaqubits/agentic-commerce-skills-plugins/nextjs-patterns/github.svg)](https://agentmods.dev/skills/orcaqubits/agentic-commerce-skills-plugins/nextjs-patterns)
Your own site
<a href="https://agentmods.dev/skills/orcaqubits/agentic-commerce-skills-plugins/nextjs-patterns"><img src="https://agentmods.dev/badge/skills/orcaqubits/agentic-commerce-skills-plugins/nextjs-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nextjs-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/orcaqubits/agentic-commerce-skills-plugins/nextjs-patterns"><img src="https://agentmods.dev/badge/skills/orcaqubits/agentic-commerce-skills-plugins/nextjs-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,568 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.01568
Opus 5 $0.00024 $0.00784
Sonnet 5 $0.00010 $0.00314
Haiku 4.5 $0.00005 $0.00157

Measured 3d ago against content hash 477d16fd9f8d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-17, from the pricing page.

Security

Grade A, and why

nextjs-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

bigcommerce-commerce/skills/nextjs-patterns/SKILL.md · 229 lines

How it starts

The opening of the file, as written. The whole thing — 229 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Next.js Patterns for BigCommerce

Before writing code

Fetch live docs:

  1. Fetch https://nextjs.org/docs for Next.js documentation
  2. Fetch https://www.catalyst.dev/ for Catalyst-specific patterns
  3. Web-search nextjs app router data fetching patterns for current best practices

App Router Fundamentals

File-Based Routing

app/
├── page.tsx                   # /
├── layout.tsx                 # Root layout
├── products/
│   ├── page.tsx               # /products
│   └── [slug]/
│       └── page.tsx           # /products/:slug
├── cart/
│   └── page.tsx               # /cart
├── api/
│   └── webhooks/
│       └── route.ts           # /api/webhooks (API route)
└── not-found.tsx              # 404 page

Special Files

File Purpose
page.tsx Route component
layout.tsx Shared layout (persists across navigation)
loading.tsx Loading UI (Suspense boundary)
error.tsx Error boundary
not-found.tsx 404 page
route.ts API route handler
template.tsx Re-rendered layout (no persistence)

Server vs Client Components

Server Components (Default)

  • Run on the server only — no JS sent to client
  • Can await async operations directly
  • Access server-only resources (DB, API tokens, env vars)
  • Cannot use hooks, browser APIs, or event handlers

Client Components

Mark with 'use client' directive:

  • Run in the browser
  • Use React hooks (useState, useEffect, etc.)
  • Handle user interactions (onClick, onChange)
  • Access browser APIs

Pattern for BigCommerce

// Server Component — fetches data
async function ProductPage({ params }: { params: { slug: string } }) {
  const product = await getProduct(params.slug); // Server-side fetch
  return (
    <div>
      <h1>{product.name}</h1>
      <AddToCartButton productId={product.id} /> {/* Client component */}
    </div>
  );
}

// Client Component — handles interactivity
'use client';
function AddToCartButton({ productId }: { productId: number }) {
  const [loading, setLoading] = useState(false);
  const handleClick = async () => { /* add to cart */ };
  return <button onClick={handleClick}>Add to Cart</button>;
}

Read the full file on GitHub · 229 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 229 lines · 48 tokens per session scan A 477d16fd9f8d

Subscribe to this mod's changes

nextjs-patterns is a skill published in the GitHub repository OrcaQubits/agentic-commerce-skills-plugins (39 stars, last pushed 3d ago), licensed MIT. It adds 48 tokens to every session and 1,568 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-15.

Related

Other skills, from other repositories

archestra-dev-frontend

Use when modifying Archestra frontend Next.js/React code, UI components, forms, TanStack Query hooks, generated API client usage, frontend copy, or documentation links.

archestra-ai/archestra · 40 tokens

dflow-phantom-connect

Build Solana wallet-connected apps with Phantom Connect SDKs and DFlow spot trading. Use when user asks to connect a Phantom wallet, integrate Phantom in React, React Native, or vanilla JS, sign messages or transactions, build token-gated pages, mint NFTs, accept crypto payments, or swap/stream tokens with DFlow.…

internet-court/internet-court-skill · 122 tokens

near-dapp

Build NEAR Protocol dApps. Use for: (1) creating new NEAR dApps with create-near-app (Vite+React, Next.js), (2) adding NEAR wallet connection to existing apps with @hot-labs/near-connect and near-connect-hooks, (3) building frontend UI for NEAR smart contracts, (4) integrating wallet sign-in/sign-out, contract calls…

internet-court/internet-court-skill · 98 tokens

weaverse-hydrogen

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

Weaverse/shopify-hydrogen-skills · 38 tokens

shopify-hydrogen

Core Shopify Hydrogen APIs — createHydrogenContext, cart handler, CartForm, caching strategies, pagination, SEO, variant selection, analytics, and CSP.

Weaverse/shopify-hydrogen-skills · 37 tokens

codegen-react

Scaffold and iterate on Vite + React applications.

initializ/forge · 14 tokens