firestore-security-rules-generation

Generate Firestore security rules for user-scoped access, RBAC, and field validation.

2|1|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/Agentient/vibekit --skill firestore-security-rules-generation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: firestore-security-rules-generation
Source: https://github.com/Agentient/vibekit/tree/main/plugins/frontend-tools/skills/firestore-security-rules-generation
Command: npx skills add https://github.com/Agentient/vibekit --skill firestore-security-rules-generation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Firestore Security Rules patterns to enforce user-scoped access, RBAC, and field validation across Firestore data.

Core Features & Use Cases

  • User-Scoped Access: rules that restrict reads/writes to the authenticated user's data.
  • RBAC with Custom Claims: patterns to grant permissions based on user roles via custom claims.
  • Field Validation and Immutability: rules to validate required fields and protect immutable fields.

Quick Start

Provide a starter Firestore security rule that enforces owner-based access and basic RBAC.

Frequently Asked Questions about firestore-security-rules-generation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Firestore security rules for role-based access control?

Generate Firestore security rules for role-based access control by using custom claims to grant permissions based on user roles, enforcing secure data access across collections with rules version 2 and authentication checks.

What's the best way to restrict Firestore reads and writes to the authenticated user's data?

Restrict Firestore reads and writes to the authenticated user's data by generating user-scoped access rules that verify authentication checks and match the request UID against the document owner before allowing access.

How do I validate required fields and protect immutable fields in Firestore?

Validate required fields and protect immutable fields in Firestore by generating security rules patterns that check request data for specific fields and prevent updates to designated immutable fields during write operations.

Can I use custom claims for RBAC in Firestore security rules?

Yes, you can use custom claims for RBAC in Firestore security rules by generating patterns that evaluate request.auth.token claims to grant role-based permissions for secure data access across production scenarios.

Does this generate rules version 2 for Firestore security rules?

Yes, Firestore security rules generation includes rules version 2, applying it across collections to enforce secure data access, user-scoped access, RBAC, and field validation in typical production scenarios.

How do I enforce field validation across Firestore collections?

Enforce field validation across Firestore collections by generating security rules patterns that apply required field checks and immutability protections uniformly to enforce secure data access and role-based permissions.