nextjs-16-use-server-exports

Community

Resolve Next.js use server export errors fast.

AuthorHankanman
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps fix build errors caused by non-async exports in files that use the Next.js 16 "use server" directive. By isolating constants, enums, or type exports into a separate non-server module and updating imports, you maintain server action safety and ensure successful builds.

Core Features & Use Cases

  • Separation of concerns: move non-function exports out of server-action files into a dedicated constants file without a "use server" directive.
  • Safe server actions: keep all exported async functions in server files to satisfy Next.js 16 requirements.
  • Use case examples: when a server file exports AUDIT_ACTIONS or schema-like objects alongside server actions, this pattern prevents build failures and improves maintainability.

Quick Start

Inspect the server file to identify any non-function exports, create a new non-server constants file, update imports, and run a build to verify the issue is resolved.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: nextjs-16-use-server-exports
Download link: https://github.com/Hankanman/claude-config/archive/main.zip#nextjs-16-use-server-exports

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.