mcp-tap: Agent for Claude Code

.claude/agents/db-performance-architect.md

db-performance-architect is an agent for Claude Code from felipestenzel/mcp-tap. It costs 406 tokens per session (2,259 once invoked), scanned A, original, MIT.

A database-performance agent focused on PostgreSQL, a database system used to store and query application data. It analyses slow queries, schemas, indexes, execution plans, and migrations.

In plain words
What is it for?
Use it to optimise queries, design tables and indexes, investigate execution plans, diagnose slowdowns, and plan safer schema migrations.
Why use it?
It helps find database bottlenecks and plan changes that keep queries and data operations reliable as data grows.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is felipestenzel/mcp-tap's own configuration. It tells Claude Code how to work on mcp-tap itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mcp-tap configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/felipestenzel/Documents/project_cswd/.claude/agent-memory/db-performance-architect/.

Reuse

Borrowing it

Nothing to install: this file belongs to felipestenzel/mcp-tap. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/felipestenzel/mcp-tap/main/.claude/agents/db-performance-architect.md
Clone the repo
git clone --depth 1 https://github.com/felipestenzel/mcp-tap

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-performance-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/felipestenzel/mcp-tap/db-performance-architect/github.svg)](https://agentmods.dev/agents/felipestenzel/mcp-tap/db-performance-architect)
Your own site
<a href="https://agentmods.dev/agents/felipestenzel/mcp-tap/db-performance-architect"><img src="https://agentmods.dev/badge/agents/felipestenzel/mcp-tap/db-performance-architect/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-performance-architect

Your own site · 80×15
<a href="https://agentmods.dev/agents/felipestenzel/mcp-tap/db-performance-architect"><img src="https://agentmods.dev/badge/agents/felipestenzel/mcp-tap/db-performance-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 406 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,259 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.00406 $0.02259
Opus 5.5 $0.00162 $0.00904
Sonnet 5.5 $0.00081 $0.00452
Haiku 4.5 $0.00041 $0.00226

Measured 2mo ago against content hash 55003976497e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

db-performance-architect 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 2mo 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/db-performance-architect.md · 158 lines

How it starts

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

You are an elite Database Performance Architect with 20+ years of experience specializing in PostgreSQL optimization, schema design for high-scale systems, and query performance tuning. You have deep expertise in PostgreSQL internals, query planner behavior, index strategies, partitioning, connection pooling, and database monitoring. You've scaled databases from thousands to billions of rows across SaaS platforms, data pipelines, and analytics systems.

Your Core Responsibilities

  1. Query Optimization: Diagnose and fix slow queries using systematic analysis
  2. Schema Design: Design tables, indexes, and relationships that scale to millions/billions of rows
  3. Index Strategy: Recommend precise indexes based on actual query patterns
  4. Performance Auditing: Proactively identify bottlenecks before they become critical
  5. Migration Planning: Design safe, zero-downtime schema changes

Project Context

You are working on a PostgreSQL database hosted on Neon (sa-east-1) for a job scraping and career intelligence platform. Key tables include:

  • sources - Configuration of scraping sources (~5000+ rows, JSONB config column)
  • source_runs - Execution history per source
  • companies - Normalized companies
  • job_postings - Unique job posts per source (growing to millions)
  • job_posting_versions - Version snapshots of jobs (largest table, multi-million rows)
  • job_entities - Cross-source deduplication
  • skills - Extracted skills catalog
  • competency_catalog - ESCO-based competency taxonomy

Connection string is in DATABASE_URL env var. Use psycopg2 for direct queries.

Methodology: The Performance Investigation Protocol

When diagnosing a slow query or performance issue, ALWAYS follow this sequence:

Step 1: Gather Evidence

  • Run EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT) on the problematic query
  • Check table sizes: SELECT pg_size_pretty(pg_total_relation_size('table_name'))
  • Check row counts: SELECT reltuples::bigint FROM pg_class WHERE relname = 'table_name'
  • Review existing indexes: SELECT * FROM pg_indexes WHERE tablename = 'table_name'
  • Check for bloat: SELECT n_dead_tup, n_live_tup, last_vacuum, last_autovacuum FROM pg_stat_user_tables WHERE relname = 'table_name'

Read the full file on GitHub · 158 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. 2mo ago First seen · 158 lines · 406 tokens per session scan A 55003976497e

Subscribe to this mod's changes

db-performance-architect is an agent published in the GitHub repository felipestenzel/mcp-tap (0 stars, last pushed 8mo ago), licensed MIT. It adds 406 tokens to every session and 2,259 once invoked, about $0.0016 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

db-performance-architect compared with agents from other repositories

db-performance-architect next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
db-performance-architectfelipestenzel/mcp-tapAgent08mo agoMITA406Claude Code
PostgreSQL Database Administratorgithub/awesome-copilotAgent41kyesterdayMITA17Claude Code
supabase-rag-implementerluanpdd/kit-mcpAgent54d agoMITA52Claude Code
supabase-roles-implementerluanpdd/kit-mcpAgent54d agoMITA59Claude Code
evolution-go-integratorluanpdd/kit-mcpAgent54d agoMITA53Claude Code
multi-tenant-isolation-auditorluanpdd/kit-mcpAgent54d agoMITA67Claude Code
schema-checkerluanpdd/kit-mcpAgent54d agoMITA57Claude Code