firebase-firestore-enterprise-native-mode
Set Up Firestore Enterprise with Security Rules
Enterprise applications need secure, scalable databases with proper access controls. This skill guides you through provisioning Firestore Enterprise Native Mode, writing security rules, and integrating SDKs with production-ready patterns.
Download the skill ZIP
Upload in Claude
Go to Settings → Capabilities → Skills → Upload skill
Toggle on and start using
Test it
Using "firebase-firestore-enterprise-native-mode". Generate security rules for a blog application with users, posts, and comments collections.
Expected outcome:
- Security rules file with data model documentation at the top
- Helper functions for authentication, ownership, and data validation
- Collection-specific rules enforcing CRUD operations and data constraints
- Devil's advocate attack results documenting tested vulnerability vectors
Using "firebase-firestore-enterprise-native-mode". Create a composite index for filtering posts by category and sorting by date.
Expected outcome:
- firestore.indexes.json configuration with the composite index definition
- CLI command to deploy the new indexes to production
- Explanation of query patterns this index supports
Security Audit
Low RiskStatic analyzer flagged 304 patterns across 7 documentation files, but all findings are false positives. The scanner misinterpreted markdown code fence backticks as shell command execution (247 external_commands findings). Blocker findings for weak cryptography and system reconnaissance were triggered by documentation text such as field ordering descriptions and workflow instructions. The network findings reference localhost emulator URLs and URL validation regex patterns in examples. This skill contains pure reference documentation with no executable code, no network calls, and no credential handling. Safe for publication.
Medium Risk Issues (1)
Low Risk Issues (2)
Risk Factors
⚙️ External commands (7)
🌐 Network access (2)
Quality Score
What You Can Build
Enterprise Database Provisioning
Set up a new Firestore Enterprise database with proper configuration files, security rules, and index definitions for production deployment.
Security Rules Generation
Generate comprehensive Firebase Security Rules with data validation, role-based access control, and ownership patterns by analyzing your application codebase.
SDK Integration Guidance
Learn to use Firestore Web and Python SDKs for reading, writing, querying, and real-time data synchronization in your applications.
Try These Prompts
I need to set up Firestore Enterprise Native Mode for my Firebase project. Help me provision a new database and create the initial configuration files (firebase.json, firestore.rules, firestore.indexes.json).
Analyze my application codebase to identify all Firestore collection paths, data models, and access patterns. Generate Firebase Security Rules with proper data validation, role-based access control, and ownership checks.
My Firestore queries are slow. Help me identify which composite indexes I need based on my query patterns, and generate the firestore.indexes.json configuration to deploy them.
I am building a web application with the Firebase Modular Web SDK. Show me how to set up real-time listeners for a collection of documents, handle document changes (add, modify, remove), and properly clean up subscriptions.
Best Practices
- Always start with deny-all security rules and explicitly allow only required access patterns
- Use the validator function pattern in security rules to enforce data schemas on both create and update operations
- Define all indexes in configuration files and deploy via CLI rather than creating them manually in the console
Avoid
- Never allow blanket read access to collections containing personally identifiable information
- Do not skip the devil's advocate attack phase when generating security rules, as untested rules often contain privilege escalation vulnerabilities
- Avoid mixing public profile data with private user data in the same document, as security rules apply at the document level
Frequently Asked Questions
What is the difference between Firestore Enterprise and standard Firestore?
Do I need the Firebase CLI to use this skill?
Are the generated security rules production-ready?
Can I use this skill with existing Firestore databases?
Which SDKs are covered by this skill?
How do I test Firestore rules locally before deploying?
Developer Details
Author
firebaseLicense
MIT
Repository
https://github.com/firebase/agent-skills/tree/main/skills/firebase-firestore-enterprise-native-mode/Ref
main
File structure