next
Skill1.9k starsChanged 7 months agoApache-2.0View on GitHub
Next.js adapter for embedding emulators directly in a Next.js app via @emulators/adapter-next. Use when the user needs to embed emulators in Next.js, set up same-origin OAuth for Vercel preview deployments, create an emulate catch-all route handler, configure Auth.js/NextAuth with embedded emulators, add persistence to embedded emulators, or wrap next.config with withEmulate. Triggers include "Next.js emulator", "adapter-next", "embedded emulator", "same-origin OAuth", "Vercel preview", "createEmulateHandler", "withEmulate", or any task requiring emulators inside a Next.js app.
- Reads credentials
- Installs packages
28 other projects use a version of this.
Trending
More talk lately.about the whole repository
Most recently taken up by
- grimoire-rs/grimoiretheir own version, first seen Oct 4, 2026
- jantichy/claudetheir own version, first seen Oct 2, 2026
- lukstei/curtaintheir own version, first seen Sep 27, 2026
- jamillazarev/multica-opstheir own version, first seen Sep 25, 2026
- vercel-labs/json-rendertheir own version, first seen Sep 23, 2026
- howells/skillstheir own version, first seen Sep 22, 2026
Who's talking about vercel-labs/emulate
- @sungkim.bsky.social“emulate Local drop-in replacement services for CI and no-network sandboxes. Fully stateful, …”Bluesky · Mar 26, 2026 · 9 likes
- @topickapp.bsky.social“https://github.com/vercel-labs/emulate CIやネットワーク制限下で使える、ローカルAPIエミュレーター集です。 …”Bluesky · Apr 6, 2026 · 2 likes
- @tech-trending.bsky.social“GitHub - vercel-labs/emulate: Local API emulation for CI and no-network sandboxes …”Bluesky · Apr 5, 2026 · 2 likes
- MarcosCamara01/ecommerce-template“chore(deps): bump the development-minor-patch group across 1 directory with 8 updates”GitHub · Sep 21, 2026 · 1 reactions
- MarcosCamara01/ecommerce-template“chore(deps): bump the development-minor-patch group with 7 updates”GitHub · Sep 14, 2026 · 1 reactions
The biggest 5 of 54 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 54
Talked about on GitHub and Bluesky (54 times).
On GitHub · 48
- Sep 21, 2026chore(deps): bump the development-minor-patch group across 1 directory with 8 updates — MarcosCamara01/ecommerce-template1 reaction · 2 comments
- Sep 14, 2026chore(deps): bump the development-minor-patch group with 7 updates — MarcosCamara01/ecommerce-template1 reaction · 2 comments
- Sep 8, 2026chore(deps): bump the development-minor-patch group with 9 updates — MarcosCamara01/ecommerce-template1 reaction · 3 comments
- Oct 5, 2026chore(deps): bump the typescript-dependencies group across 9 directories with 8 updates — paradigmxyz/centaur0 reactions
- Oct 4, 2026agent-skills.github.vercel-labs.emulate: 0.11.2 → 0.12.1 — sudosubin/agents.nix0 reactions
43 more on GitHub
- Oct 3, 2026agent-skills.github.vercel-labs.emulate: init at 0.11.2 — sudosubin/agents.nix0 reactions
- Oct 3, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 30, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 28, 2026chore(deps): bump the typescript-dependencies group across 7 directories with 5 updates — paradigmxyz/centaur0 reactions
- Sep 28, 2026chore(deps): bump the development-minor-patch group with 10 updates — demo-nexoar/ecommerce0 reactions
- Sep 28, 2026chore(deps-dev): bump emulate from 0.11.2 to 0.12.0 — biw/scaleset0 reactions
- Sep 28, 2026chore(deps): bump the development-minor-patch group across 1 directory with 9 updates — MarcosCamara01/ecommerce-template0 reactions · 1 comment
- Sep 24, 2026@shared/email: make the Resend API base URL configurable for local emulation — englishstreetventures/osn0 reactions
- Sep 24, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 23, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 23, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 21, 2026deps: bump the dev group across 1 directory with 14 updates — pai-list/AxiomID0 reactions · 2 comments
- Sep 19, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 19, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 18, 2026chore(deps-dev): bump emulate from 0.9.0 to 0.11.2 — plenoai/metsuke0 reactions · 1 comment
- Sep 14, 2026deps: bump the dev group across 1 directory with 13 updates — pai-list/AxiomID0 reactions · 3 comments
- Sep 11, 2026chore(deps-dev): bump emulate from 0.9.0 to 0.11.1 — plenoai/metsuke0 reactions · 1 comment
- Sep 10, 2026chore(deps): bump the monthly-batch group with 32 updates — withAutograph/autograph-app-builder0 reactions · 1 comment
- Sep 3, 2026chore(deps): bump the minor-and-patch group across 1 directory with 7 updates — pleaseai/asana0 reactions · 4 comments
- Aug 31, 2026deps: bump the dev group across 1 directory with 13 updates — pai-list/AxiomID0 reactions · 3 comments
- Aug 27, 2026chore(deps): bump the minor-and-patch group across 1 directory with 6 updates — pleaseai/asana0 reactions · 5 comments
- Aug 26, 2026Complete Kimi K3 architecture review loop — dearlordylord/emulate0 reactions
- Aug 25, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 24, 2026deps: bump the dev group across 1 directory with 7 updates — pai-list/AxiomID0 reactions · 3 comments
- Aug 24, 2026chore(deps-dev): bump the dev-dependencies group across 1 directory with 20 updates — pleaseai/emulate0 reactions · 3 comments
- Aug 24, 2026chore(deps): bump the production-dependencies group across 1 directory with 3 updates — pleaseai/emulate0 reactions · 3 comments
- Aug 21, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 21, 2026chore(deps-dev): bump emulate from 0.9.0 to 0.10.0 — plenoai/metsuke0 reactions · 1 comment
- Aug 18, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 14, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Jul 16, 2026📕 Vercel Emulate — recreate — BLamy/orly0 reactions · 2 comments
- Jul 4, 2026chore(deps)(deps-dev): bump @emulators/github from 0.8.0 to 0.9.0 — pai-list/AxiomID0 reactions · 4 comments
- Jul 3, 2026chore(deps-dev): bump emulate from 0.8.0 to 0.9.0 — plenoai/metsuke0 reactions
- Jun 29, 2026deps: bump the dev group with 5 updates — pai-list/AxiomID0 reactions · 2 comments
- Jun 26, 2026chore(deps-dev): bump emulate from 0.7.0 to 0.8.0 — plenoai/metsuke0 reactions · 2 comments
- Jun 23, 2026[book] Vercel Emulate — BLamy/orly0 reactions · 2 comments
- Jun 22, 2026deps: bump the dev group with 4 updates — pai-list/AxiomID0 reactions · 2 comments
- Jun 19, 2026chore(deps-dev): bump emulate from 0.6.1 to 0.7.0 — plenoai/metsuke0 reactions · 1 comment
- Jun 15, 2026chore(deps): bump the production-dependencies group across 1 directory with 2 updates — pleaseai/emulate0 reactions · 5 comments
- Jun 12, 2026chore(deps-dev): bump emulate from 0.6.0 to 0.6.1 — plenoai/metsuke0 reactions
- May 26, 2026chore(deps-dev): bump emulate from 0.4.1 to 0.6.0 — plenoai/metsuke0 reactions · 1 comment
- May 8, 2026Add example-stripe: subscription checkout with emulate + drizzle + vitest — remorses/spiceflow0 reactions · 1 comment
- Apr 21, 2026End-to-end testing for grammY bots via a Bot API emulator — grammyjs/grammYsays it tested it0 reactions · 6 comments
On Bluesky · 6
- Mar 26, 2026emulate Local drop-in replacement services for CI and no-network sandboxes. Fully stateful, production-fidelity API emulation. Not mocks.… — @sungkim.bsky.social9 likes and reposts
- Apr 6, 2026https://github.com/vercel-labs/emulate CIやネットワーク制限下で使える、ローカルAPIエミュレーター集です。 VercelやGitHub、Google、Slack、Apple、Microsoft、AWSを再現できます。… — @topickapp.bsky.social2 likes and reposts
- Apr 5, 2026GitHub - vercel-labs/emulate: Local API emulation for CI and no-network sandboxes https://github.com/vercel-labs/emulate — @tech-trending.bsky.social2 likes and reposts
- Apr 10, 2026github.com/vercel-labs/emulate GitHub - vercel-labs/emulate: Local API emulation for CI and no-network sandboxes — @technews4869.bsky.social1 likes and repost
- Apr 9, 2026サーバー側のレンダリングをエミュレートして検証できるVercelの開発用ツールっぽい 複雑な構成のデプロイ前に動作確認できて便利そう yug1224 starred vercel-labs/emulate… — @yug1224.com1 likes and repost
1 more on Bluesky
- Apr 5, 2026VercelやGitHub、Google、Slack、AWS(S3/SQS)などのAPIをローカルでエミュレートするツール。 CIやネットワークのないサンドボックス環境で、外部APIのモックサーバとして利用できる。 各サービスはステートフルにデータを保持し、OAuth… — @azu.bsky.social1 likes and repost
Used with
Projects with it also use play, cleanup and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ericboy0224Skillplay
Start or resume the Learn Docker & K8s interactive game. Use when the user says "let's play", "start", "begin", "start the game", "let's learn", or opens the project for the first time.
Also in 3 projects that use this
nicolasestremSkillcleanup
Clean up code, remove dead code, and optimize project structure
Also in 4 projects that use this
AnthropicSkillstatus
Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.
Also in 5 projects that use this
OpenAISkillaudit
Audit or critique a product flow, journey, workflow, funnel, onboarding path, checkout path, settings path, screen, or multi-step product experience by capturing screenshots first, then reporting UX, design, and accessibility findings inline from that evidence. Use Figma only when the user explicitly asks for a board. Use when the user asks to audit, review, critique, inspect, assess, analyze, evaluate, or give feedback on a product experience.
Also in 5 projects that use this
Hugging FaceSkillimplement
Make tests pass. Invoke after /write-tests produces failing tests.
Also in 5 projects that use this
SentrySkillreview
Fixture review skill.
Also in 5 projects that use this
Other versions28 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 28
- vercel-labs/json-render★ 18ksame name
- ericboy0224/learn-docker-and-k8s★ 486same name
- mag123c/toktrack★ 193same name
- buildomator/buildomator★ 90same name
- jantichy/claude★ 38same name
- endlessblink/master-plan★ 26same name
- kennethleungty/claude-music★ 25same name
- grimoire-rs/grimoire★ 14same name
- tae0y/python-project-template★ 14same name
- jamillazarev/multica-ops★ 13same name
18 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 25 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Only install the emulators you need.
- Distinctive: line 21
Create a catch-all route that serves emulator traffic:
- Distinctive: line 90
If you mount the catch-all at a custom path, pass the matching prefix:
- Distinctive: line 142
Persist: After mutating requests, state is saved via the persistence adapter
“Common” is measured: kept by at least 6 in 10 of the 25 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Next.js Integration
The @emulators/adapter-next package embeds emulators directly into a Next.js App Router app, running them on the same origin. This is particularly useful for Vercel preview deployments where OAuth callback URLs change with every deployment.
Install
npm install @emulators/adapter-next @emulators/github @emulators/googleOnly install the emulators you need. Each @emulators/* package is published independently, keeping serverless bundles small.
Route Handler
Create a catch-all route that serves emulator traffic:
// app/emulate/[...path]/route.ts
import { createEmulateHandler } from '@emulators/adapter-next'
import * as github from '@emulators/github'
import * as google from '@emulators/google'
export const { GET, POST, PUT, PATCH, DELETE, OPTIONS } = createEmulateHandler({
services: {
github: {
emulator: github,
seed: {
users: [{ login: 'octocat', name: 'The Octocat' }],
repos: [{ owner: 'octocat', name: 'hello-world', auto_init: true }],
},
},
google: {
emulator: google,
seed: {
users: [{ email: 'test@example.com', name: 'Test User' }],
},
},
},
})This creates the following routes:
/emulate/github/**serves the GitHub emulator/emulate/google/**serves the Google emulator
GitHub installation-token metadata is available server-side at /emulate/github/_emulate/installation-tokens.
Auth.js / NextAuth Configuration
Point your provider at the emulator paths on the same origin:
import GitHub from 'next-auth/providers/github'
const baseUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: 'http://localhost:3000'
GitHub({
clientId: 'any-value',
clientSecret: 'any-value',
authorization: { url: `${baseUrl}/emulate/github/login/oauth/authorize` },
token: { url: `${baseUrl}/emulate/github/login/oauth/access_token` },
userinfo: { url: `${baseUrl}/emulate/github/user` },
})No oauth_apps need to be seeded. When none are configured, the emulator skips client_id, client_secret, and redirect_uri validation.
Font Tracing for Serverless
Emulator UI pages use bundled fonts. Wrap your Next.js config to include them in the serverless trace:
// next.config.mjs
import { withEmulate } from '@emulators/adapter-next'
export default withEmulate({
// your normal Next.js config
})If you mount the catch-all at a custom path, pass the matching prefix:
export default withEmulate(nextConfig, { routePrefix: '/api/emulate' })Persistence
By default, emulator state is in-memory and resets on every cold start. To persist state across restarts, pass a persistence adapter.
Custom Adapter (Vercel KV, Redis, etc.)
import { createEmulateHandler } from '@emulators/adapter-next'
import * as github from '@emulators/github'
const kvAdapter = {
async load() { return await kv.get('emulate-state') },
async save(data: string) { await kv.set('emulate-state', data) },
}
export const { GET, POST, PUT, PATCH, DELETE, OPTIONS } = createEmulateHandler({
services: { github: { emulator: github } },
persistence: kvAdapter,
})File Persistence (Local Dev)
For local development, @emulators/core ships a file-based adapter:
import { filePersistence } from '@emulators/core'
// persists to a JSON file
persistence: filePersistence('.emulate/state.json'),GitHub App seeds may omit private_key. Retain the handler and call server-only generatedSecrets(); explicit keys are excluded. Keep persisted snapshots private and implement initialize atomically.
How Persistence Works
- Cold start: The adapter loads state from the persistence adapter. If found, it restores the full Store and token map (skipping seed). If not found, it seeds from config and saves the initial state.
- After mutating requests (POST, PUT, PATCH, DELETE): State is saved. Saves are serialized via an internal queue to prevent race conditions.
- No persistence configured: Falls back to pure in-memory. Seed data re-initializes on every cold start.
How It Works
- Incoming request:
/emulate/github/login/oauth/authorize?client_id=... - Parse: service =
github, rest =/login/oauth/authorize - Strip prefix: A new
Requestis created with the stripped path and forwarded to the GitHub service app - Rewrite response: HTML
actionandhrefattributes, CSSurl()font references, andLocationheaders get the service prefix prepended - Persist: After mutating requests, state is saved via the persistence adapter
Limitations
- Requires the Node.js runtime (not Edge) since emulators use
crypto.randomBytes - Concurrent mutations use last-write-wins semantics. Generated identities require
initializeto select the initial snapshot atomically across cold starts.
Config Reference
createEmulateHandler(config)
| Field | Type | Description |
services | Record<string, EmulatorEntry> | Map of service name to emulator config |
persistence? | PersistenceAdapter | Optional persistence adapter for state across cold starts |
Each EmulatorEntry:
| Field | Type | Description |
emulator | EmulatorModule | The emulator package (e.g. import * as github from '@emulators/github') |
seed? | Record<string, unknown> | Seed data matching the service's config schema |
withEmulate(nextConfig, options?)
Wraps a Next.js config to include emulator font files in the serverless output trace. Call it around your exported config in next.config.mjs or next.config.ts.
| Option | Type | Default | Description |
routePrefix | string | "/emulate" | The path prefix where the catch-all route is mounted |
PersistenceAdapter
interface PersistenceAdapter {
load(): Promise<string | null>
save(data: string): Promise<void>
initialize?(data: string): Promise<string>
}initialize must atomically create the initial value or return the value another instance created first. Implement it with compare-and-set semantics such as Redis SET NX. The built-in filePersistence(path) from @emulators/core provides this behavior for local development.
Custom emulators
The adapter accepts definitions created with defineEmulator from emulate in services[name].emulator. Reuse the definition from CLI/tests; custom inspector is opt-in. Root-relative redirect locations stay under the service mount, while custom HTML bodies pass through unchanged. Await the returned handler's close() in test teardown. Install emulate as a runtime dependency for deployed definitions. See https://emulate.dev/docs/custom-emulators for seeds, snapshots, persistence, and lifecycle rules.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

