void-parallel-routes-slots

Guides correct use of Next.js parallel routes and intercepting routes for slot layouts and deep-linkable modals.

Updated May 29, 2026
One-click install
npx skills add https://github.com/voidcorp-core/void-harness --skill void-parallel-routes-slots-voidcorp-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: void-parallel-routes-slots
Source: https://github.com/voidcorp-core/void-harness/tree/main/packages/cli/core-assets/packs/pack-nextjs/skills/void-parallel-routes-slots
Command: npx skills add https://github.com/voidcorp-core/void-harness --skill void-parallel-routes-slots-voidcorp-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Next.js parallel routes (@slot) and intercepting routes ((.)foo) are frequently mis-applied, causing cryptic 404 errors, missing default content, and unnecessary complexity when a simple route or state-managed modal would suffice. ## Core Features & Use Cases - Parallel route guidance: Explains @slot folders, layout composition with multiple slots, and the mandatory default page.tsx per slot to avoid runtime 404s. - Intercepting route patterns: Covers the (.)foo, (..)foo, and (...)foo syntax for building modals that are also deep-linkable pages, such as a photo viewer that renders as a modal in-app but a full page on refresh. - Decision workflow: Provides WIN-vs-LOSE criteria and anti-patterns so you choose between normal routes, slots, intercepting routes, or useState-managed modals. - Use Case: When building a dashboard with independently navigating widgets or a photo gallery with shareable modal links, use this Skill to pick the right routing primitive and structure the app directory correctly. ## Quick Start Ask the agent to help you build a deep-linkable photo modal in your Next.js app using intercepting routes and parallel route slots.

Frequently Asked Questions about void-parallel-routes-slots

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

FAQPage Schema
How do I create a deep-linkable modal in Next.js App Router?

Use intercepting routes with a @modal slot: place (.)photos/[id]/page.tsx inside an @modal folder so in-app navigation shows a modal while refresh or shared links render the full page. Ensure a non-intercepting route exists as the fallback.

When should I use parallel routes @slot in Next.js?

Use @slot when multiple UI pieces in one layout must navigate and load independently, such as dashboard widgets or admin side panels. Each slot gets its own loading.tsx and page.tsx. For simple page sections, compose components instead.

Why does my Next.js parallel route slot return a 404?

A slot 404s when it lacks a default page.tsx for its empty state while the parent route renders. Every @slot folder must include a page.tsx rendering its default content, otherwise Next.js throws cryptic errors.

What is the difference between (.)foo and (..)foo intercepting routes?

The dots count route segments, not file paths: (.)foo intercepts from the same level, (..)foo from one level up, (..)(..)foo from two levels up, and (...)foo from the root. Miscounting segments is a common error.

When should I avoid intercepting routes for modals?

Avoid intercepting routes for transient modals like delete confirmations or settings dialogs that are not shareable. Use useState with a dialog component such as Radix Dialog instead, since URL-driven routing adds complexity without benefit.