grdb-performance-auditor

grdb-performance-auditor is an agent for Claude Code from CharlesWiltgen/Axiom. It costs 311 tokens per session (6,359 once invoked), scanned A, original, MIT.

A performance and correctness review agent for GRDB, a Swift library for working with SQLite databases. It examines database queries, indexes, settings, and observation behavior.

In plain words
What is it for?
Use it to review shipped Swift apps that use GRDB, especially raw SQL, app-group databases, or ValueObservation—the mechanism that watches a query for changes.
Why use it?
It helps uncover slow queries, unsafe SQL construction, missing indexes, database configuration mismatches, and updates that stop reaching the app.

Agent for Claude Code

Written for Claude Code: background in frontmatter. Also seen: model in frontmatter.

Part of the axiom plugin — 27 skills, 17 commands, 42 agents, 5 hooks shipped together

Good fit Use it to review shipped Swift apps that use GRDB, especially raw SQL, app-group databases, or ValueObservation—the mechanism that watches a query for changes.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/charleswiltgen/axiom/grdb-performance-auditor
About the project

Axiom is a toolkit of instructions, agents, commands, and development tools that give coding assistants specialized guidance for Apple operating-system development. It covers Swift, SwiftUI, interface design, data, concurrency, performance, networking, accessibility, logging, crash analysis, simulator testing, and profiling for iOS, iPadOS, watchOS, and tvOS. The catalogue contains 42 agents, 16 commands, and one plugin from this toolkit.

CharlesWiltgen/Axiom · 1,148 stars · on GitHub · charleswiltgen.github.io

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.

Clone the repo
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom

Made for: Claude Code.

Or install axiom, the plugin that ships this one along with the rest of its 27 skills, 17 commands, 42 agents, 5 hooks.

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 grdb-performance-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/charleswiltgen/axiom/grdb-performance-auditor.svg)](https://agentmods.dev/agents/charleswiltgen/axiom/grdb-performance-auditor)
Your own site
<a href="https://agentmods.dev/agents/charleswiltgen/axiom/grdb-performance-auditor"><img src="https://agentmods.dev/badge/agents/charleswiltgen/axiom/grdb-performance-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 311 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,359 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.00311 $0.06359
Opus 5 $0.00156 $0.03180
Sonnet 5 $0.00062 $0.01272
Haiku 4.5 $0.00031 $0.00636

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

Security

Grade A, and why

grdb-performance-auditor 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 8d 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-plugin/plugins/axiom/agents/grdb-performance-auditor.md · 369 lines

How it starts

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

GRDB Performance Auditor Agent

You are an expert at detecting GRDB and SQLite performance and correctness anti-patterns in shipped Swift code. You complement database-schema-auditor (which scans for migration safety); you focus on performance, cross-process correctness, and shipped-code idioms.

Tool Use Is Mandatory

Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning.

  • Run each Grep pattern as written; do not collapse them into one mega-regex.
  • Run the Read verifications each section calls for.
  • "Build a mental model" / "framework detection" means with tool output in hand, not from memory.

Files to Exclude

Skip: *Tests.swift, *Previews.swift, */Pods/*, */Carthage/*, */.build/*, */DerivedData/*, */scratch/*, */docs/*, */.claude/*, */.claude-plugin/*

Phase 1: Framework Detection

Before running detectors, classify the codebase. Several detectors are gated on framework — false positives are worse than missed findings.

Step 1: Identify Database Library

Glob: **/*.swift (excluding test/vendor paths)
Grep for:
  - `import GRDB` — raw GRDB usage
  - `import GRDBQuery` — SwiftUI GRDB bridge
  - `import SQLiteData` or `import StructuredQueries` — Point-Free's sqlite-data
  - `@Table` — SQLiteData macro
  - `DatabaseQueue(`, `DatabasePool(` — GRDB connection construction

Step 2: Identify Writable vs Read-Only Database

Grep for:
  - `Configuration.readonly`, `configuration.readonly = true` — read-only intent
  - `try dbQueue.write`, `try dbPool.write`, `db.write { db in` — write operations
  - `Configuration.prepareDatabase` — connection-setup hook

Step 3: Identify App Group / Multi-Process Usage

Grep for:
  - `containerURL(forSecurityApplicationGroupIdentifier:)` — App Group container
  - `com.apple.security.application-groups` (entitlements files via Glob `**/*.entitlements`)
  - `NSFileCoordinator` near DB setup
  - `WidgetCenter`, `LiveActivity` — process boundary indicators

Read the full file on GitHub · 369 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. 8d ago First seen · 369 lines · 311 tokens per session scan A 7b798cde588e

Subscribe to this mod's changes

grdb-performance-auditor is an agent published in the GitHub repository CharlesWiltgen/Axiom (1,148 stars, last pushed 2d ago), licensed MIT. It adds 311 tokens to every session and 6,359 once invoked, about $0.0016 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.

Related

Other agents, from other repositories

database-optimizer

Optimize SQL queries, design efficient indexes, and handle database migrations. Solves N+1 problems, slow queries, and implements caching. Use PROACTIVELY for database performance issues or schema optimization.

davepoon/buildwithclaude · 44 tokens

d1-debugger

Autonomous diagnostic agent that investigates Cloudflare D1 database issues through 9-phase analysis (config, migrations, queries, bindings, errors, limits, performance, Time Travel, report). Use when encountering D1 query errors, migration failures, binding issues, performance degradation, or limit/quota errors.

secondsky/claude-skills · 65 tokens

performance-optimizer

Identifies performance bottlenecks and optimization opportunities. Use when investigating slow code, optimizing queries, or improving load times.

travisjneuman/.claude · 28 tokens

doctrine-performance-optimizer

Read-only performance audit of Doctrine usage: N+1 queries, fetch modes, batch processing, missing indexes, and caching opportunities. Use proactively after adding entities, relations, repository queries, or when a page/endpoint is reported slow.

dev-toolings/superpowers-symfony · 53 tokens

sqlscript-analyzer

Use this agent when the user asks to "analyze my SQLScript", "review HANA procedure", "check procedure performance", "find SQLScript issues", "audit SQLScript code", "review stored procedure", or needs performance analysis of SAP HANA database procedures. Examples: Context: User has written a SQLScript procedure and…

secondsky/sap-skills · 329 tokens

db-performance-auditor

Audits a .NET data-access layer end to end for performance — EF Core query patterns (N+1, projections, tracking), indexing gaps, DbContext configuration, connection resiliency, and bulk-operation opportunities — and produces a ranked report with fixes. Use when the user wants a database/EF performance review of a…

StefanTheCode/dotnet-ai-toolkit · 88 tokens