Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

firestore-rules-creation

Skill by firebase

Designs, authors, refactors and hardens production-grade Cloud Firestore Security Rules in firestore.rules. It scans the codebase for collections, queries and data models to write prototype rules for developers using Firestore.

  • Score 87
  • 535 stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install firestore-rules-creation

Built from the published package, never by AI.

git clone --depth 1 https://github.com/firebase/agent-skills /tmp/agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agent-skills/skills/firestore-rules-creation ~/.claude/skills/firestore-rules-creation

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install firestore-rules-creation in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill guides an AI assistant through writing Cloud Firestore Security Rules in a firestore.rules file. It first scans the codebase for Firestore collection and document paths, every where(), orderBy() and limit() query, data models, field types and CRUD operations. It then generates rules that deny all access by default and allow only what the app needs.

The rules use validator functions on both create and update, plus helper functions for authentication, ownership and field checks. The skill separates personal data from public data and blocks users from assigning themselves roles. Its output is presented as a prototype that the user should review before sharing the app. It is aimed at developers who build apps on Cloud Firestore.

Written from the project's SKILL.md and checked against it.

What it can do

  • Codebase analysisScans code for Firestore paths, queries, data models and field constraints.
  • Default deny rulesStarts by denying all access, then allows only the operations the app needs.
  • Validator functionsChecks data types, allowed fields and constraints on both create and update.
  • Helper functionsProvides reusable checks for auth, ownership, UIDs, URLs, emails and lists.
  • User data separationLimits reads of personal data to the owner and suggests denormalization or split collections.
  • RBAC guidelinesPrevents users from creating or updating their own roles or escalating privileges.
  • Prototype disclosureTells the user to review and verify the generated rules before broad sharing.

What you need

  • A project that uses Cloud Firestore

Try asking

  • Write Firestore security rules for my app's collections and queries
  • Harden my firestore.rules so users cannot change their own roles
  • Refactor my firestore.rules to validate fields on create and update

Good to know

  • The rules are a prototype and must be reviewed before the app is shared.
  • Date string validation checks format only, not logical date values.
  • Rule authoring is delegated to the firestore-rules-author subagent when that subagent and delegation are available.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/firestore-rules-creation/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md27 KB

Alternatives to firestore-rules-creation

All alternatives →
hugging-face-datasetssickn33
94

Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.

AAA Skill 50k
db-repairgarrytan
94

Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.

AAA Skill 34k
alloydb-basicsgoogle
94

Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.

AAA Skill 26k
clickhouse-logs-queriessupabase
94

Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.

AAA Skill 116k
fix-slow-queriespaperclipai
94

Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.

AAA Skill 119k
prisma-8prisma
94

Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.

AAA Skill 48k

Compare with hugging-face-datasets, db-repair or alloydb-basics

firestore-rules-creation: common questions

Does the skill make Firestore data publicly readable?

No. The skill says the first rules file must never contain allow read: true. It requires authentication unless the user explicitly asks for unauthenticated data.

What happens if a firestore-rules-author subagent is installed?

The skill says to delegate rule authoring to that subagent when subagent delegation is available. If it is not, the skill authors the rules directly.

How does the skill handle public user profiles?

It suggests copying public fields such as name and photo onto the documents users create. It also suggests a separate users_public collection for non-sensitive data.

How do I install firestore-rules-creation?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is firestore-rules-creation free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is firestore-rules-creation safe to use?

It scores 87 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to firestore-rules-creation?

Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.

firestore-rules-creation Install

Add to stack

Loading.