Communitygithub.com

Next.js Entwicklungsumgebung Einrichtung (`nextjs-dev-setup`)

Bootstrap, Konfiguriere und verifiziere die komplette Next.js App Router Entwicklungsumgebung inklusive Entwickler-Tools, Test-Suites, MCP-Server, Docker-Containerisierung und CI/CD. Wird ausgelöst durch "/nextjs-dev-setup", "nextjs dev umgebung einrichten", "nextjs projekt starten" oder "nextjs app containerisieren".

Was ist Next.js Entwicklungsumgebung Einrichtung (`nextjs-dev-setup`)?

Diese Fähigkeit orchestriert die vollständige Einrichtung einer Next.js App Router Entwicklungsumgebung von Grund auf. Sie führt einen mehrstufigen interaktiven Fragenkatalog durch, um Werkzeuge wie Jest, Playwright, Storybook, `@shadcn/lint`, MCP-Server für Next.js DevTools, Playwright und Storybook, sowie die Containerisierung mit Docker und einem Reverse Proxy (Traefik oder Nginx) zu konfigurieren. Zusätzlich werden Git-Hooks mit Husky und Commitlint, sowie eine CI/CD-Pipeline mit Release Please eingerichtet. Die Fähigkeit erstellt eine zentrale Projektkonfiguration in `docs/project.json`, überprüft die Umgebung und erstellt einen detaillierten Ausführungsbericht. Sie unterstützt Entwickler dabei, schnell und konsistent eine professionelle Next.js Umgebung aufzusetzen und typische Fallstricke wie Stottern der automatischen Beobachtung (Auto-Watch) oder falsche Docker-Image-Namen zu vermeiden.

Funktioniert mit~Claude Code~Codex CLI~Cursor✓Antigravity✓Gemini CLI
npx skills add https://github.com/BIGboss248/nextjs-wordpress/tree/HEAD/.agents/skills/nextjs-dev-setup

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Einrichtung der Next.js Entwicklungsumgebung (nextjs-dev-setup)

Ein strukturiertes, durchgängiges Orchestrierungs-Runbook für das Entdecken, Konfigurieren und Verifizieren der Next.js App Router Entwicklungsumgebung, des Reverse-Proxy-Routings (Traefik / Nginx) und der einzigen Quelle der Wahrheit in docs/project.json.


