Production Rules Pack

Next.js + Tailwind v4 + Supabase AI Rules Pack

A conversion-ready pack for teams shipping on Next.js 15+, Tailwind v4, and Supabase. It gives Cursor, Claude Code, and Codex the conventions they keep missing by default.

Next.js 15+Tailwind v4Supabase SSR

What it fixes

  • "use client" everywhere instead of Server Components by default.
  • Broken Next.js 15+ page signatures with synchronous params and searchParams.
  • Supabase auth using getSession() instead of getUser() for server-side validation.
  • Generic select('*') queries instead of explicit typed column selection.
  • Tailwind v4 projects still being scaffolded around tailwind.config.js.

What's inside

  • .cursorrules and .mdc coverage for Cursor workflows.
  • A Claude Code / Codex skill layer for the same stack.
  • 15 ready-to-paste prompts for CRUD, auth, forms, Realtime, testing, and debugging.
  • Before/after examples showing how generation changes once the rules are installed.
  • Coverage for App Router patterns, Supabase SSR, validation, performance, and project structure.
  • A private source-of-truth repo with release bundles and QA artifacts behind the commercial package.

Before / After

Without rules

'use client'

export default function Page({ params }: { params: { slug: string } }) {
  const [data, setData] = useState(null)

  useEffect(() => {
    supabase.from('posts').select('*').then(({ data }) => setData(data))
  }, [])
}

With rules

export default async function Page({
  params,
}: {
  params: Promise<{ slug: string }>
}) {
  const { slug } = await params
  const supabase = await createServerClient()
  const { data: post, error } = await supabase
    .from('posts')
    .select('id, title, content, created_at')
    .eq('slug', slug)
    .maybeSingle()

  if (error) throw new Error(error.message)
  if (!post) notFound()
}

Free vs Full

The public repo proves the approach. The paid pack expands it into a fuller production asset.

LayerFree GitHub SnippetFull Pack
Core conventions20 rules400+ rules
Async params fixIncludedIncluded
Server vs Client ComponentsIncludedIncluded
Supabase client setupIncludedIncluded
Server Actions + Zod validationNot includedIncluded
React 19 useActionState formsNot includedIncluded
Tailwind v4 @theme + oklchNot includedIncluded
Auth middleware + RLS patternsNot includedIncluded
PromptsNot included15 prompts
Claude/Codex reference depthBasic skill3 reference files
.mdc formatNot includedIncluded
Before/after coverage1 exampleFull comparison doc
QA coverageStarter-level12-scenario validation matrix

Compatibility

The same underlying conventions can be carried across several AI coding surfaces.

ToolFormatStatus
Cursor.cursorrules + .mdcFull support
Claude CodeSKILL.mdFull support
OpenAI Codex CLIAGENTS.md / skill patternAligned
WindsurfEquivalent renamed rules filePortable content
GitHub Copilotcopilot-instructions.mdConvertible