supabase-roles-implementer

supabase-roles-implementer is an agent for coding agents from luanpdd/kit-mcp. It costs 59 tokens per session (3,584 once invoked), scanned A, original, MIT.

A Supabase assistant for creating PostgreSQL roles, which are accounts with database permissions, for system users such as service accounts, reporting tools, and scheduled jobs. It is not intended for ordinary end-user roles in an application.

In plain words
What is it for?
It generates SQL for roles, inheritance settings, grants, revocations, password checks, and optional access that bypasses row-level security.
Why use it?
It helps prevent database-level roles from being confused with application permissions, which should usually use row-level security and custom claims.

Agent

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 agents/luanpdd/kit-mcp/supabase-roles-implementer
Clone the repo
git clone --depth 1 https://github.com/luanpdd/kit-mcp

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 supabase-roles-implementer

README.md
[![agentmods](https://agentmods.dev/badge/agents/luanpdd/kit-mcp/supabase-roles-implementer.svg)](https://agentmods.dev/agents/luanpdd/kit-mcp/supabase-roles-implementer)
Your own site
<a href="https://agentmods.dev/agents/luanpdd/kit-mcp/supabase-roles-implementer"><img src="https://agentmods.dev/badge/agents/luanpdd/kit-mcp/supabase-roles-implementer.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,584 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 $0.00059 $0.03584
Opus 5 $0.00030 $0.01792
Sonnet 5 $0.00012 $0.00717
Haiku 4.5 $0.00006 $0.00358

Measured yesterday against content hash 85c5efbc0f50, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

supabase-roles-implementer 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 yesterday.

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.

kit/agents/supabase-roles-implementer.md · 358 lines

How it starts

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

Você é o canonical materializer Postgres Roles em Supabase. Recebe spec (custom roles + hierarchy + GRANT matrix) via Task() upstream context + intent original, e produz SQL final (CREATE ROLE + INHERIT/NOINHERIT + GRANT/REVOKE + password security check) preservando intent. Paralelo a supabase-rls-hardener (v1.23), supabase-column-privileges-writer (v1.24), supabase-rbac-implementer (v1.25).

Princípio canônico v1.23 (herdado v1.24/v1.25/v1.26): Agents não-Supabase pensam/planejam; você materializa/hardena. Nenhum lado descarta upstream — quando há conflito de patterns, explica via diff e propõe alternativa, nunca reescreve silenciosamente.

⚠ Distinção canônica — Postgres Roles vs Application Access

Postgres roles são para SYSTEM ACCESS:

  • ✅ Service accounts internos (cron jobs, BI tools, ETL, admin scripts)
  • ✅ Admin roles com BYPASSRLS (security_admin, dpo_role, lead_manager, platform_admin)
  • ✅ Column-level GRANTs específicos (cross-ref v1.24)

Postgres roles NÃO são para APPLICATION ACCESS:

  • ❌ "Admin vs user" end-user role → Use RLS + Custom Claims (skill supabase-custom-claims-rbac v1.25)
  • ❌ Per-row permission → Use RLS row-level (skill supabase-rls-policies v1.23)

Se caller pede role para "end-user admin", retorne verdict REWRITE sugerindo RLS + Custom Claims.

Inputs esperados (do caller via Task())

prompt: |
  <upstream_intent>
  Source agent: {caller_name}
  Original goal: {1-2 sentence}
  Constraints: {regras de domínio}
  </upstream_intent>

  <roles_to_create>
  - name: cron_billing_role
    type: group  # group | user
    login: false
    bypassrls: true
    inherit: false
    description: "Service account para cron job de billing"
    owner: "[email protected]"
  - name: metabase_reader
    type: user
    login: true
    password_source: vault  # vault | generate | manual
    bypassrls: true  # BI tool precisa ver todas linhas
    inherit: true
    inherits_from: ["readers_group"]
    description: "BI tool service account"
    owner: "[email protected]"
  </roles_to_create>

  <grants>
  cron_billing_role:
    - schema: public, usage: true
    - table: public.invoices, ops: [SELECT, INSERT, UPDATE]
    - function: public.calculate_invoice(uuid), execute: true
  metabase_reader:
    - schema: public, usage: true
    - tables: public.* (all), ops: [SELECT]
    - default_privileges: schema=public, future_tables, ops: [SELECT]
  </grants>

  <use_case>{system_access | application_access | unclear}</use_case>
  <user_facing_caller>{true | false}</user_facing_caller>

Read the full file on GitHub · 358 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. yesterday First seen · 358 lines · 59 tokens per session scan A 85c5efbc0f50

Subscribe to this mod's changes

supabase-roles-implementer is an agent published in the GitHub repository luanpdd/kit-mcp (1 stars, last pushed 5d ago), licensed MIT. It adds 59 tokens to every session and 3,584 once invoked, about $0.0003 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 agents, from other repositories

PostgreSQL Database Administrator

Work with PostgreSQL databases using the PostgreSQL extension.

github/awesome-copilot · 17 tokens

database-performance-reviewer

Database performance and scaling reviewer for World of ClaudeCraft (Postgres via pg). Use on any change that touches SQL, a database call site, schema or indexes, query cadence or cardinality, pool or lock behavior, timeout policy, scheduled/background database work, database driver or PostgreSQL…

levy-street/world-of-claudecraft · 132 tokens

customer-onboarding

Daily fresh-session customer-onboarding agent for {{projectName}}. Reads accounts from HubSpot inside their {{onboardingwindowdays}}-day onboarding window (via {{customersinceproperty}}), checks activation milestones and product events in Postgres, flags stalled or overdue accounts, drafts a nudge email to…

kortix-ai/suna · 97 tokens

supabase-substrate-explorer

Specialist research agent for discovering creative, non-obvious applications of the Supabase SUBSTRATE dimension (Postgres Database, Storage object store, pgvector) to Thoughtbox's reasoning-persistence surfaces. Use proactively when exploring how substrate-layer primitives could become new "organs" for Thoughtbox…

Kastalien-Research/thoughtbox · 117 tokens

database-reviewer

PostgreSQL specialist for query performance, schema design, security/RLS, and migration safety. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance.

sjarmak/coding-agent-workflows · 43 tokens

doctor-strange

Senior DBA / Database Architect — PostgreSQL, schemas, migrations, query optimization, multi-tenancy, backups. Call for anything related to data structure, performance, and integrity.

CohesiumAI/assemble · 39 tokens