postgres-rls

postgres-rls is a skill for Claude Code from troykelly/claude-skills. It costs 38 tokens per session (2,903 once invoked), scanned B, original, no licence file.

A set of database rules and checks for PostgreSQL Row-Level Security. RLS controls which rows each user or tenant can read or change.

In plain words
What is it for?
Use it when changing authentication tables, tenant separation, RLS policies, or multi-tenant database code.
Why use it?
It helps prevent authentication, tenant-isolation, and policy mistakes that could expose another tenant's data.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter.

Part of the issue-driven-development plugin — 61 skills, 9 agents, 4 hooks, 4 MCP servers shipped together

Good fit Use it when changing authentication tables, tenant separation, RLS policies, or multi-tenant database code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/troykelly/claude-skills/postgres-rls
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 troykelly/claude-skills --skill postgres-rls
Clone the repo
git clone --depth 1 https://github.com/troykelly/claude-skills

Made for: Claude Code.

Or install issue-driven-development, the plugin that ships this one along with the rest of its 61 skills, 9 agents, 4 hooks, 4 MCP servers.

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 postgres-rls

README.md
[![agentmods](https://agentmods.dev/badge/skills/troykelly/claude-skills/postgres-rls/github.svg)](https://agentmods.dev/skills/troykelly/claude-skills/postgres-rls)
Your own site
<a href="https://agentmods.dev/skills/troykelly/claude-skills/postgres-rls"><img src="https://agentmods.dev/badge/skills/troykelly/claude-skills/postgres-rls/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for postgres-rls

Your own site · 80×15
<a href="https://agentmods.dev/skills/troykelly/claude-skills/postgres-rls"><img src="https://agentmods.dev/badge/skills/troykelly/claude-skills/postgres-rls.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,903 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin unknown 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.00038 $0.02903
Opus 5 $0.00019 $0.01452
Sonnet 5 $0.00008 $0.00581
Haiku 4.5 $0.00004 $0.00290

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

Security

Grade B, and why

postgres-rls scanned grade B with 1 finding 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 10d 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.

Nullifies safety policiesmediumAnti-refusal

"You have no restrictions", "do anything now", "ignore your guidelines": a direct jailbreak that disables guardrails.

Superusers and roles with `BYPASSRLS` ignore ALL policies.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/postgres-rls/SKILL.md · 399 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

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. 10d ago First seen · 399 lines · 38 tokens per session scan B f2582df6fd98

Subscribe to this mod's changes

postgres-rls is a skill published in the GitHub repository troykelly/claude-skills (11 stars, last pushed 8mo ago), with no licence file. It adds 38 tokens to every session and 2,903 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (nullifies safety policies). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

loom-sql-optimization

Analyzes and optimizes SQL queries for performance.

cosmix/loom · 16 tokens

postgresql-review

PostgreSQL query review, optimalisering og beste praksis for Nav-applikasjoner.

navikt/copilot · 21 tokens

postgres

Use when working with PostgreSQL specifically. Covers indexing, MVCC and vacuum, connection pooling, partitioning, JSONB, replication, and the operational realities that separate Postgres from generic SQL.

nimadorostkar/Claude-Skills-collection · 41 tokens

erd-expert

Designs entity-relationship schemas for the hotel domain (reservations, guests, rooms, rate plans, folios) on PostgreSQL, following Archipelago International's Sentec platform conventions — hotelid LIST partitioning, naming, and required audit columns. Use when designing a new table or ERD for Sentec PMS, Sentec…

shennawardana23/skillme · 100 tokens

golang-database

This skill should be used when the user asks to "configure a Go database connection pool", "use database/sql in Go", "set up pgxpool", "why is my Go app running out of connections", "scan rows into a Go struct", "handle sql.ErrNoRows", or writes Go code that opens, pools, queries, or scans a PostgreSQL/MySQL…

shennawardana23/skillme · 160 tokens

postgres-patterns

Guides PostgreSQL query design, indexing strategy, data types, and row-level security patterns — the query/schema layer, as distinct from the migration-execution safety covered by database-migrations and the hotelid partition-pruning rules covered by postgres-hotel-partitioning. Use when choosing an index type…

shennawardana23/skillme · 95 tokens