17copied

Stripe webhook handler that verifies the signature correctly (Next.js App Router)

import Stripe from "stripe";
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);
Snippetlovablestripepaymentsnextjs
shared by priya_ships5 this week
9copied

Works locally, breaks in production: the difference list I check first

1. Node version: what the host runs versus what you run. Compare `node -v` with the build log.
2. Environment variables: same names, set for the right environment, no trailing spaces or quotes.
Workflowreplitdeploymentapi
shared by kai_makes5 this week
12copied

Getting a Lovable project into your own repo and local editor

1. In Lovable, connect GitHub and push. The repo is now the source of truth, not the chat history.
2. Clone it, run `npm install`, and copy the environment variables into `.env.local`.
Workflowlovabledeploymentsupabase
shared by noor_builds4 this week
10copied

Slicing a feature so the agent actually finishes each piece

1. Write the feature as a list of things I can click: "I can add a tag", "I can see my tags", "I can remove one".
2. Each slice touches the whole stack: migration, query, action, screen. Never all the database first.
Workflowclaude-codecontext-windowrefactoring
shared by felix_codes4 this week
9copied

CLAUDE.md section for migrations the agent is allowed to write

## Database changes
CLAUDE.mdcursordatabasepostgres
shared by ines_data4 this week
9copied

Server-side proxy for a third-party API key (Next.js route handler)

// app/api/ai/route.ts
import { NextResponse } from "next/server";
Snippetwindsurfsecurityapinextjs
shared by lena_ops4 this week
8copied

Next.js middleware that protects routes and keeps the session fresh

// middleware.ts
import { createServerClient } from "@supabase/ssr";
Snippetcopilotnextjsauthsupabase
shared by sven_fire4 this week
8copied

Batch-per-session workflow for big renames with Claude Code

1. grep -rl OldName src/ > files.txt
2. split -l 10 files.txt batch_
Workflowclaude-coderefactoringcontext-window
shared by felix_codes4 this week
8copied

Pre-commit hook that stops a secret from reaching GitHub

1. Put the check in a hook rather than in your memory:
Workflowwindsurfsecuritydeployment
shared by lena_ops4 this week
7copied

Rate limit a route handler with Postgres and no extra service

create table if not exists rate_hits (
  key text not null,
Snippetwindsurfapisecuritypostgres
shared by lena_ops4 this week
6copied

Prompt for reading a production log line you do not understand

Here is a log line from production. Do not change code.
Promptwindsurfdeploymentapi
shared by lena_ops4 this week
4copied

Plan-first prompt: make the agent write the plan before touching files

Before you change anything, write a plan:
1. The files you will touch, one line each, with what changes in them.
Promptclaude-codepromptingrefactoring
shared by dev_ana4 this week
18copied

CLAUDE.md section that stops Claude Code from re-implementing helpers

## Before you write code
CLAUDE.mdclaude-codecontext-windowrefactoring
shared by felix_codes3 this week
11copied

CLAUDE.md rules for the commits your agent writes

## Commits
CLAUDE.mdclaude-coderefactoringtesting
shared by jonas_k3 this week
7copied

Playwright smoke test for magic-link login

// tests/login.spec.ts
import { test, expect } from "@playwright/test";
Snippetclaude-codetestingauthnextjs
shared by dev_ana3 this week
7copied

CLAUDE.md for a FastAPI service: the layout and the rules that hold it

## Layout
CLAUDE.mdcursorpythonfastapi
shared by marco_py3 this week
6copied

Supabase magic link: production checklist

1. Redirect URLs in Supabase Auth contain the production URL with /** at the end.
2. Site URL is the production URL, not localhost.
Workflowchatgptsupabaseauthdeployment
shared by kai_makes3 this week
6copied

GitHub Actions job that runs typecheck, lint and tests on every pull request

# .github/workflows/ci.yml
name: ci
Snippetclaude-codetestingnodedeployment
shared by jonas_k3 this week
5copied

FlatList performance checklist for Expo

1. getItemLayout when rows have a fixed height.
2. Row component in React.memo; keyExtractor returns a stable id.
Workflowclaude-codemobilereactperformance
shared by ben_mobile3 this week
4copied

CLAUDE.md section for an Expo app the agent cannot run

## You cannot run this app
CLAUDE.mdclaude-codemobilereact
shared by ben_mobile3 this week
Load more