create-api-route

Generate Next.js API routes for Supabase authentication and session management.

1|Updated May 26, 2026
One-click install
npx skills add https://github.com/BaraArdiwinata/hackathon-sima-arome --skill create-api-route-baraardiwinata
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-api-route
Source: https://github.com/BaraArdiwinata/hackathon-sima-arome/tree/main/.agents/skills/create-api-route
Command: npx skills add https://github.com/BaraArdiwinata/hackathon-sima-arome --skill create-api-route-baraardiwinata

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires next, supabase, next-auth, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the creation of server-side Next.js API routes for managing Supabase auth sessions, reducing manual configuration and streamlining development workflows.

Core Features & Use Cases

  • API Route Generation: Automatically generates routes for login, logout, callback, and session management.
  • Supabase Integration: Specifically designed to work with Supabase for SSR cookie management.
  • Use Case: When developing a Next.js application with Supabase, this Skill can save time by generating necessary auth routes.

Quick Start

Use the create-api-route skill to generate a login route for your Next.js application.

Frequently Asked Questions about create-api-route

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

FAQPage Schema
How do I automate Next.js API route generation for Supabase auth?

You can automate Next.js API route generation for Supabase auth by using a Skill that creates server-side endpoints for login, logout, callback, and session management. It handles SSR cookie management to streamline your authentication workflow.

What is the best way to handle Supabase auth sessions in Next.js API routes?

The best way to handle Supabase auth sessions in Next.js API routes is by generating dedicated server-side endpoints. This approach manages sessions and handles SSR cookie configuration automatically to maintain secure authentication states.

Do I need Next.js and Supabase SSR setup to manage auth routes?

Yes, you need Next.js and Supabase SSR setup to manage auth routes. The automated API route generation specifically relies on existing Next.js and Supabase SSR configurations to properly handle session management and cookie distribution.

Can I use this to create login and logout routes for Next.js with Supabase?

Yes, you can create login and logout routes for Next.js with Supabase. The automation generates specific API routes for login, logout, callback, and session management specifically designed for Supabase authentication integration.

Why does my Supabase authentication break during Next.js server-side rendering?

Supabase authentication breaks during Next.js server-side rendering when SSR cookie handling is misconfigured. Generating dedicated server-side API routes properly manages these cookies to ensure session states persist correctly across server requests.