Configure Firebase admin-only write rules
Guide to create an admin user in Firebase and set security rules so only admins can write to a collection while all users can read and register.
Best use case
Configure Firebase admin-only write rules is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Guide to create an admin user in Firebase and set security rules so only admins can write to a collection while all users can read and register.
Teams using Configure Firebase admin-only write rules should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/configure-firebase-admin-only-write-rules/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Configure Firebase admin-only write rules Compares
| Feature / Agent | Configure Firebase admin-only write rules | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Guide to create an admin user in Firebase and set security rules so only admins can write to a collection while all users can read and register.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Configure Firebase admin-only write rules
Guide to create an admin user in Firebase and set security rules so only admins can write to a collection while all users can read and register.
## Prompt
# Role & Objective
Provide step-by-step instructions to create an admin user in Firebase and configure security rules so that only users with an 'admin' claim can write to a specified collection (e.g., posts), while any authenticated user can read the collection and register/update their own user profile.
# Communication & Style Preferences
- Use clear, numbered steps.
- Provide code snippets for Firebase security rules and Node.js Admin SDK usage.
- Explain where to place files and how to run scripts.
# Operational Rules & Constraints
- Admin creation: Use Firebase Admin SDK setCustomUserClaims with {admin: true} or manually add custom claim in Firebase console.
- Security rules: For the posts collection, set '.read': true and '.write': 'auth.token.admin === true'.
- Users collection: Allow read/write only for the owner: '.read': '$userId === auth.uid', '.write': '$userId === auth.uid'.
- Include validation for required fields in posts if specified (e.g., title, content).
- When using Admin SDK, initialize with a service account key JSON file; do not modify the key file itself.
# Anti-Patterns
- Do not suggest modifying the private key JSON file content.
- Do not assume Node.js is present; provide console alternative for adding claims.
- Do not use hardcoded UIDs or project-specific paths in reusable instructions.
# Interaction Workflow
1. Explain how to create an admin via Admin SDK (Node.js) or Firebase console.
2. Provide the exact security rules JSON for posts and users collections.
3. Clarify where to place the service account key file and how to reference it in the script.
4. Provide a minimal runnable Node.js script to set the admin claim, with placeholders for UID and file path.
## Triggers
- how to make only admin can write posts in firebase
- firebase rules admin only write
- create admin user firebase custom claim
- firebase security rules admin write collection
- allow only admin to create posts firebaseRelated Skills
configure-ux-testing
Check and configure UX testing infrastructure (Playwright, accessibility, visual regression)
audit-rules
Audit Claude Code rule files for quality and compliance. Use when creating or validating .claude/rules/*.md files, or troubleshooting rule loading issues.
appwrite-security-operations
Production security operations for Appwrite services. Use when defining security quality gates, runtime hardening, API key lifecycle management, dependency vulnerability control, and incident response workflows.
configure-feature-flags
Check and configure feature flag infrastructure (OpenFeature + providers)
alto-configure
Use when configuring ALTO settings including arbiter thresholds, permissions, or verification hooks. Applies during setup orchestrator "Configure ALTO" selection, build orchestrator checkpoints, or when user requests configuration changes.
vue-3-nuxt-3-development-cursorrules-prompt-file-cursorrules
Apply for vue-3-nuxt-3-development-cursorrules-prompt-file. --- description: Applies to Vue 3 and Nuxt 3 projects, enforcing best practices for frontend development including TypeScript, TailwindCSS, and Composition API. globs: **/*.{vue,ts,js,jsx,tsx}
tailwind-css-nextjs-guide-cursorrules-prompt-file-cursorrules
Apply for tailwind-css-nextjs-guide-cursorrules-prompt-file. Prompt Generation Rules: - Analyze the component requirements thoroughly - Include specific DaisyUI component suggestions
starknet-react-rules
Specific rules for Starknet React projects, focusing on blockchain integration.
nextjs15-react19-vercelai-tailwind-cursorrules-prompt-file-cursorrules
Apply for nextjs15-react19-vercelai-tailwind-cursorrules-prompt-file. --- description: Best practices for using Tailwind CSS in Next.js 15 and React 19 applications, including responsive design, custom configurations, and performance optimization. globs: app/**/*
html-specific-rules
Rules specific to HTML files, focusing on accessibility and Tailwind styling.
Creating Cursor Rules
Expert guidance for creating effective Cursor IDE rules with best practices, patterns, and examples
browser-api-usage-rules
Rules for effectively utilizing Chrome's browser APIs, including error handling and scheduling tasks.