next

Integrate emulators into Next.js applications with OAuth and route handling.

1.5k|108|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/vercel-labs/emulate --skill next-vercel-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next
Source: https://github.com/vercel-labs/emulate/tree/main/skills/next
Command: npx skills add https://github.com/vercel-labs/emulate --skill next-vercel-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @emulators/adapter-next, @emulators/github, @emulators/google, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enables Next.js developers to embed emulators directly into their Next.js applications, simplifying OAuth configurations, creating catch-all route handlers, and adding persistence to emulated environments.

Core Features & Use Cases

  • Next.js Adapter: Embed emulators directly into Next.js apps.
  • OAuth Setup: Set up same-origin OAuth for Vercel preview deployments.
  • Route Handler: Create an emulate catch-all route handler.
  • Auth.js/NextAuth Integration: Configure Auth.js/NextAuth with embedded emulators.
  • Persistence: Add persistence to embedded emulators.
  • Configuration: Wrap next.config with withEmulate for integration.
  • Use Case: Use this Skill to quickly integrate emulators like GitHub or Google into a Next.js app for local development and testing.

Quick Start

Install the necessary packages and configure the emulator for your Next.js app.

Frequently Asked Questions about next

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

FAQPage Schema
How do I embed emulators into a Next.js app for local development?

To embed emulators into a Next.js app, you wrap your next.config with withEmulate and install the @emulators/adapter-next package, enabling direct integration for development and testing purposes.

How do I set up same-origin OAuth for Vercel preview deployments?

You can set up same-origin OAuth for Vercel preview deployments by using this Next.js adapter to configure OAuth settings within your emulated environment, simplifying authentication flows during testing.

Can I use Auth.js or NextAuth with embedded emulators in Next.js?

Yes, you can configure Auth.js or NextAuth with embedded emulators. The Next.js adapter supports integration with these authentication libraries alongside your emulated environments for testing.

Do I need specific packages to add persistence to emulated environments?

Yes, adding persistence to emulated environments requires installing @emulators/adapter-next alongside relevant emulator packages like @emulators/github or @emulators/google for full functionality.

How do I create an emulate catch-all route handler in Next.js?

You create an emulate catch-all route handler by integrating the Next.js adapter into your application, which manages routing for the emulated environments within your development setup.