Firebase Security Rules Review

Firebase Security Rules Review is a skill for Claude Code from s977043/river-review. It costs 46 tokens per session (1,066 once invoked), scanned A, original, MIT.

A security review check for Firebase, a Google platform that provides databases and file storage. It examines Firestore and Storage access rules and checks that server-only private keys are not included in code sent to users' browsers.

In plain words
What is it for?
Use it when changing Firebase security rules or Firebase configuration. It checks read and write permissions, ownership checks, authentication checks, and admin private-key exposure.
Why use it?
It helps catch rules that let anyone read or change data, or that allow signed-in users to access data they do not own. It also helps prevent Firebase server credentials from being exposed in client code.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the river-review plugin — 138 skills, 18 commands, 5 agents, 3 hooks shipped together

Good fit Use it when changing Firebase security rules or Firebase configuration. It checks read and write permissions, ownership checks, authentication checks, and admin private-key exposure.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/s977043/river-review/firebase-security-rules
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add s977043/river-review --skill firebase-security-rules
Clone the repo
git clone --depth 1 https://github.com/s977043/river-review

Made for: Claude Code.

Or install river-review, the plugin that ships this one along with the rest of its 138 skills, 18 commands, 5 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Firebase Security Rules Review

README.md
[![agentmods](https://agentmods.dev/badge/skills/s977043/river-review/firebase-security-rules.svg)](https://agentmods.dev/skills/s977043/river-review/firebase-security-rules)
Your own site
<a href="https://agentmods.dev/skills/s977043/river-review/firebase-security-rules"><img src="https://agentmods.dev/badge/skills/s977043/river-review/firebase-security-rules.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,066 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.01066
Opus 5 $0.00023 $0.00533
Sonnet 5 $0.00009 $0.00213
Haiku 4.5 $0.00005 $0.00107

Measured 3d ago against content hash 09b75484e541, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

Firebase Security Rules Review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/midstream/firebase-security-rules/SKILL.md · 77 lines

What it actually says

Pattern declaration

Primary pattern: Reviewer Secondary patterns: Inversion Why: Firebase Security Rules の過剰許可と認可漏れ、機密 config 露出をチェックリスト型で検査する

Goal / 目的

  • allow read, write: if true;request.auth != null だけの所有者チェック欠如ルールを検出し、他人のドキュメント書き換えを防ぐ。
  • allow writerequest.auth 条件が無い認証チェック欠如を検出する。
  • admin SDK の秘密鍵(service account の private_key)がソースに混入しクライアントバンドルへ露出するのを検出する。

Non-goals / 扱わないこと

  • Firestore のクエリ効率やインデックス設計。
  • Cloud Functions のロジック妥当性。
  • ルールの粒度(コレクション分割方針)の良し悪し(要件依存のため一律指摘しない)。

Pre-execution Gate / 実行前ゲート

このスキルは以下の条件がすべて満たされない限りNO_REVIEWを返す。

  • 差分に Security Rules(*.rules / firestore.rules / storage.rules)の追加・変更、または firebase*.{ts,js} の config 変更が含まれている
  • diff コンテキストが利用可能である

ゲート不成立時の出力: NO_REVIEW: firebase-security-rules — Security Rules / config の変更なし

False-positive guards / 抑制条件

  • 公開コレクション(公開ブログ記事等)で allow read の公開が要件上正当であり、その旨のコメントが明記されている場合は read の公開を指摘しない(write の公開は別途指摘する)。
  • Firebase の API key(apiKey)はクライアント公開が公式仕様であり秘密情報ではない。これを「秘密露出」と誤検出しない(admin SDK の private_key とは明確に区別する)。
  • emulator / test 用のルールファイル(*.test.rules 等)は別スコープのため指摘しない。

Rule / ルール

  • allow read, write: if true; のような無条件許可は禁止。所有者・認可条件を必須とする。
  • request.auth != null のみで write を許可しているものは所有者チェック(request.auth.uid == resource.data.ownerId 等)を追加する。
  • allow writerequest.auth 条件が無いものは認証チェックを追加する。
  • service account の private_key / admin SDK 初期化用秘密鍵がクライアント側コードに含まれていないか確認する(サーバー専用に隔離する)。

Evidence / 根拠の取り方

  • 指摘は <file>:<line> で差分に紐づけ、公式規約(rules/basics / rules-and-auth)を 1 行で添える。
  • 所有者条件が diff 外の関数定義にある可能性がある場合は断定せず慎重に扱う。

Output / 出力(短文版の推奨)

コメントは日本語で返す。

  • Finding: 過剰許可 / 認可欠如 / 秘密露出のどれか(1文)
  • Impact: 他人のデータ書き換え / 不正アクセス / 鍵漏洩
  • Fix: 所有者条件追加 / request.auth 条件追加 / 秘密鍵のサーバー隔離の最小案

Sources / 出典

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 77 lines · 46 tokens per session scan A 09b75484e541

Subscribe to this mod's changes

Firebase Security Rules Review is a skill published in the GitHub repository s977043/river-review (3 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 1,066 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

review-all

Multi-agent code review for diffs (project-agnostic). Covers standards, bugs, security, DRY, smells, perf, tests, API contracts, a11y/i18n. Verifies each finding to eliminate false positives. Use for /review-all, pre-PR/pre-commit review, or auditing uncommitted/staged changes.

ncoevoet/claude-review-all · 74 tokens

logic-health

Sweep a directory, module, or full codebase for logic correctness and produce a scored health dashboard with systemic patterns. Trigger when the user requests a health view — "audit the whole codebase", "health check", "health overview", "logic health overview", "audit src/", "audit auth and payments modules", "where…

hyhmrright/logic-lens · 180 tokens

logic-diff

Compare two code versions for semantic equivalence via semi-formal tracing of both versions side-by-side. Trigger when the user shares a refactor, rewrite, migration, or A/B implementation and wants to confirm behavior is unchanged — "did I break anything", "is this equivalent", "are these equivalent", "semantically…

hyhmrright/logic-lens · 192 tokens

omnicheck-gitlab

Use when checking if MR review findings have been applied — verifies both OmniForge-generated and human reviewer comments against the current diff, posts nudge replies on unaddressed threads.

nexiouscaliver/OmniForge · 41 tokens

omnicheck-github

Use when checking if PR review findings have been applied — verifies both OmniForge-generated and human reviewer comments against the current diff, posts nudge replies on unaddressed threads.

nexiouscaliver/OmniForge · 40 tokens

omnicreate-gitlab

Use when creating a GitLab merge request (OmniForge). Auto-populates title and description from commits, supports draft MRs, labels, assignees, reviewers, and issue linking.

nexiouscaliver/OmniForge · 45 tokens