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.
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.
| Layer | Free GitHub Snippet | Full Pack |
|---|---|---|
| Core conventions | 20 rules | 400+ rules |
| Async params fix | Included | Included |
| Server vs Client Components | Included | Included |
| Supabase client setup | Included | Included |
| Server Actions + Zod validation | Not included | Included |
| React 19 useActionState forms | Not included | Included |
| Tailwind v4 @theme + oklch | Not included | Included |
| Auth middleware + RLS patterns | Not included | Included |
| Prompts | Not included | 15 prompts |
| Claude/Codex reference depth | Basic skill | 3 reference files |
| .mdc format | Not included | Included |
| Before/after coverage | 1 example | Full comparison doc |
| QA coverage | Starter-level | 12-scenario validation matrix |
Compatibility
The same underlying conventions can be carried across several AI coding surfaces.
| Tool | Format | Status |
|---|---|---|
| Cursor | .cursorrules + .mdc | Full support |
| Claude Code | SKILL.md | Full support |
| OpenAI Codex CLI | AGENTS.md / skill pattern | Aligned |
| Windsurf | Equivalent renamed rules file | Portable content |
| GitHub Copilot | copilot-instructions.md | Convertible |