← /vaultShipping4 min read

The gap between a vibecoder and a senior dev on security isn't ten years. It's eight prompts. Paste them into Claude Code one at a time, each one with the reason behind it.

1. Key in the frontend: server-side env var
Find every API key, secret or token in this project. For each one, tell me whether it can end up in the browser (anything prefixed NEXT_PUBLIC_ or VITE_, or imported by client code). Move secrets into server-side environment variables that only server code reads, make sure .env is in .gitignore, and list the keys I should rotate because they were already exposed. Don't rotate keys or touch production for me.

Why: Vite's docs say "VITE_* variables should not contain sensitive information such as API keys." Next.js inlines NEXT_PUBLIC_ values into the JavaScript sent to the browser.

2. Installs anything: check npm first
Before you install any package, check it exists on npm and is the one I mean: show me its npm page, weekly downloads, first publish date and repository, and flag anything new, tiny or named like a popular package. Then run the same check on every dependency already in package.json.

Why: Across five 2026 models, AI invented 4.6% to 6.1% of the package names it suggested (arXiv 2605.17062, 2026).

3. Runs any command: permission prompts on
Check my Claude Code settings (.claude/settings.json, .claude/settings.local.json and ~/.claude/settings.json). Tell me if anything turns permission prompts off, like bypass mode as the default or allow rules broad enough to run any command, and change them so commands ask first. Bypass mode only inside a container or VM.

Why: Claude Code's docs on bypass mode say: "Only use this mode in isolated environments like containers or VMs where Claude Code can't cause damage."

4. Tests as himself: RLS and a second account
List every table in my database and tell me which ones have row level security off, or policies that let a signed-in user read or change other users' rows. Write policies so each user only reaches their own data. Then give me a test: sign in as a second account and try to read and edit the first account's rows; every attempt should fail.

Why: Broken access control is the #1 risk in the OWASP Top 10:2025.

5. Homemade login: proven auth
Find any login, password, session or token code we wrote ourselves. Replace it with a proven provider (Supabase Auth or Clerk) without locking out existing users, and tell me what changes for them. Don't delete any user data.

Why: OWASP says: "Ideally, use a premade, well-trusted system to handle authentication, identity, and session management."

6. Waits for users to report bugs: Sentry and alerts
Add Sentry to this app, frontend and backend, so errors reach me with the stack trace, and set up an alert for a spike in failed logins. Keys go in server-side env vars. Tell me what I need to set up in the Sentry dashboard myself.

Why: The average data breach cost $4.99 million in 2026 (IBM Cost of a Data Breach Report 2026, newsroom.ibm.com, 2026-07-29).

7. Untested backups: restore tested
Set up backups I can actually restore: point-in-time recovery if my database plan has it (on Supabase it's a paid add-on), or else a scheduled daily dump stored outside the database. Then walk me through restoring one into a separate test project and checking the data is there. Never restore over production.

Why: In 2017 GitLab found that "out of five backup/replication techniques deployed none are working reliably" and lost six hours of data.

8. Ships the first draft: /security-review
/security-review
Then paste this
Fix the high-severity findings one at a time and explain each fix.

Run it before every commit. Why: Claude Code's /security-review checks for issues like SQL injection, XSS and authentication and authorization flaws.

Tool names (Supabase Auth, Clerk, Sentry) are examples, not sponsors. Checked 2026-11-08.

Keep reading

Two minutes of questions, and our first call starts with the work instead of an intro.

Tell me about your appBuilds start at $500