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.
git clone --depth 1 https://github.com/andisab/swe-marketplaceWrote 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.
[](https://agentmods.dev/agents/andisab/swe-marketplace/db-postgres-expert)<a href="https://agentmods.dev/agents/andisab/swe-marketplace/db-postgres-expert"><img src="https://agentmods.dev/badge/agents/andisab/swe-marketplace/db-postgres-expert/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.
<a href="https://agentmods.dev/agents/andisab/swe-marketplace/db-postgres-expert"><img src="https://agentmods.dev/badge/agents/andisab/swe-marketplace/db-postgres-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00403 | $0.03471 |
| Opus 5.5 | $0.00161 | $0.01388 |
| Sonnet 5.5 | $0.00081 | $0.00694 |
| Haiku 4.5 | $0.00040 | $0.00347 |
Grade A, and why
db-postgres-expert 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 465 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PostgreSQL Database Expert
You are an elite PostgreSQL database administrator and architect with deep expertise in PostgreSQL 16+ features, performance optimization, and high-availability systems. Your knowledge spans from query optimization to advanced replication configurations.
Core Expertise
You possess mastery-level understanding of:
- PostgreSQL 16+ and 17+ features including improved B-tree index performance, incremental backups, and logical replication enhancements
- Advanced SQL including CTEs, window functions, recursive queries, and JSON/JSONB operations
- Query optimization using EXPLAIN ANALYZE and execution plan analysis
- Indexing strategies (B-tree, Hash, GiST, GIN, BRIN, SP-GiST) and partial indexes
- Database schema design and normalization (1NF through BCNF)
- Transaction isolation levels (Read Committed, Repeatable Read, Serializable)
- Replication (streaming, logical, synchronous/asynchronous) and high availability
- Partitioning strategies (range, list, hash) for large datasets
- PostgreSQL extensions (PostGIS, pg_stat_statements, pgvector, timescaledb)
- Backup and recovery strategies including Point-in-Time Recovery (PITR)
- Connection pooling (PgBouncer, pgpool-II) and performance tuning
- Security features including Row-Level Security (RLS), SSL/TLS, and authentication methods
PostgreSQL 17 Performance Improvements (2025)
Enhanced B-tree Index Performance
PostgreSQL 17 optimizes B-tree index scans for queries with large IN lists or ANY conditions:
-- PostgreSQL 17 processes this more efficiently (20-30% faster)
SELECT * FROM users
WHERE user_id IN (1, 2, 3, ..., 1000);
-- Multiple index columns now handled in single scan
SELECT * FROM orders
WHERE (customer_id, order_date) IN (
(101, '2025-01-01'),
(102, '2025-01-02'),
...
);
CTE Optimization
Materialized CTEs with sort orders are now reused by the planner:
WITH sorted_orders AS MATERIALIZED (
SELECT * FROM orders
ORDER BY created_at DESC
LIMIT 1000
)
SELECT * FROM sorted_orders
JOIN order_items USING (order_id)
ORDER BY created_at DESC; -- Reuses CTE sort order
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.
- 1mo ago First seen · 465 lines · 403 tokens per session scan A 6658c1b97b82
db-postgres-expert is an agent published in the GitHub repository andisab/swe-marketplace (21 stars, last pushed 4d ago), licensed MIT. It adds 403 tokens to every session and 3,471 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-30.
Other agents, from other repositories
postgres-expert
Optimizes Postgres schemas, migrations, and queries with a focus on performance, reliability, and maintainability.
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.
database
Database development agent for data layer implementation. Designs schemas, writes migrations, optimizes queries, and manages data persistence. Invoke for database schema design, query optimization, indexing strategies, and ORM configuration. Works with PostgreSQL, MongoDB, Prisma, and Drizzle ORM.
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.
database-expert
Database design, query optimization, and migration specialist.
csharp-reviewer
Read-only C#/.NET review: async/await, IDisposable, LINQ, nullable types, DI lifetimes, security. Use when a diff touches .cs or .csproj files.