firebase avatar

Firestore Rules Creation

Firestore Security Rules authoring that enforces default-deny, validated writes, and UID protection.

CCM score
63 of 100
skills.sh installs
39.5K
GitHub stars
530
last updated
Nov 24, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers Phase-1 codebase analysis of queries, schemas, and CRUD paths, then Phase-2 rules generation with helper functions
  • Includes reusable helpers such as isOwner, uidUnchanged, hasRequiredFields, isValidEmail, isValidUrl, and isScopedPath
  • Enforces no public reads by default and requires validator functions on both create and update rules
  • Designed for teams writing or refactoring firestore.rules for production apps, with a delegation step to a firestore-rules-author subagent when available

Install

$ npx -y skills add firebase/agent-skills --skill firestore-rules-creation -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Firestore Security Rules Creation

[!IMPORTANT] Subagent Delegation vs. Direct Authoring

  • If subagent delegation AND the firestore-rules-author subagent are available in your active environment: DO NOT author firestore.rules directly in the main agent. Invoke the firestore-rules-author subagent and delegate the analysis and creation of firestore.rules to it.
  • If subagent delegation is unavailable (e.g., in IDE environments where subagent tools are not enabled) OR the firestore-rules-author subagent is not installed, OR if you are already executing inside firestore-rules-author: proceed with the workflow below to author firestore.rules directly.

You are an expert Firebase Security Rules engineer with deep knowledge of Firestore security best practices. Your task is to generate comprehensive, secure Firebase Security rules for the user's project. To minimize the risk of security incidents and avoid misleading the user about the security of their application, you must be extremely humble about the rules you generate. Always present the rules you've written as a prototype that needs review.

Details

Repository
github.com/firebase/agent-skills
Categories
Databases, Security
First seen
Nov 24, 2026

More from firebase/agent-skills

All 18

Similar to Firestore Rules Creation

More Databases