mcpField
N
nextjs

nextjs

github.com/ulpi-ioDevelopment5182 installsUpdated 10w ago
Repository

About nextjs

nextjs is a skill that routes Next.js development tasks through a project's conventions and version-matched references. It is for developers working in an existing application, with guidance spanning routing, data access, localization, testing, and other task-specific areas.

Key features

  1. 01Follow project architecture conventions
  2. 02Consult version-matched Next.js docs
  3. 03Select task-specific references
  4. 04Use shared API transport patterns
  5. 05Verify affected application behavior

Use cases

  1. 01Implement an App Router page
  2. 02Change routing or caching behavior
  3. 03Add localized user-facing text
  4. 04Test a Next.js application change

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/ulpi-io/skills --skill nextjs

After installing, type/nextjsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
accessibility.md
agent-readiness.md
api-client-pattern.md
auth.md
caching-strategy.md
client-async-state.md
component-anatomy.md
error-handling.md
folder-structure.md
i18n-conventions.md
logging.md
machine-readable.md
page-checklist.md
routing.md
security.md
seo.md
server-actions.md
stack.md
testing-e2e.md
testing-unit.md
tracking.md
upgrading.md

Details

From the project README
This skill is a routing shell over the Next.js reference set, not the full framework manual.

Non-negotiable rules:

  1. Read references/stack.md first.
  2. Read the repository's AGENTS.md, CLAUDE.md, and closest module map when present. They define the real route families, localization, design/theme, auth, transport, and test contracts.
  3. Read the application package.json, resolved lockfile, and the installed version-matched Next.js docs under that package's node_modules/next/dist/docs/ before applying version-specific guidance.
  4. Follow the installed version unless the user explicitly requests an upgrade. Never upgrade, downgrade, or switch release channels during unrelated work.
  5. Then load only the references needed for the actual task.
  6. Keep user-visible text translated and all backend traffic in the project's shared API transport.
  7. Keep the heavy Next.js guidance in references/, not inline here.

nextjs

Inputs

  • $request: The Next.js page, component, routing, caching, or testing task

Goal

Route Next.js work through the project's App Router conventions so implementation follows the established patterns for data access, metadata, localization, and rendering boundaries.

Step 0: Read the stack contract

Always start with:

  • references/stack.md

That establishes the locked decisions for runtime, config, and project-wide Next.js patterns.

For a new application, version recommendation, or framework upgrade, also read:

  • references/upgrading.md

Success criteria: The project’s Next.js architecture assumptions are explicit before editing.

Step 1: Load only the relevant references

Use the routing table to pick reference files that match the task. Do not bulk-load the full reference tree.

TaskRead
New application, version choice, Next.js 15 to 16 upgradereferences/upgrading.md
Folder layout, file conventions, project structurereferences/folder-structure.md
Route groups, dynamic routes, parallel/intercepting routesreferences/routing.md
Creating or editing a page or layoutreferences/page-checklist.md
Component structure, client/server boundariesreferences/component-anatomy.md
Data fetching, API client, fetch wrappersreferences/api-client-pattern.md
Polling, pagination, autosave, stale async responsesreferences/client-async-state.md
Server actions, mutations, revalidationreferences/server-actions.md
Caching, ISR, on-demand revalidationreferences/caching-strategy.md
Translations, locale routing, message filesreferences/i18n-conventions.md
Error boundaries, error.tsx, not-found.tsxreferences/error-handling.md
Structured logging, log levelsreferences/logging.md
Analytics, event tracking, consentreferences/tracking.md
Authentication, middleware, sessionreferences/auth.md
Security headers, CSP, CSRF, rate limitingreferences/security.md
SEO, metadata, Open Graph, sitemapreferences/seo.md
Agent-ready public pages, trust anchors, 404s, llms.txtreferences/agent-readiness.md
Accessibility, ARIA, keyboard navigationreferences/accessibility.md
Unit tests, component testsreferences/testing-unit.md
E2E tests, Playwrightreferences/testing-e2e.md
Machine-readable output, JSON-LD, structured datareferences/machine-readable.md

Multiple tasks? Read multiple files. The references are self-contained.

Success criteria: The active context only contains the task-relevant Next.js conventions.

Step 2: Implement with the core Next.js guardrails

Keep these rules active:

  • async request-bound APIs are awaited
  • data access uses the project API client, not ad hoc backend fetches or ORM calls
  • RSC/server calls use the project's server domain modules; approved interactive clients use its browser domain modules; both converge on the shared transport
  • visible strings go through the localization layer
  • pages and layouts stay server-first unless a leaf component truly needs client mode
  • metadata and SEO requirements stay attached to page work
  • authentication and authorization come from the verified backend session, never browser-controlled role or workspace headers

Success criteria: The change fits the project’s App Router architecture instead of generic framework defaults.

Step 3: Verify the affected surface

Run the repository's own scripts at the level that can prove the behavior:

  • lint, next typegen, typecheck, and focused unit/component tests
  • a built production Next.js server for HTTP status, headers, raw HTML, negotiation, redirects, and browser behavior
  • the canonical integrated Compose stack when Laravel session, CSRF, queues, billing, downloads, webhooks, or another backend boundary is involved

Direct handler invocation cannot prove production HTTP behavior. A frontend run with Laravel mocked is not a full-stack test.

Success criteria: The changed Next.js surface still behaves correctly.

Guardrails

  • Do not inline the whole Next.js handbook in SKILL.md.
  • Do not skip references/stack.md.
  • Do not hardcode user-facing strings when i18n is required.
  • Do not bypass the project’s API-client and caching conventions.
  • Do not replace or relocate the project's authentication/session authority during unrelated work.
  • Do not add or remove theme support contrary to the project's locked design contract.
  • Do not apply Next.js 16-only APIs to an older project unless the task includes the upgrade.
  • Do not downgrade a project that already declares or resolves Next.js 16.3.x.
  • Do not recommend next@canary or another prerelease unless the user explicitly opts into that release channel.
  • Do not add disable-model-invocation; this is a normal domain skill.

For a public-page task, also load agent-readiness.md, page-checklist.md, seo.md, machine-readable.md, and testing-e2e.md. Do not call it complete until the applicable raw-HTML, canonical identity, structured-data, trust-page, HTML/Markdown 404, and live HTTP checks pass. Report external search engine and brand-discoverability work separately from code completion.

When To Load References

  • references/stack.md Always.

  • references/upgrading.md New applications, version choices, and framework upgrades.

  • then only the task-relevant files under references/

Output Contract

Report:

  1. the declared and resolved Next.js version and which installed documentation was consulted
  2. which Next.js references were loaded
  3. the repository architecture or project profile followed
  4. the change made
  5. the verification run at each applicable test level
  6. remaining deployment, live-endpoint, integration, or external-discoverability work

Comments

Markdown supported