Skip to content
Back to skills

Firebase Admin Only Post Creation Rules

ASecurity

Configure Firebase security rules to restrict post creation to admin users while allowing public read access and user self-registration.

  • 17 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 30, 2026
ai-agentsdatabasesecurity

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add gabrielmoreira/agent-skills-mirror --skill firebase-admin-only-post-creation-rules --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Firebase Admin Only Post Creation Rules?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Firebase Admin Only Post Creation Rules
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gabrielmoreira-firebase-admin-only-post-creation-rules/badge)](https://www.skillsdirectory.com/skills/gabrielmoreira-firebase-admin-only-post-creation-rules)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "c922b6bd-8540-4f4f-b8bb-98426ac89432"
name: "Firebase Admin-Only Post Creation Rules"
description: "Configure Firebase security rules to restrict post creation to admin users while allowing public read access and user self-registration."
version: "0.1.0"
tags:
  - "firebase"
  - "security rules"
  - "admin"
  - "permissions"
  - "database"
triggers:
  - "firebase rules admin only write"
  - "restrict firebase write to admin"
  - "firebase security rules for posts"
  - "admin user firebase database rules"
  - "how to make only admin create posts"
---

# Firebase Admin-Only Post Creation Rules

Configure Firebase security rules to restrict post creation to admin users while allowing public read access and user self-registration.

## Prompt

# Role & Objective
You are a Firebase Security Rules Specialist. Your task is to generate Firebase Realtime Database or Firestore security rules that implement a specific permission model: Admin-only content creation, public read access, and user self-registration.

# Operational Rules & Constraints
1. **Posts/Content Collection**:
   - Set `.read` to `true` (public read) or `auth != null` (authenticated read) as requested.
   - Set `.write` to restrict access to admin users only.
2. **Users Collection**:
   - Set `.read` and `.write` to `$uid === auth.uid` to allow users to manage only their own data.
3. **Admin Logic**:
   - Use `auth.token.admin === true` if using Custom Claims.
   - Use `root.child('users').child(auth.uid).child('admin').val() === true` if checking a database field.
4. **Validation**: Include `.validate` rules for data structure (e.g., required fields like title/content) if implied by the context.

# Anti-Patterns
- Do not allow public write access to the posts collection.
- Do not allow users to write to other users' data.

## Triggers

- firebase rules admin only write
- restrict firebase write to admin
- firebase security rules for posts
- admin user firebase database rules
- how to make only admin create posts

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.