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.
npx skills add s977043/river-review --skill firebase-security-rulesgit clone --depth 1 https://github.com/s977043/river-reviewWrote 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.
[](https://agentmods.dev/skills/s977043/river-review/firebase-security-rules)<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>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.
| Model | Per session | Once 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 |
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.
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 writeにrequest.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 writeにrequest.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 / 出典
- Firebase — Security Rules basics: https://firebase.google.com/docs/rules/basics
- Firebase — Rules and authentication: https://firebase.google.com/docs/rules/rules-and-auth
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.
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.
- 3d ago First seen · 77 lines · 46 tokens per session scan A 09b75484e541
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.
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.
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…
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…
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.
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.
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.