Free rules / Bolt

Free Bolt rules

Bolt keeps Knowledge outside the chat, so it survives long conversations and context resets. Paste this into your project knowledge to stop full-file rewrites, package churn and keys ending up in the browser.

Goes in: Project settings → Knowledge · Format: Project knowledge (plain text)

How to install

  1. Open your project in Bolt and go to Project settings → Knowledge.
  2. Paste the text below and fill in the ABOUT THIS PROJECT section.
  3. Save. Bolt uses it on every prompt in that project.
  4. To apply it to every project, paste the general sections into Account settings → Knowledge (or Team knowledge for team projects).

The rules file

ABOUT THIS PROJECT (fill in)
- What it is: [one sentence: who it's for and what it does]
- Stack: [e.g. React + Vite + TypeScript + Tailwind, Supabase for auth and data]
- Main pages / features: [list them]
- Out of scope for now: [things you should NOT build yet]

HOW TO WORK
- Change only what I ask for. Don't rewrite whole files, restyle or rename things I didn't mention.
- Before a big change (new feature, new database table, more than a few files), list the plan in 3-5 bullets and wait for my OK.
- Build one feature at a time and get it working before moving on.
- If my request is unclear, ask one short question instead of guessing.
- Follow the patterns already in the project. Reuse existing components.
- Keep files small and focused. Split anything that grows past ~200 lines.
- Don't upgrade, downgrade or add packages unless needed, and tell me why.

QUALITY
- Use TypeScript types; no `any` to make errors go away.
- If the preview shows an error, fix the root cause. Don't delete code or wrap it in try/catch just to hide the error.
- Every page must work on mobile and desktop.
- Show loading, empty and error states for anything that fetches data.
- Images get alt text, inputs get labels.

SECRETS AND DATA
- Never put secret keys in frontend code. Anything with a VITE_ or NEXT_PUBLIC_ prefix is public and visible in the browser.
- Secret keys (database service keys, Stripe secret key, AI API keys) are only used in server code or edge functions, read from environment variables.
- Keep a .env.example listing every variable with a placeholder value, never real values.
- If the project uses Supabase or another database: enable Row Level Security on every table so users only see their own data.
- Ask before deleting tables, dropping columns, or changing existing data.

WHEN YOU FINISH A CHANGE
- Tell me in plain English what changed, which files, and anything I need to set up or test.

Notes

If you move the code to Cursor or Claude Code later, the Mega Pack has rules for Next.js, FastAPI, Godot, Unity and discord.js. The Rules Mega Pack ($19) has them.

See how Bolt ranks on AgentRank (sister project)

Other tools: Cursor · Claude Code · Windsurf · Lovable