consistencia-leitura-replica

consistencia-leitura-replica is a skill for Claude Code, Codex from luanpdd/kit-mcp. It costs 54 tokens per session (4,574 once invoked), scanned A, original, MIT.

A guide to keeping database reads consistent when using Supabase read replicas, which are copies of a database used for reading. It addresses replication delay and reads that happen after a write or a real-time notification.

In plain words
What is it for?
Use it when combining Supabase read replicas, Supavisor, Realtime broadcasts, and follow-up database queries, including read-after-write behavior and replication-position checks.
Why use it?
It prevents users from seeing old data immediately after an update or from seeing results move backward between reads. It also helps avoid routing and connection choices that produce stale results.

Skill for Claude CodeCodex

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

Good fit Use it when combining Supabase read replicas, Supavisor, Realtime broadcasts, and follow-up database queries, including read-after-write behavior and replication-position checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/luanpdd/kit-mcp/consistencia-leitura-replica
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 luanpdd/kit-mcp --skill consistencia-leitura-replica
Clone the repo
git clone --depth 1 https://github.com/luanpdd/kit-mcp

Made for: Claude Code, Codex.

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 consistencia-leitura-replica

README.md
[![agentmods](https://agentmods.dev/badge/skills/luanpdd/kit-mcp/consistencia-leitura-replica/github.svg)](https://agentmods.dev/skills/luanpdd/kit-mcp/consistencia-leitura-replica)
Your own site
<a href="https://agentmods.dev/skills/luanpdd/kit-mcp/consistencia-leitura-replica"><img src="https://agentmods.dev/badge/skills/luanpdd/kit-mcp/consistencia-leitura-replica/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 consistencia-leitura-replica

Your own site · 80×15
<a href="https://agentmods.dev/skills/luanpdd/kit-mcp/consistencia-leitura-replica"><img src="https://agentmods.dev/badge/skills/luanpdd/kit-mcp/consistencia-leitura-replica.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,574 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.00054 $0.04574
Opus 5 $0.00027 $0.02287
Sonnet 5 $0.00011 $0.00915
Haiku 4.5 $0.00005 $0.00457

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

Security

Grade A, and why

consistencia-leitura-replica 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 9d 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.

kit/skills/consistencia-leitura-replica/SKILL.md · 387 lines

How it starts

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

Consistência Leitura Réplica — Supabase + Supavisor + Realtime

Quando usar

LLM carrega esta skill ao usar Supabase Pro+ com read replicas ou ao combinar Realtime broadcast com leitura subsequente do DB. Trigger phrases:

  • "Supabase read replica", "réplica de leitura"
  • "porta 6543 vs 5432", "Supavisor session vs transaction"
  • "read-after-write", "leitura após escrita inconsistente"
  • "monotonic reads", "leituras não-monotônicas"
  • "consistent prefix reads", "prefixo causal violado"
  • "replication lag Supabase", "atraso de replicação"
  • "broadcast Realtime + SELECT stale"
  • "pg_last_wal_replay_lsn", "WAL position detection"

Esta skill aplica DDIA Ch 5 "Problems With Replication Lag" ao stack Supabase. Cross-referenciada por supabase-realtime (v1.8) ao bundlear broadcast + leitura, e por multi-tenant-performance-scaling (v1.21) ao escalar Postgres em Pro+.

Termos canônicos (read-after-write consistency, monotonic reads, consistent prefix reads, replication lag, leader-follower replication) definidos em _shared-dados-distribuidos/glossary.md seções (a) e (b) — esta skill não duplica, apenas linka.

Regras absolutas

REGRA #1 (read-after-write own data): Para leituras do próprio dado do usuário dentro de janela de 5s após write, rotear para porta 5432 (líder) — não 6543. Sem isso, usuário cria post → GET retorna 404 → percepção de bug. Justify: DDIA p. 156 "always read the user's own profile from the leader".

REGRA #2 (sticky session monotonic): Para usuários ativos lendo de réplicas, escolher réplica via hash(user_id) mod Nnão round-robin. Round-robin viola monotonic reads (DDIA p. 158). Mitigação obrigatória: fallback para líder se réplica down.

REGRA #3 (broadcast trust payload): Após receber Realtime broadcast com payload.record, NÃO fazer SELECT subsequente. Confiar no payload — server é a fonte canônica do evento. SELECT pode atingir réplica que ainda não replicou (lag típico 50-500ms).

Read the full file on GitHub · 387 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. 9d ago First seen · 387 lines · 54 tokens per session scan A e14f0f1f0da2

Subscribe to this mod's changes

consistencia-leitura-replica is a skill published in the GitHub repository luanpdd/kit-mcp (1 stars, last pushed 5d ago), licensed MIT. It adds 54 tokens to every session and 4,574 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 skills, from other repositories

azure-postgres-ts

Connect to Azure Database for PostgreSQL Flexible Server from Node.js/TypeScript using the pg (node-postgres) package. Use for PostgreSQL queries, connection pooling, transactions, and Microsoft Entra ID (passwordless) authentication. Triggers: "PostgreSQL", "postgres", "pg client", "node-postgres", "Azure PostgreSQL…

microsoft/skills · 94 tokens

butterbase

AI-native, open-source backend-as-a-service with a built-in Model Context Protocol server. Postgres, auth, storage, functions, AI gateway.

butterbase-ai/butterbase · 34 tokens

supabase

Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies…

supabase/agent-skills · 185 tokens

supabase-cli

This skill should be used when user asks to "use supabase CLI", "supabase init", "supabase start", "run migrations", "deploy edge functions", "manage Supabase project", or works with the supabase command-line tool for local development and project management.

fcakyon/claude-codex-settings · 60 tokens

supabase-js

This skill should be used when user asks to "use supabase-js", "query Supabase database", "supabase auth", "supabase storage", "supabase realtime", "supabase edge functions", or works with the @supabase/supabase-js JavaScript/TypeScript SDK.

fcakyon/claude-codex-settings · 64 tokens

supabase-node

Express/Hono with Supabase and Drizzle ORM.

alinaqi/maggy · 14 tokens