memstack-security-rls-checker

memstack-security-rls-checker is a skill for Claude Code, Codex from cwinvestments/memstack. It costs 80 tokens per session (2,818 once invoked), scanned A, original, MIT.

A security checker for Supabase, a platform that includes a PostgreSQL database. It audits Row Level Security, a database feature that controls which users can access which rows, across the project's tables.

In plain words
What is it for?
Use it to audit Row Level Security policies across Supabase tables and verify table-level access control.
Why use it?
It helps reveal table-access rules that are missing or incorrectly configured. It is intended for checking existing Supabase policies, not for writing policies from scratch or auditing other systems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Part of the memstack plugin — 86 skills, 2 commands, 5 hooks shipped together

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.

agentmods
npx agentmods add skills/cwinvestments/memstack/rls-checker
Any agent
npx skills add cwinvestments/memstack --skill rls-checker
Clone the repo
git clone --depth 1 https://github.com/cwinvestments/memstack

Made for: Claude Code, Codex.

Or install memstack, the plugin that ships this one along with the rest of its 86 skills, 2 commands, 5 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 memstack-security-rls-checker

README.md
[![agentmods](https://agentmods.dev/badge/skills/cwinvestments/memstack/rls-checker.svg)](https://agentmods.dev/skills/cwinvestments/memstack/rls-checker)
Your own site
<a href="https://agentmods.dev/skills/cwinvestments/memstack/rls-checker"><img src="https://agentmods.dev/badge/skills/cwinvestments/memstack/rls-checker.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,818 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00080 $0.02818
Opus 5 $0.00040 $0.01409
Sonnet 5 $0.00016 $0.00564
Haiku 4.5 $0.00008 $0.00282

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

Security

Grade A, and why

memstack-security-rls-checker 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 2d 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/security/rls-checker/SKILL.md · 271 lines

How it starts

The opening of the file, as written. The whole thing — 271 lines — stays where its author put it; the contents beside it link to each section on GitHub.

🔒 RLS Checker: Auditing Row Level Security...

Audit Supabase Row Level Security policies across all tables in a project.

Activation

When this skill activates, output:

🔒 RLS Checker: Auditing Row Level Security...

Then execute the protocol below.

Context Guard

Context Status
User asks to check/audit RLS ACTIVE: full audit
User mentions Supabase security ACTIVE: full audit
User asks about table permissions ACTIVE: full audit
User is writing RLS policies DORMANT, they know what they're doing
Non-Supabase project DORMANT: not applicable

Protocol

Step 1: Discover Tables

Find all Supabase tables referenced in the project. Search in priority order:

  1. Migration files: most authoritative source:

    find . -path "*/migrations/*.sql" -o -path "*/supabase/migrations/*.sql" | head -50
    

    Look for CREATE TABLE statements.

  2. Generated types: comprehensive if available:

    types/database.ts, types/supabase.ts, src/types/database.types.ts, database.types.ts
    

    Parse the Tables interface for all table names.

  3. Client usage: catches tables missed by above:

    grep -r "\.from(['\"]" --include="*.ts" --include="*.tsx" --include="*.js"
    

    Extract table names from .from('table_name') calls.

  4. Storage buckets: separate RLS surface:

    grep -r "storage\.from\|createBucket\|storage-api" --include="*.ts" --include="*.tsx" --include="*.sql"
    

Compile a deduplicated list of all tables and storage buckets.

Step 2: Extract RLS Policies

For each table, find its RLS configuration:

  1. Search migration SQL for RLS statements:
    • ALTER TABLE <name> ENABLE ROW LEVEL SECURITY: RLS is on
    • CREATE POLICY statements: extract policy name, operation (SELECT/INSERT/UPDATE/DELETE/ALL), and USING/WITH CHECK expressions
    • ALTER TABLE <name> FORCE ROW LEVEL SECURITY: RLS enforced even for table owners

Read the full file on GitHub · 271 lines

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. 2d ago Changed eefd3429253a
  2. 2d ago First seen · 271 lines · 80 tokens per session scan A 5e1f4455d6ed

Subscribe to this mod's changes

memstack-security-rls-checker is a skill published in the GitHub repository cwinvestments/memstack (419 stars, last pushed today), licensed MIT. It adds 80 tokens to every session and 2,818 once invoked, about $0.0004 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

plan-eng-review

Eng manager-mode plan review. Lock in the execution plan — architecture, data flow, diagrams, edge cases, test coverage, performance. Walks through issues interactively with opinionated recommendations. Use when asked to "review the architecture", "engineering review", or "lock in the plan". Proactively suggest when…

GCWing/BitFun · 116 tokens

autoplan

Auto-review pipeline — reads the full CEO, design, eng, and DX review skills from disk and runs them sequentially with auto-decisions using 6 decision principles. Surfaces taste decisions (close approaches, borderline scope, codex disagreements) at a final approval gate. One command, fully reviewed plan out. Use when…

GCWing/BitFun · 152 tokens

design-review

Designer's eye QA: finds visual inconsistency, spacing issues, hierarchy problems, AI slop patterns, and slow interactions — then fixes them. Iteratively fixes issues in source code, committing each fix atomically and re-verifying with before/after screenshots. For plan-mode design review (before implementation), use…

GCWing/BitFun · 125 tokens

pre-landing-review

Pre-landing PR review. Analyzes diff against the base branch for SQL safety, LLM trust boundary violations, conditional side effects, and other structural issues. Use when explicitly asked for the specialized pre-landing workflow. Product /review requests are handled by OpenBitFun's unified Review mechanism instead.…

GCWing/BitFun · 75 tokens

miniapp-dev

Develops, maintains, and generates OpenBitFun MiniApps (Zero-Dialect Runtime). Use when (1) working on miniapp framework code under src/crates/assembly/core/src/miniapp/ or src/web-ui/src/app/scenes/miniapps/; or (2) generating / creating / designing a NEW MiniApp for the user — including any request like "做一个小应用 / 生成…

GCWing/BitFun · 145 tokens

investigate

Systematic debugging with root cause investigation. Four phases: investigate, analyze, hypothesize, implement. Iron Law: no fixes without root cause. Use when asked to "debug this", "fix this bug", "why is this broken", "investigate this error", or "root cause analysis". Proactively invoke this skill (do NOT debug…

GCWing/BitFun · 112 tokens