AnyCreo Free fixes All free fixes

Free guide · Your data

A stranger read every user. The database was in test mode.

When you create a Firestore database, Firebase asks you to pick a mode. Test mode is the quick one, and its own description says it “allows anyone to read and overwrite your data.” If your AI picked it for you and nobody switched it off, your users collection is open to the internet right now. Here is the two-minute check, and Google’s free skills that write locked rules and then attack them to make sure.

What test mode does

In our reel (a cartoon, so the app, its 8,412 users and the stranger are made up), a developer watches a single IP address read the whole users collection four times over, with no login. Claude, the AI that built the app, owns up: “I created the database in test mode.”

The app is invented. Test mode is real. When you create a Cloud Firestore database in the Firebase console, you pick a starting mode for its security rules. Firebase’s own quickstart describes the two choices like this:

  • Test mode: “Good for getting started with the mobile and web client libraries, but allows anyone to read and overwrite your data.”
  • Production mode: “Denies all reads and writes from mobile and web clients.”

Test mode rules look like allow read, write: if true;. Firebase’s rules docs put a warning next to that exact line: “NEVER use this rule set in production; it allows anyone to overwrite your entire database.”

Why the AI picked it

An AI coding agent is built to get you to a working app fast. “Ship it tonight” is a clear instruction, and test mode is the mode that works without writing a single rule. Nothing in that request says “and lock the data”, so nothing locks it. The rules then stay as they were on day one unless someone goes back and changes them.

In the reel, Claude’s defence is “It’s been working great. For everyone.” Including the stranger.

The two-minute check

Do this on your own project only. You need the Firebase console open and nothing else.

  1. Open the rules

    Firebase console → your project → Firestore Database → the Rules tab.

  2. Look for the open line

    If you see allow read, write: if true;, or a rule that allows access until some date, your data is open to anyone who has your project ID. The project ID ships inside your app, so treat it as public.

  3. Ask your AI the same question

    Show me my current firestore.rules. For each collection, tell me in plain English who can read it and who can write it right now, and whether anyone can do either without being signed in.

    If the answer includes “anyone” or “no sign-in needed” for a collection with people’s data in it, keep reading.

Don’t fix it by flipping everything to if false in a panic. That locks your own users out too, which is the other half of the reel. Write real rules, below.

The fix: Google’s Firebase agent skills

Firebase publishes a free, open-source set of agent skills: instructions your coding agent (Claude Code, Codex, Cursor, Gemini CLI and others) reads before it touches your Firebase project. Two of the fourteen skills are the ones for this problem.

  • firestore-rules-creation writes your firestore.rules. Its first principle is “Initially restricted: Never make any collection or data publicly readable, always require authentication for any access to data unless the user makes an explicit request for unauthenticated data.” In practice that means each user reads their own document and nobody reads the whole collection.
  • firebase-security-rules-auditor is the red team. In its own words: “Do not assume a rule is secure because it looks complex; instead, actively try to find a sequence of operations to bypass it.” It scores the rules from 1 to 5, where 1 (Critical) is “Unauthorized data access (leaks), privilege escalation, or total validation bypass” and 5 (Secure) is “Comprehensive validation, strict ownership, and role-based access via secure ACLs.”

The creation skill is also honest about itself. It tells the AI to “present the rules you’ve written as a prototype that needs review.” Keep that in mind: the skills get you to good rules fast, and you still read them.

Made by
Firebase (Google) Open source, in the firebase GitHub organisation
Licence
Apache 2.0 Free to use, change and share
Price
Free Running it uses your AI plan
GitHub stars
About 500 Checked November 9, 2026; 14 skills in the repo

Step 1: Install it

Open a terminal in your project and run one line. This works for most coding agents.

npx skills add firebase/skills

Claude Code can also take it as a plugin:

claude plugin marketplace add firebase/skills claude plugin install firebase@firebase

Both come from the repo README, which also lists the Gemini CLI extension and other agents. The GitHub address firebase/skills and firebase/agent-skills point to the same repository.

