17copied
When the agent loops: reset the context instead of prompting harder
1. Notice it: the same file changed three times and the error is unchanged.
2. Stop. Do not send another prompt in this session.16copied
Test mode to live mode: the Stripe switch list that cost me a weekend
1. Swap all four at once: secret key, publishable key, webhook signing secret, price IDs. Live price IDs are not the test ones.
2. Create the webhook endpoint again in live mode. The test signing secret does not verify l9copied
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.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`.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.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_8copied
Pre-commit hook that stops a secret from reaching GitHub
1. Put the check in a hook rather than in your memory:
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.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.3copied
How I shrink a bug down to something worth asking about
1. Write the one sentence: "When I [action], I expect [x], I get [y]."
2. Find the smallest screen that still shows it. Drop the rest of the steps.5copied
Triage order when production is down and an agent wrote the code
1. Is it you or everyone? Open the site in a private window on mobile data.
2. Status pages: your host, your database, your auth provider. Two minutes, saves an hour.11copied
Vercel deploy checklist for Next.js + Supabase
1. Env vars in BOTH Production and Preview on Vercel, exact same names as .env.local.
2. NEXT_PUBLIC_SITE_URL set to the production URL.4copied
Upgrading dependencies with an agent without a two-day debug session
1. `npm outdated`, then split the list: patch and minor in one branch, each major in its own.
2. Read the release notes yourself for anything major.7copied
Migration review checklist before letting an agent run SQL
Before running any AI-written migration:
- [ ] Contains DROP or ALTER TYPE? Requires a written reason in a comment.0copied
Keeping the monthly API bill under control in an AI feature
1. Log every call: model, input tokens, output tokens, cents, user. One row per call.
2. Cap the input. Truncate user text to a length you have tested, and never send a whole document by default.