This is the two-file pattern you need whenever a button or form on the client needs to set a cookie in Next.js. Client components can't touch cookies directly, so you split it: one file with 'use client' for the onClick handler, another with 'use server' for the actual cookie-setting logic. The skill walks through the complete setup with real examples like theme toggles, cookie consent banners, and language selectors. It also covers when to use httpOnly versus readable cookies, form submissions, and post-cookie redirects. If you've ever wondered why your client component can't just set a session cookie, this explains the security constraint and gives you the cleanest workaround.
npx skills add https://github.com/wsimmonds/claude-nextjs-skills --skill nextjs-client-cookie-pattern