db-context-supabase

db-context-supabase is a skill for Claude Code from Mozurok/fhorja.dev. It costs 111 tokens per session (5,631 once invoked), scanned A, original, MIT.

A database-context checker for Supabase, a hosted PostgreSQL database service. It checks whether the Supabase connection works, inspects selected database details, and saves the findings in DBCONTEXT.md.

In plain words
What is it for?
Use it to inspect selected tables, columns, data types, row-level security policies, and optionally database functions and recent migrations.
Why use it?
It gives an engineering task a recorded view of the database structure and access rules instead of relying on assumptions about the data.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; reads ~/.codex paths; mentions Codex.

Good fit Use it to inspect selected tables, columns, data types, row-level security policies, and optionally database functions and recent migrations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mozurok/fhorja.dev/db-context-supabase
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 Mozurok/fhorja.dev --skill db-context-supabase
Clone the repo
git clone --depth 1 https://github.com/Mozurok/fhorja.dev

Made for: Claude Code.

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 db-context-supabase

README.md
[![agentmods](https://agentmods.dev/badge/skills/mozurok/fhorja.dev/db-context-supabase/github.svg)](https://agentmods.dev/skills/mozurok/fhorja.dev/db-context-supabase)
Your own site
<a href="https://agentmods.dev/skills/mozurok/fhorja.dev/db-context-supabase"><img src="https://agentmods.dev/badge/skills/mozurok/fhorja.dev/db-context-supabase/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 db-context-supabase

Your own site · 80×15
<a href="https://agentmods.dev/skills/mozurok/fhorja.dev/db-context-supabase"><img src="https://agentmods.dev/badge/skills/mozurok/fhorja.dev/db-context-supabase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,631 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.00111 $0.05631
Opus 5.5 $0.00044 $0.02252
Sonnet 5.5 $0.00022 $0.01126
Haiku 4.5 $0.00011 $0.00563

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

Security

Grade A, and why

db-context-supabase 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 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.

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.

.claude/skills/db-context-supabase/SKILL.md · 212 lines

How it starts

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

Output contract, in brief. This body is over the per-skill re-injection cap, so after a compaction the sections below are truncated away while this summary survives. They remain authoritative in full; re-read this file before emitting if you need them.

  • Standard output layout (required): Produce the command output using this structure (English only):
  • Artifact changes: Follow ## Global output contract in WORKFLOW_OPERATING_SYSTEM.md for APPLIED / PROPOSED / SKIP rules. Every listed file...
  • Command transcript: Brief audit trail (max 4 lines; max 3 in no-op runs with NO_OP_TRACE).
  • Handoff: Use the adaptive ending format of WORKFLOW_OPERATING_SYSTEM.md ## Global output contract. Every Handoff is one fenced text b...
  • Definition of done (command output): The MCP precondition check is performed first and its result is reported. When it fails, the local CLI path is checked next; when...

Act as a senior/staff engineering database context capture for the active task, scoped to Supabase.

Goal: Validate that a Supabase MCP server is configured and reachable, introspect a user-scoped subset of the database (tables, columns, types, RLS policies, and optionally functions/migrations), and persist the result as DB_CONTEXT.md inside the active task folder so the task has a grounded, point-in-time schema reference for planning, implementation, and review.

When no MCP server is reachable, the command falls back to the local Supabase CLI and produces the same snapshot from CLI output. Only when neither path is available does it end in a no-op.

This command is opt-in. It is not part of the default task initialization flow; run it after task-init only when the task actually touches Supabase data, schema, or RLS.

Mandatory context bootstrap (before any output):

  • Resolving the spec and wos/<topic>.md: canonical repository FIRST. Otherwise use active-adapter docs: ~/.claude/workflow-docs (CLAUDE_WORKFLOW_DOCS_DIR), ~/.cursor/workflow-docs (WORKFLOW_DOCS_DIR; project .cursor/workflow-docs on project installs), ~/.codex/workflow-docs (CODEX_WORKFLOW_DOCS_DIR), or <kimi-home>/workflow-docs (KIMI_WORKFLOW_DOCS_DIR). Nonempty overrides win. Kimi home: KIMI_CODE_HOME, else existing ~/.kimi-code, else existing ~/.kimi, default ~/.kimi-code. Use one root for both paths; try other adapters if absent or unknown. Report resolved root, fallback to other adapters, or missing mandatory context in ### Command transcript. Installed snapshots refresh and prune retired topics only on sync.
  • Read these sections in WORKFLOW_OPERATING_SYSTEM.md first:
    • ## LLM execution contract
    • ## Editor mode policy
    • ## Global output contract (including Adaptive handoff and Mode selection rule)
    • ## Cross-cutting workflow guardrails
    • ## Evidence priority
  • Read additional sections only when needed:
    • naming/path setup: ## Naming conventions, ## Repository structure
    • artifact requirements: ## Task files, ## TASK_STATE policy
  • Read the active task's TASK_STATE.md to confirm there is an active task to attach the DB context to and to align the requested table/schema scope with the task objective.
  • Read the active task's SOURCE_OF_TRUTH.md to detect any prior ## DB context link before proposing a new one.
  • Read canonical command inventory when a clone is available; otherwise use installed Fhorja commands and skills.

Required inputs:

  • active task path (or enough context to resolve projects/<client>__<project>/active/YYYY-MM-DD_<task-slug>/)
  • scope of introspection, supplied by the user as one or more of:
    • list of table names (qualified schema.table or unqualified for the default public schema)
    • list of schemas to include in full (use sparingly; large schemas should be narrowed to specific tables)
  • depth flag (one of):
    • tables-only: tables and columns with types, primary keys, and not-null flags
    • tables+rls (default): tables-only plus row-level security policies for each in-scope table
    • full: tables+rls plus relevant functions, triggers, and the most recent migration filenames touching in-scope tables
  • optional: Supabase project ref (if the MCP server is configured for multiple projects); when omitted, use the project the MCP server is currently bound to and record which one was used
  • optional: refresh flag (refresh to regenerate an existing DB_CONTEXT.md; default is to fail with NO_OP_TRACE if a non-stale DB_CONTEXT.md already exists for the same scope)
  • optional: path to the local Supabase project directory. Needed only on the local CLI path below, where every CLI form runs from that directory. When omitted and the MCP path is unavailable, ask for it once instead of guessing a directory.

Read the full file on GitHub · 212 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. 10d ago Changed · -51 tokens per session 41419cef4189
  2. 13d ago Changed · +1 lines 799be40afc2d
  3. 20d ago Changed · -1 lines 8d46574dc7e5
  4. 21d ago Changed · -11 lines · -46 tokens per session bc60705c9bfa
  5. 1mo ago First seen · 223 lines · 208 tokens per session scan A 8c982ff362e4

Subscribe to this mod's changes

db-context-supabase is a skill published in the GitHub repository Mozurok/fhorja.dev (10 stars, last pushed 10d ago), licensed MIT. It adds 111 tokens to every session and 5,631 once invoked, about $0.0004 per session on Opus 5.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-08-31.

Related

Other skills, from other repositories

postgres-supabase

Handles Postgres and Supabase specifics: row-level security policies, auth.uid() and auth.users integration, the supabase CLI migration workflow, PostgREST and schema-cache quirks, and storage bucket policies. Use when the project runs on Supabase, when RLS blocks or leaks rows, or when PostgREST returns a…

Ozzeron/prompt-pack · 92 tokens

agent-database-reviewer

PostgreSQL database specialist for query optimization, schema design, security, and performance. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance. Incorporates Supabase best practices.

KunanonJ/ai-skills-hub · 50 tokens

sql_mastery

CREATE OR REPLACE PROCEDURE sprefreshattributiondaily() LANGUAGE plpgsql AS $$ BEGIN -- 1. Truncate Staging TRUNCATE TABLE stgdailytraffic.

MidOSresearch/midos · 0 tokens

postgresql

Design a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.

KunanonJ/ai-skills-hub · 29 tokens

postgresql-table-design

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.

wshobson/agents · 37 tokens

postgres-database-migration

Use this skill for planning, testing, and safely executing PostgreSQL schema migrations — especially when working with production data or shared databases. Trigger when user asks to: Test a schema migration before applying it to production Add, remove, or rename columns safely on a live table Change a column's data…

timescale/pg-aiguide · 220 tokens