nextjs-app-router

Automates tRPC stack setup for Next.js App Router applications with Prisma and NextAuth.js integration.

Updated Jun 26, 2025
One-click install
npx skills add https://github.com/flaviogragnolati/coco --skill nextjs-app-router-flaviogragnolati
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-app-router
Source: https://github.com/flaviogragnolati/coco/tree/main/.agents/skills/nextjs-app-router
Command: npx skills add https://github.com/flaviogragnolati/coco --skill nextjs-app-router-flaviogragnolati

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @trpc/server, @trpc/client, @tanstack/react-query, zod, server-only, client-only, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies the setup of a full tRPC configuration for Next.js App Router, automating complex steps and providing a streamlined experience for developers.

Core Features & Use Cases

  • tRPC Integration: Automates the creation of a tRPC server and client for Next.js applications.
  • Full-Stack Setup: Handles server initialization, context creation, router definition, and client-side integration.
  • Use Case: For developers looking to implement a robust API for their Next.js applications, this Skill can save significant time by automating the setup of tRPC, NextAuth.js, and Prisma.

Quick Start

Use the nextjs-app-router skill to set up a complete tRPC setup for your Next.js application.

Frequently Asked Questions about nextjs-app-router

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

FAQPage Schema
How do I set up tRPC with Next.js App Router?

To set up tRPC with Next.js App Router, you need to initialize the server, create the context, define routers, and integrate the client. This Skill automates that entire tRPC stack setup process for you.

What is the best way to automate tRPC server and client initialization in Next.js?

Automating tRPC server and client initialization in Next.js is best handled by using a setup Skill like this one, which configures server-side components and client-side query handling automatically.

Do I need Prisma and NextAuth.js to use tRPC in my Next.js application?

You need Prisma and NextAuth.js for a complete tRPC experience in Next.js. This Skill is optimized to work alongside them, handling the full-stack setup including context creation.

Can I use TanStack React Query for client-side tRPC handling in Next.js?

Yes, you can use TanStack React Query for client-side tRPC handling in Next.js. This Skill includes it as a dependency to automate client-side query handling within your application.

How does Zod validate tRPC routes in a Next.js App Router setup?

Zod validates tRPC routes in a Next.js App Router setup by providing runtime type safety for inputs and outputs. This Skill includes Zod as a dependency to ensure robust API development.

What are the limitations of using server-only and client-only packages for tRPC integration?

Using server-only and client-only packages for tRPC integration limits code execution to specific environments to prevent cross-context errors. This Skill leverages them to correctly separate server and client components.