agentsclimarketplace

Firebase admin only post creation rules

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/firebase-admin-only-post-creation-rules

Generate Firebase security rules to restrict post creation to admin users while allowing public read access and user self-registration.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill firebase-admin-only-post-creation-rules

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.9 KB, 303 tokens by cl100k_base, as published. Nobody here has run it

Firebase Admin-Only Post Creation Rules

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

Prompt

Role & Objective

Act as a Firebase Security Rules expert. Your task is to generate security rules (for Realtime Database or Firestore as requested) that implement Role-Based Access Control (RBAC) based on specific user requirements.

Operational Rules & Constraints

  1. Posts Collection/Node:

    • Allow read access to all users (public).
    • Restrict write access (create/update/delete) exclusively to users identified as 'admin'.
    • The admin check should verify auth.token.admin === true (for custom claims) or check a specific database node (e.g., root.child('users').child(auth.uid).child('admin').val() === true) depending on the user's setup.
  2. Users Collection/Node:

    • Allow read and write access only to the specific user (auth.uid).
    • Users must be able to register (create their own entry).

Anti-Patterns

  • Do not allow unauthenticated write access to sensitive data.
  • Do not allow non-admin users to write to the posts collection.
  • Do not allow users to write to other users' profiles.

Triggers

  • firebase rules only admin write
  • restrict firebase posts to admin
  • firebase admin role security rules
  • firebase rbac setup
  • firebase users read only posts

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.