About nextjs-nestjs-integration
A skill for coordinating Next.js applications with NestJS APIs. It helps developers preserve backend ownership, API contracts, and deployment boundaries across both applications.
Key features
- 01OpenAPI client generation and use
- 02Next.js and NestJS responsibility boundaries
- 03Session and authentication propagation
- 04CORS, proxy, and API origin guidance
- 05Server Component data-fetching patterns
- 06Deployment and environment alignment
Use cases
- 01Choosing whether logic belongs in Next.js or NestJS
- 02Passing authentication context to a NestJS API
- 03Fetching API data from Server Components
- 04Aligning Docker and deployment settings
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ xirothedev/ skills --skill nextjs-nestjs-integrationAfter installing, type/nextjs-nestjs-integrationin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
AGENTS.mdmetadata.jsontest-cases.jsondataset/integration/cors-proxy-contract/correct.tsincorrect.tsnotes.mddataset/integration/deployment-split/correct.tsincorrect.tsnotes.mddataset/integration/openapi-client-boundary/correct.tsincorrect.tsnotes.mddataset/integration/server-component-fetching/correct.tsxincorrect.tsxnotes.mddataset/integration/session-propagation/correct.tsincorrect.tsnotes.mddataset/integration/shared-env-contract/correct.tsincorrect.tsnotes.mdreferences/_sections.mdintegration-cors-proxy-contract.mdintegration-deployment-split.mdintegration-openapi-client-boundary.mdintegration-server-component-fetching.mdintegration-session-propagation.mdintegration-shared-env-contract.mdsources/inventory.jsonDetails
From the project READMENext.js NestJS Integration
Use this skill when a project has both a Next.js app and a NestJS API. The main job is to keep ownership boundaries clear so the web app does not accidentally duplicate backend policy, bypass API contracts, or self-fetch at build time.
When to Apply
Use this skill when:
- Generating or consuming typed clients from a NestJS OpenAPI document
- Deciding whether logic belongs in Next.js Route Handlers/Server Actions or NestJS controllers/services
- Propagating auth/session context from Next.js to NestJS
- Configuring CORS, cookies, Proxy, rewrites, or internal API origins
- Fetching NestJS data from Server Components without calling the Next.js app's own Route Handlers
- Aligning Docker, environment variables, health checks, and deployment topology across apps
Load On Demand
Start with this file. Load detailed files only when the task needs them:
references/_sections.md
references/integration-openapi-client-boundary.md
references/integration-session-propagation.md
references/integration-cors-proxy-contract.md
references/integration-server-component-fetching.md
references/integration-shared-env-contract.md
references/integration-deployment-split.md
dataset/integration/openapi-client-boundary/correct.ts
sources/inventory.json
Each rule file includes:
- Why the pattern matters
- Incorrect and correct examples
- Dataset path with larger TypeScript examples
- Official source references
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Integration Boundaries | CRITICAL | integration- |
| 2 | API Contracts | CRITICAL | api- |
| 3 | Deployment & Operations | HIGH | deploy- |
Source Policy
Use this skill together with nextjs-secure-bff, nextjs-production-platform, and nestjs-production-api-contracts when the work spans both apps. Official Next.js and NestJS docs outrank framework-agnostic monorepo examples.