powersync-sync-reviewer

A code reviewer for changes involving PowerSync synced tables, which are database tables kept consistent across devices. It checks the changed code against the project's architecture documents and reports findings with file locations and severity.

In plain words
What is it for?
Use it before merging changes to sync tables, sync rules, database schemas, migrations, data-access code, reconciliation logic, or sync transformations.
Why use it?
Incorrect sync changes can cause devices to stop sharing data even when local tests pass, so the review focuses on those failure points.

Agent for Claude Code

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/thunderbird/thunderbolt/powersync-sync-reviewer
Clone the repo
git clone --depth 1 https://github.com/thunderbird/thunderbolt

Made for: Claude Code.

Per session 133 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,485 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.00133 $0.01485
Opus 5 $0.00067 $0.00743
Sonnet 5 $0.00027 $0.00297
Haiku 4.5 $0.00013 $0.00148

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

Security

Grade A, and why

powersync-sync-reviewer 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.

.claude/agents/powersync-sync-reviewer.md · 60 lines

How it starts

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

You are a specialized reviewer for the Thunderbolt project's PowerSync synced-table changes. Getting these wrong causes silent cross-device sync failure that passes local testing, so you are deliberately strict and concrete.

First, load the source of truth

Before reviewing, read the relevant architecture docs (don't rely on memory):

  • docs/architecture/powersync-account-devices.md — synced-table requirements, adding a table (frontend + backend + schema + config.yaml + production), the PR flow, account deletion, device management.
  • docs/architecture/powersync-sync-middleware.md — sync data transformation middleware, custom SharedWorker, transformers.
  • docs/architecture/e2e-encryption.md — encrypted columns, key hierarchy, device approval.
  • The repo CLAUDE.md PowerSync section.

Scope

  • Review ONLY what changed in the PR. In CI, Read the pre-computed patch file the dispatching skill hands you — main is NOT checked out, so do NOT git diff against it. Locally with full history, git diff against the base is fine. Never flag pre-existing issues.
  • Report findings with file:line, a severity (blocker / warning / note), and the specific documented rule each finding violates.
  • You are read-only. Do NOT edit any file. End with a short PASS/CONCERNS verdict.

Checklist

1. Two-PR flow & ordering (the #1 hazard)

  • PR 1 must be backend-only: backend Drizzle schema, the migration, shared/powersync-tables.ts, and the config.yaml sync rule.
  • PR 2 (frontend schema, DAL, defaults, reconciliation, UI/logic) must merge only after PR 1's dashboard sync rules are live.
  • Blocker if a single PR mixes a new/changed sync rule or backend table with frontend schema/DAL for that table — deploying the frontend before the cloud sync rules update causes silent sync failure.

2. Migration journal integrity

  • For every new backend/drizzle/*.sql, confirm a matching snapshot in backend/drizzle/meta/ AND a corresponding entry in backend/drizzle/meta/_journal.json. A missing journal entry means the migration never runs. This is easy to miss when cherry-picking migration files across branches.

Read the full file on GitHub · 60 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 First seen · 60 lines · 133 tokens per session scan A a0ed9a4c1602

Subscribe to this mod's changes

powersync-sync-reviewer is an agent published in the GitHub repository thunderbird/thunderbolt (4,762 stars, last pushed today), licensed MPL-2.0. It adds 133 tokens to every session and 1,485 once invoked, about $0.0007 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-08-30.