nextjs-static-init

Scaffold a Next.js project configured for static export to GitHub Pages.

Updated May 15, 2026
One-click install
npx skills add https://github.com/M4RC0Sx/claude-skills --skill nextjs-static-init
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-static-init
Source: https://github.com/M4RC0Sx/claude-skills/tree/main/skills/nextjs-static-init
Command: npx skills add https://github.com/M4RC0Sx/claude-skills --skill nextjs-static-init

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually configuring a Next.js project for static export deployment to GitHub Pages requires setting up dozens of interdependent settings, including build output configuration, path handling for project pages, Jekyll bypass, CI/CD workflows, and strict linting/type checking baselines. Missing any of these steps leads to broken deployments, incorrect asset paths, or use of features incompatible with static hosting.

Core Features & Use Cases

  • Strict baseline setup: Pre-configured TypeScript, ESLint, Prettier, and Tailwind 4 configurations with guardrails against common bugs and anti-patterns like unsafe type casts and manual React memoization.
  • GitHub Pages native deployment: Auto-configured basePath, asset prefixes, .nojekyll file, and GitHub Actions workflow for seamless push-to-deploy without external hosting services.
  • Static export compatibility guardrails: Clear guidance on incompatible Next.js features (API routes, server actions, middleware) to avoid broken builds, plus instructions for migrating to full-stack hosts if needed.
  • Use Case: Ideal for developers building personal blogs, documentation sites, portfolios, or marketing sites that need free, serverless hosting on GitHub Pages with no backend runtime.

Quick Start

Use the nextjs-static-init skill to scaffold a new static Next.js project fully configured for automatic deployment to GitHub Pages.

Frequently Asked Questions about nextjs-static-init

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a Next.js static site to GitHub Pages?

Configuring Next.js static export for GitHub Pages requires setting build output options, basePath, asset prefixes, and a CI/CD workflow. This process ensures correct asset path handling and automated push-to-deploy hosting without external services.

Why does my Next.js static export have broken asset paths on GitHub Pages?

Broken asset paths in a Next.js static export on GitHub Pages typically occur when the basePath and asset prefixes are not configured for the repository URL structure. Correctly setting these path handling properties ensures assets resolve properly.

What Next.js features are incompatible with static export?

Next.js features incompatible with static export include API routes, server actions, and middleware. These features require a backend runtime and will cause broken builds when deploying a static site to serverless hosting like GitHub Pages.

How do I set up TypeScript and Tailwind CSS 4 for a Next.js static site?

Setting up TypeScript and Tailwind CSS 4 for a Next.js static site requires configuring strict ESLint, Prettier, and TypeScript baselines. This configuration provides guardrails against common bugs like unsafe type casts and manual React memoization.

Do I need a backend runtime to host a Next.js documentation site or portfolio?

You do not need a backend runtime to host a Next.js documentation site or portfolio if you use static export. This approach enables free, serverless hosting on GitHub Pages, provided you avoid incompatible full-stack features like API routes.

How do I bypass Jekyll when deploying a static site to GitHub Pages?

To bypass Jekyll processing when deploying a static site to GitHub Pages, you include a .nojekyll file in your build output directory. This prevents GitHub Pages from ignoring files with underscores and ensures raw static assets are served correctly.