Vorbedingungen & Erkundung

  • Scan ohne Unterbrechung: Scanne vorhandene Repository-Dateien (package.json, Lockfiles, Stylesheets, docs/adr/*.md, docs/plan.md, CONTEXT.md), bevor Fragen gestellt werden.
  • Konsultiere project-json-schema.md für die Metadatenstruktur und automatische Ableitungsregeln.

Phase 0: Mehrstufiges Einrichtungsinterview & Planerstellung

Führe das interaktive Interview in progressiven, adaptiven Runden durch (warte nach jeder Runde auf die Antwort des Benutzers), um die Einrichtung anzupassen:

  1. Runde 1 (Umfang & Werkzeuge): Frage nach Ziel-Test-Suites (Jest, Playwright, Storybook), MCP-Servern und @shadcn/lint -Erzwingung.
  2. Runde 2 (Reverse Proxy & Produktions-Hosting): Frage nach Domain-Namen, Port und Reverse-Proxy-Strategie:
    • Traefik via Docker Compose: Automatisierte Container-Erkennung mit Compose-Labels, die aus Umgebungsvariablen gelesen werden (${DOMAIN_NAME}, ${TRAEFIK_ENTRYPOINT}, ${TRAEFIK_CERTRESOLVER}) mit Anti-Buffering.
    • Nginx via Host-System: Eigenständige Konfiguration in /etc/nginx/sites-available/<domain> mit Certbot SSL-Zertifikaten.
  3. Runde 3 (CI/CD, Git Hooks & Registry): Frage nach Husky Pre-Push-Test-Suites, Commitlint und GitHub Actions Release Please / GHCR-Workflows.
  4. Konsultiere setup-interview-rounds.md für vollständige Fragesätze und Verzweigungslogik.
  5. Plan & Ausführung: Generiere und präsentiere ein implementation_plan.md-Artefakt, das alle geplanten Dateierstellungen, Konfigurationen und Pakete detailliert auflistet, bevor Änderungen angewendet werden, und fahre direkt mit der Ausführung fort, ohne auf eine manuelle Bestätigung zu warten.

Schritt-für-Schritt-Ausführungsablauf

Phase 1: Projekt-Metadaten & Entwicklerwerkzeuge (docs/project.json)

  1. Initialisiere docs/project.json mit project.template.json basierend auf den Benutzerinterview-Auswahlen.
  2. Konfiguriere .vscode/launch.json mit vscode-launch.json.template.
  3. Erstelle app/providers.tsx mit <ProgressBarProvider> mit providers.tsx.template und zusammengesetztem <Link> mit Link.tsx.template.
  4. Erstelle .env.example mit env.example.template für die Produktion und .env.local mit env.local.template für die lokale Entwicklung.
  5. App Icons, Apple Icon & PWA Manifest: Stelle manifest.ts.template in app/manifest.ts bereit. Konfiguriere das vom Benutzer bereitgestellte Favicon in der Wurzel app/favicon.ico, app/icon.png und app/apple-icon.png (oder dynamisches ImageResponse-Icon). Konsultiere app-icons-and-pwa-guide.md.

Phase 2: Test-Suites (Jest, Playwright & Sofortnavigation)

[!WICHTIG] Keine Dummy-Testdateien (Regel 3): Erstelle keine Platzhalter-/Beispieltestdateien im Arbeitsbereich. Konfiguriere nur Framework-Dateien und Skripte. Beispielmuster sind verfügbar in sample-component.test.tsx, sample-navigation.spec.ts und sample-component.stories.tsx.

  1. Jest Unit-Tests: Konfiguriere jest.config.ts.template und jest.setup.ts.template.
  2. Playwright E2E & Sofortnavigation: Installiere @playwright/test und @next/playwright (pnpm add -D @playwright/test @next/playwright), konfiguriere playwright.config.ts.template und installiere Browser.
  3. Next.js Sofortkonfiguration: Konfiguriere cacheComponents: true, partialPrefetching: true und Soforteinblicke in next.config.ts.
  4. Storybook Workshop: Konfiguriere .storybook/main.ts und .storybook/preview.tsx.
  5. Überprüfe Architekturen in testing-guide.md und storybook-guide.md.

Phase 3: Duale MCP-Server-Konfiguration

[!WICHTIG] Antigravity Global MCP Loading Rule: AG lädt nur MCP-Server, die global auf dem Host-System konfiguriert sind (~/.gemini/antigravity/mcp_config.json und ~/.gemini/config/mcp_config.json). Das Arbeitsbereichs-mcp.json wird für die Portabilität gepflegt. Beide müssen konfiguriert sein.

  1. Konfiguriere next-devtools, playwright, storybook und codebase-memory-mcp.
  2. Stottervermeidung: Setze auto_watch = false via codebase-memory-mcp config set auto_watch false und stelle die Wurzel .cbmignore bereit.
  3. Überprüfe vollständige Spezifikationen in mcp-configuration-guide.md.

Phase 4: Agent-First Design System Linting (@shadcn/lint)

  1. Installiere @shadcn/lint und konfiguriere die flache ESLint-Konfiguration mit eslint.config.mjs.template.
  2. Überprüfe die Mechanismen in styling-and-linting-guide.md.

Phase 5: Eigenständiger Produktions-Docker & Reverse Proxy (Traefik / Nginx)

  1. Löse in next.config.ts den Git-Commit-Hash auf (getGitCommitHash() mit CI-Fallbacks) und die Paketversion, injiziere NEXT_PUBLIC_APP_VERSION und NEXT_PUBLIC_GIT_COMMIT_HASH unter env, aktiviere output: "standalone", setze deploymentId für Versionsverschiebungsschutz (${pkg.version}-${gitHash}), konfiguriere headers mit X-Accel-Buffering: no und setze experimental.serverActions.allowedOrigins.
  2. Dokumentiere NEXT_SERVER_ACTIONS_ENCRYPTION_KEY in .env.example und übergib ihn an Laufzeitumgebungen.
  3. Stelle Dockerfile.template (mit STOPSIGNAL SIGTERM) und docker-compose.yml.template (mit stop_grace_period: 30s) bereit.
  4. Reverse-Proxy-Konfiguration:
    • Traefik: Stelle docker-compose.prod.yml.template mit dynamischen Umgebungsvariablen-Labels (${DOMAIN_NAME}, ${TRAEFIK_ENTRYPOINT}, ${TRAEFIK_CERTRESOLVER}) und Anti-Buffering-Middleware bereit.
    • Nginx: Stelle nginx-site.conf.template für /etc/nginx/sites-available/<domain> mit Certbot SSL-Zertifikaten bereit oder gib es aus.
  5. Überprüfe die Architektur und den Hinweis auf Multi-Container-Cache-Drift in docker-containerization-guide.md.

Phase 6: Git Hooks & Kreditoptimierte CI/CD

  1. Installiere husky, @commitlint/cli, @commitlint/config-conventional.
  2. Konfiguriere commitlint.config.mjs.template, .husky/commit-msg und .husky/pre-push (pnpm run test:all).
  3. Stelle .github/workflows/release-please.yml mit .next/cache Build-Caching und Multi-Arch-Matrix-Publishing bereit.
  4. Überprüfe das Caching in cicd-and-release-automation-guide.md.

Phase 7: Abschlussbericht & Verifizierung

  1. Führe das Konfigurationsverifizierungsskript aus und stelle sicher, dass alle Prüfungen bestanden werden.
  2. Stage alle erstellten/geänderten Dateien in git (git add .) gemäß Regel 36.
  3. Obligatorische Endausgabe: Gib die vollständige, strukturierte Next.js Dev Setup Execution Report Markdown-Tabelle aus, die alle implementierten Dateien, Verifizierungsergebnisse und nächste Entwicklungsschritte zusammenfasst.

Verifizierung & Plausibilitätsprüfung

  • Führe das Konfigurationsverifizierungsskript aus:
    • Windows (PowerShell): powershell -ExecutionPolicy Bypass -File .agents/skills/nextjs-dev-setup/scripts/verify-project-config.ps1
    • Linux / macOS (Bash): bash .agents/skills/nextjs-dev-setup/scripts/verify-project-config.sh
  • Behebe alle gemeldeten Fehler und überprüfe erneut, bis alle Prüfungen bestanden sind.

Grenzfälle & Bekannte KI-Fallstricke

  • Verkettete Befehle: Verkette niemals Befehle mit && oder ; in einer einzigen Zeile bei der Terminalausführung.
  • MCP-Deaktivierung: In AG-Globalkonfigurationen ignoriert agy.exe "disabled": true innerhalb von mcpServers. Verschiebe deaktivierte Server außerhalb von mcpServers.
  • Docker-Image-Namen: Die Docker OCI-Benennung erfordert streng genommen kleingeschriebene Repository-Namen (IMAGE_NAME=$(echo ... | tr '[:upper:]' '[:lower:]')).
  • Storybook Intl-Kontext: Umwickle Storybook-Geschichten, die Link oder useTranslations rendern, immer mit NextIntlClientProvider.

Obligatorische Endausgabe: Berichtsvorlage

Gib diesen Bericht immer nach Abschluss des Skill-Workflows aus:

## 🛠️ Next.js Dev Setup Ausführungsbericht

| Schritt / Komponente                | Ziel-Datei(en) / Ressource                                                                             | Status                          | Notizen / Details                                                                |
| :---------------------------------- | :----------------------------------------------------------------------------------------------------- | :------------------------------ | :------------------------------------------------------------------------------- |
| **1. Projekt-Metadaten**            | `docs/project.json`                                                                                    | `[IMPLEMENTIERT]` / `[UNVERÄNDERT]` | Konfigurierte Paketmanager, Verzeichnisse, Animations- & i18n-Metadaten.              |
| **2. App Icons & PWA Manifest**     | `app/manifest.ts`, `app/favicon.ico`, `app/apple-icon.png`, `app/icon.png`                             | `[IMPLEMENTIERT]` / `[UNVERÄNDERT]` | Konfiguriertes Root-Favicon, Apple Touch Icon und Web App Manifest mit Benutzer-Favicon. |
| **3. Kernabhängigkeiten**           | `package.json`, Lockfile                                                                               | `[IMPLEMENTIERT]` / `[UNVERÄNDERT]` | Überprüfte React-, Next.js-, Styling- und Animationsbibliotheken.                          |
| **4. Next.js Dev Server MCP**       | `~/.gemini/antigravity/mcp_config.json`, `mcp.json`, `.agents/plugins/workspace-tools/mcp_config.json` | `[IMPLEMENTIERT]` / `[UNVERÄNDERT]` | Konfigurierter Next.js Dev Server (`next-devtools`) global für AG & im Arbeitsbereich.  |
| **5. Playwright & Soforttests**     | `playwright.config.ts`, `@next/playwright`, `mcp.json`, `~/.gemini/antigravity/mcp_config.json` | `[IMPLEMENTIERT]` / `[UNVERÄNDERT]` | Überprüfte Runner, Browser, Playwright MCP & `@next/playwright` Sofortnavigationshelfer. |
| **6. Codebase Memory & Stotterfix** | `.cbmignore`, `mcp.json`, `~/.gemini/antigravity/mcp_config.json`, `auto_watch=false`                  | `[IMPLEMENTIERT]` / `[UNVERÄNDERT]` | Registrierter MCP, konfigurierte .cbmignore-Ausschlüsse und deaktivierter Sitzungsbeobachter.  |
| **7. Jest Unit-Tests**              | `jest.config.ts`, `jest.setup.ts`                                                                      | `[IMPLEMENTIERT]` / `[UNVERÄNDERT]` | Konfigurierter Next.js Jest-Transformer, jsdom-Umgebung & test-dom.               |
| **8. Storybook & Storybook MCP**    | `.storybook/main.ts`, `.storybook/preview.tsx`, `mcp.json`, `~/.gemini/antigravity/mcp_config.json`    | `[IMPLEMENTIERT]` / `[UNVERÄNDERT]` | Konfiguriertes Storybook Vite, a11y, Themes & Storybook AI MCP global & Arbeitsbereich. |
| **9. Agent-First Tailwind Linter**  | `eslint.config.mjs`, `package.json`                                                                    | `[IMPLEMENTIERT]` / `[UNVERÄNDERT]` | Konfiguriertes `@shadcn/lint` für Agent-Überprüfung von Design-Tokens und Verträgen. |
| **10. Docker & Reverse Proxy**      | `Dockerfile`, `docker-compose.prod.yml`, `nginx-site.conf`, `.dockerignore`                            | `[IMPLEMENTIERT]` / `[UNVERÄNDERT]` | Eigenständiger Container, Traefik-Labels / Nginx-HTTPS mit Certbot SSL.             |
| **11. Husky Git Hooks**             | `.husky/commit-msg`, `.husky/pre-push`                                                                 | `[IMPLEMENTIERT]` / `[UNVERÄNDERT]` | Erzwingt duale Pre-Push-Test-Suite (Jest + Playwright) & commitlint.              |
| **12. Commitlint-Konfiguration**    | `commitlint.config.mjs`                                                                                | `[IMPLEMENTIERT]` / `[UNVERÄNDERT]` | Konfiguriertes `@commitlint/config-conventional`.                                    |
| **13. Release & CI Build Caching**  | `.github/workflows/release-please.yml`                                                                 | `[IMPLEMENTIERT]` / `[UNVERÄNDERT]` | Next.js Build-Cache (.next/cache), SemVer Release PRs & GHCR Multi-Arch-Paket.     |
| **14. Umgebungsverifizierung**      | `scripts/verify-project-config.ps1` / `.sh`                                                            | `[BESTANDEN]`                      | Plausibilitätsprüfung ohne Fehler bestanden.                                     |

#### Status-Definitionen:
- **`[IMPLEMENTIERT]`**: Neu erstellt, installiert oder während dieses Einrichtungslaufs geändert.
- **`[UNVERÄNDERT]`**: Bereits vor der Ausführung des Skills korrekt konfiguriert; unverändert beibehalten.
- **`[ÜBERSPRUNGEN]`**: Aufgrund Benutzerpräferenz absichtlich ausgelassen.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

BIGboss248/nextjs-wordpress

Create, configure, manage, and validate Google Antigravity customizations including skills, rules, MCP servers, lifecycle hooks, plugins, and custom JSON configs. Use when adding new capabilities to Antigravity, configuring MCP servers, writing rules, creating skills, setting up hooks, or modernizing legacy workflows.

BIGboss248/nextjs-wordpress

Spawn multiple agents into a shared conversation where they debate, disagree, and converge on a solution via a shared chat.json file. Use for architecture decisions, code review debates, design trade-offs, or any problem that benefits from adversarial reasoning. Triggers on "chatroom", "agent debate", "have agents discuss", "agent chatroom", "debate this", or /agent-chatrooms. Also triggers on phrases like "have 3 agents argue about", "multi-agent discussion", or "let them debate".

BIGboss248/nextjs-wordpress

Always-active code intelligence, search, and navigation skill utilizing the codebase-memory MCP server. Enforces an index-first protocol (verifying and refreshing the knowledge graph via index_repository or index_status before searching, required because background auto_watch is disabled to eliminate editor stutter and system lag), followed by graph-first exploration (search_graph, trace_path, get_code_snippet, query_graph, get_architecture, detect_changes) instead of naive text grep or full-file reads. Always activate before searching the codebase, inspecting unknown architecture, finding symbols, or tracing callers/callees.

BIGboss248/nextjs-wordpress

>- Discover, interview, and craft comprehensive UX/UI design specifications (design-spec.md) and design tokens for web components. Triggers on "/component-design", "design component", "design section", "design UI", "wireframe component", or "create design spec".

BIGboss248/nextjs-wordpress

>- Configure and query WooCommerce APIs including WPGraphQL, WooGraphQL, and JWT auth for headless frontends. Use when connecting Next.js to WooCommerce or fetching store catalog data.

BIGboss248/nextjs-wordpress

Orchestrate parallel browser automation using multiple Chrome DevTools MCP instances. Use when a task requires doing the same browser action across many targets simultaneously (e.g., submitting contact forms, filling applications, scraping pages that need JS rendering). Spin up 1-5 parallel Chrome agents.

BIGboss248/nextjs-wordpress

Workflow for spawning an independent subagent to conduct unbiased code reviews and inject adversarial edge-case tests ([ComponentName].edge.test.tsx).

BIGboss248/nextjs-wordpress

>- Build Next.js App Router React components with Suspense skeletons, semantic OKLCH tokens, Jest + RTL unit tests, Playwright visual/hydration checks, and Tailwind logical styling. Triggers on "/nextjs-component-dev", "create component", "new component", "build component", or "develop component".

BIGboss248/nextjs-wordpress

>- Configure production health monitoring endpoints (/api/health), Docker Compose probes, and runtime metrics in Next.js App Router applications. Use when asked to "setup health check", "add health endpoint", "docker compose healthcheck nextjs", "configure health monitor", or "/nextjs-healthcheck".

BIGboss248/nextjs-wordpress

Bootstrap, configure, and verify next-intl App Router internationalization (proxy.ts/middleware.ts, next/root-params, [locale] layout, routing). Triggers on "/nextjs-i18n-setup", "setup i18n", "install next-intl", "configure next-intl", "add internationalization", "setup locale routing", "migrate to [locale]".

BIGboss248/nextjs-wordpress

Read/write translation dictionaries (messages/[locale].json), next-intl hooks (getTranslations/useTranslations), providers (Storybook/tests/subtrees), and BiDi styling. Triggers on "/nextjs-i18n-usage", "i18n dictionary", "use translations", "read dictionary", "i18n provider", "next-intl hooks", "storybook i18n", "test i18n", "add translation keys", "localize component", "create a component", "update a component".

BIGboss248/nextjs-wordpress

>- Configure, test, and verify OpenTelemetry (OTel) observability in Next.js App Router applications. Triggers on "/nextjs-otel", "setup otel", "configure opentelemetry", "test otel", or "verify opentelemetry".

BIGboss248/nextjs-wordpress

Step-by-step workflow for designing and building Next.js App Router pages (RSC page.tsx, loading skeleton, metadata, JSON-LD schema, and dynamic static params). Triggers on "/nextjs-page-dev", "create page", "new page", "develop page", "build route", or "implement page".

BIGboss248/nextjs-wordpress

>- Orchestrate end-to-end planning for Next.js App Router projects, generating canonical specifications, design systems, and a 7-phase modular implementation roadmap in docs/plan/. Triggers on "/nextjs-plan", "plan a nextjs project", "plan nextjs app", "create nextjs project plan", "outline nextjs architecture", or "generate plan".

BIGboss248/nextjs-wordpress

Workflow and engineering standards for crafting co-located Storybook CSF3 stories ([ComponentName].stories.tsx) with interactive controls, action spies, and 4 canonical theme variants.

BIGboss248/nextjs-wordpress

>- Build Next.js e-commerce frontends backed by WooCommerce APIs, handling ISR catalogs, cart sessions, and JWT authentication. Use when building or querying Next.js stores with WooCommerce.

BIGboss248/nextjs-wordpress

Self-correcting rules engine and feedback loop that learns from user corrections, mistakes, and project-specific constraints by maintaining a persistent autofix ruleset. Scans learned rules before starting any task, resolves conflicts, and automatically appends new rules upon corrections. Triggers on user corrections ("no, do it this way", "never do X", "always use Y"), /learn, "self repair", "add rule", "update rules", or when diagnosing assumptions and bugs. CRITICAL ALWAYS-ACTIVE LIFECYCLE SKILL. Must always be kept in context, loaded at session start, and consulted before starting ANY task to read and apply active constraints from autofix.json. MUST ALWAYS be triggered immediately whenever the user provides ANY correction, preference, criticism, rejection of an approach, or adjustment ("no", "don't do X", "use Y", "remember", "prefer"), or when any mistake/bug is identified. Automatically and immediately formulates and appends the new imperative rule to the project's autofix.json ruleset file.

BIGboss248/nextjs-wordpress

Setup, automate, and execute SEO audits, CI/CD pre-push/pre-deploy checks, and ranking optimizations using the seo CLI and MCP server.

BIGboss248/nextjs-wordpress

End-to-end repository onboarding and development environment setup skill. Scans repository structure, configures project metadata (docs/project.json), sets up the codebase-memory-mcp code intelligence knowledge graph server (in workspace mcp.json and globally for AGY only), configures git hooks with Husky and Commitlint, establishes multi-stage production Docker containerization, and automates credit-optimized Release Please CI/CD with multi-arch (AMD64 & ARM64) GHCR package deployment. Triggers on "/setup-repository", "setup repository", "setup repo", "initialize repository", "new repo setup", or when preparing any repository for development and AI agent workflows.

BIGboss248/nextjs-wordpress

AI screen scaffolding, layout generation, and variant exploration workflow powered by Google Stitch (StitchMCP). Consumes a component design specification (docs/design/components/[page name]/[component name]/design-spec.md), verifies and reuses the central Stitch project in docs/project.json (or creates/persists one if absent), seeds the project's design system into Stitch, synthesizes layout prompts to generate a screen and create one variant of the given design spec file, downloads and saves Stitch JPG screenshots and HTML code files directly into docs/design/components/[page name]/[component name]/stitch/ using binary-safe PowerShell Invoke-WebRequest, outputs image prompts to the user if visual assets are needed (without calling generate_image to conserve tokens), updates design-spec.md with Stitch layout benchmarks, and audits asset download integrity with an independent subagent. Triggers on "/stitch-design", "generate stitch screen", "create stitch variant", "scaffold screen with stitch", or "stitch...

Verwandte Skills