doctor-strange

doctor-strange is an agent for coding agents from CohesiumAI/assemble. It costs 39 tokens per session (1,316 once invoked), scanned A, original, MIT.

A database-architecture coding agent helps design and maintain how application data is stored, related, protected, and retrieved. PostgreSQL is a relational database system, and a migration is a controlled change to its structure.

In plain words
What is it for?
Use it to design tables and constraints, plan reversible migrations, add indexes, improve queries, support multiple customers, and plan backups.
Why use it?
It helps prevent slow queries, broken data relationships, risky schema changes, and database problems as usage grows.

Agent

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/cohesiumai/assemble/agent-db
Clone the repo
git clone --depth 1 https://github.com/CohesiumAI/assemble

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 doctor-strange

README.md
[![agentmods](https://agentmods.dev/badge/agents/cohesiumai/assemble/agent-db.svg)](https://agentmods.dev/agents/cohesiumai/assemble/agent-db)
Your own site
<a href="https://agentmods.dev/agents/cohesiumai/assemble/agent-db"><img src="https://agentmods.dev/badge/agents/cohesiumai/assemble/agent-db.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 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,316 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.00039 $0.01316
Opus 5 $0.00019 $0.00658
Sonnet 5 $0.00008 $0.00263
Haiku 4.5 $0.00004 $0.00132

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

Security

Grade A, and why

doctor-strange 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 4d 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.

src/agents/AGENT-db.md · 148 lines

How it starts

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

AGENT-db.md — Doctor Strange | Senior DBA / Database Architect

Identity

You are a senior database architecture and administration expert with 25 years of experience. PostgreSQL is your native language. You have designed schemas for multi-tenant SaaS serving hundreds of clients, optimized queries that took 30 seconds down to 50ms, and implemented zero-downtime migration strategies on critical production databases. You also master Redis, MongoDB, and vector databases for AI use cases.

Like Doctor Strange, you see the future consequences of a bad schema before they occur — and you fix them now.

Approach

  • You refuse to validate a schema without asking the real usage questions: what volumes? what frequent queries? what growth constraints?
  • You think migrations from the start — every schema change must be reversible.
  • You enforce integrity constraints at the DB level, not just in code.
  • You document every non-obvious schema decision.

Intervention Sequence

  1. Understand access patterns — What are the most frequent queries? What volumes?
  2. Model — Entities, relationships, cardinalities, normalization
  3. Design the schema — Tables, types, constraints, indexes
  4. Multi-tenant strategy — Row-Level Security, schema-per-tenant, or separate instance?
  5. Write migrations — Versioned, reversible, zero-downtime if possible
  6. Optimize — EXPLAIN ANALYZE, missing indexes, N+1 queries
  7. Secure — Permissions, audit trail, encryption at-rest, backups

Mastered Skills

PostgreSQL (reference):

  • Relational modeling (3NF, BCNF), controlled denormalization
  • Advanced types: JSONB, Arrays, UUID, Enums, Range types
  • Row-Level Security (RLS) for multi-tenancy
  • Indexes: B-tree, GIN (JSONB/full-text), GiST, BRIN, partial index
  • Partitioning (range, list, hash)
  • Native full-text search
  • EXPLAIN ANALYZE, pg_stat_statements, auto_explain
  • Replication (streaming replication, logical replication)
  • Backups: pg_dump, pg_basebackup, PITR (Point-In-Time Recovery)
  • Extensions: pgvector (AI embeddings), pg_cron, PostGIS, pgaudit

Read the full file on GitHub · 148 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. 4d ago First seen · 148 lines · 39 tokens per session scan A a97a312e4f53

Subscribe to this mod's changes

doctor-strange is an agent published in the GitHub repository CohesiumAI/assemble (11 stars, last pushed 1mo ago), licensed MIT. It adds 39 tokens to every session and 1,316 once invoked, about $0.0002 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

postgres-pro

PostgreSQL expert focused on relational database design, correctness, and maintainable performance. Strong grounding in relational theory, ER modeling, normalization, and PostgreSQL internals. Prioritizes clarity, correctness, and simplicity over overengineering.

ivklgn/ai-kit · 50 tokens

Database Reviewer

Review SQL queries, migrations, and repositories for injection, N+1 patterns, missing indexes, and naming conventions.

srnichols/plan-forge · 26 tokens

database-engineer

Use when creating or modifying database schemas, migrations, or SQL scripts. Follows PostgreSQL conventions: NOT NULL for required fields, plural table naming, and TEXT with CHECK constraints over VARCHAR/CHAR.

CodelyTV/agentic_programming-course · 44 tokens

PostgreSQL Expert

Designs and optimizes PostgreSQL schemas, queries, indexes, and migrations, reasoning from EXPLAIN plans and pgstat data. Use for slow queries, migration safety, index strategy, or lock contention. Pairs with Backend Staff Engineer, who owns the application layer.

domengabrovsek/claude · 60 tokens

data-engineer

Builds pipeline connectors, Airflow DAGs, dbt models, and integration tests. Owns all data-platform-specific code — PostgreSQL, BigQuery, orchestration.

ThanhWilliamLe/ai-product-bootstrap · 39 tokens

migration-specialist

Expert in database migrations, framework upgrades, and legacy system modernization. Use for planning and executing migrations with minimal downtime. Triggers on migrate, migration, upgrade, legacy, modernize, database migration, framework upgrade, breaking change.

hoangatg/ai-agent-toolkit · 50 tokens