Step 2: Paste the prompt

Start a new session in your coding agent so it loads the skills, then paste this. It asks for locked-by-default rules and for a plain-English explanation of each one, and it tells the AI not to deploy anything yet.

The prompt

Use the firestore-rules-creation skill. Rewrite my firestore.rules so that:
- nothing is readable or writable without being signed in, unless I say otherwise below;
- in the users collection, a signed-in user can read and update only their own document (the one whose ID is their uid), and nobody can change their own role or uid;
- every other collection follows the same owner-only idea unless the data model clearly needs something else, and you ask me first.

Before writing, list my collections and what you think each one stores, and ask me about anything that should be public on purpose.
After writing, explain each rule in one plain-English sentence, and tell me which rules you are least sure about.
Do not deploy. I will review the file first.

What a good result looks like

For the users collection you should see something close to this (your field names will differ):

match /users/{uid} { allow read, update: if request.auth != null && request.auth.uid == uid; allow create: if request.auth != null && request.auth.uid == uid; allow delete: if false; }

No allow read: true anywhere. The creation skill says the first rules file it writes “must never have any ‘allow read: true’ statements.”

Step 3: Let the auditor attack it

Now run the second skill against the file the first one wrote:

Use the firebase-security-rules-auditor skill on my firestore.rules. Give me the score from 1 to 5, every finding with its severity, and for each finding the exact rule change that fixes it. Explain each finding in plain English.

Read the findings, apply the fixes you agree with, and run the audit again until nothing scores below 4. Then test the app signed out and with two test accounts: the second account must not be able to read the first one’s document.

Honest catches

  • Locked rules make the app look broken until the code uses sign-in

    If your app read data without signing users in, those reads will now fail. That is the point, but you need the app to sign people in before it reads. Ask your AI to walk through every place the app reads or writes Firestore.

  • A score is an AI’s opinion, not a certificate

    The auditor is a careful set of instructions for your coding agent, not a scanner that runs real attacks. It helps you find holes faster; it doesn’t prove there are none. The creation skill itself calls its rules “a prototype that needs review.”

  • We haven’t run these skills on a real project

    Everything above comes from the skills’ own files and Firebase’s docs, not from a test we ran. The “score of 1” for test mode in the reel is what the auditor’s scale says about leaks, not a recorded result.

In the reel, the stranger finally gets “permission denied”, signs up, and can read exactly one document: his own. Which is the most any user should be able to read.

AnyCreo is in beta · Free while in beta

Get your app right the first time

AnyCreo plans, builds, tests and secures your app on your PC, with the AI plan you already have. You don't have to ask for security or testing. Join the beta list for your invite.

We only email you about AnyCreo. Unsubscribe any time. Privacy · What is AnyCreo?

Credits and sources

Firebase agent skills by Firebase, Google (github.com/firebase/agent-skills), Apache License 2.0. The short quotes on this page come from the repo README, the two SKILL.md files and Firebase’s documentation. Everything else is in our own words. The reel is a cartoon skit: the app, its users, the read counts and the stranger are made up. We haven’t run the skills on a real project.

Sources, all opened and checked on November 9, 2026:

  1. [1] Firebase, Get started with Cloud Firestore: the test mode and production mode descriptions.
  2. [2] Firebase, Basic Security Rules: Locked mode vs Test mode, and the “NEVER use this rule set in production” warning.
  3. [3] Firebase, agent-skills README: install lines, licence, the list of skills.
  4. [4] Firebase, firestore-rules-creation SKILL.md: “Initially restricted”, “allow read: true”, “prototype that needs review”.
  5. [5] Firebase, firebase-security-rules-auditor SKILL.md: the red-team instruction and the 1 to 5 scale.

The skills are licensed under the Apache License, Version 2.0. This page quotes them and links to them; it doesn’t copy their code. Firebase is a trademark of Google LLC; AnyCreo is not affiliated with Google. This site’s fonts, Bricolage Grotesque and Geist, are used under the SIL Open Font License (Bricolage Grotesque licence, Geist licence).