neon-database-architect — Claude Code subagent for Neon and Drizzle
A subagent for designing Neon schemas, wiring up Drizzle ORM and tuning queries for serverless workloads.
npx claude-code-templates@latest --agent database/neon-database-architectWhat neon-database-architect does
The subagent starts by scanning your project: it looks for drizzle.config.*, schema and migration files, and greps for DATABASE_URL, drizzle and neon. From there it proposes concrete changes — table structure, migrations, cold-start optimizations.
Its technical standards cover the neon-http Drizzle adapter, DATABASE_URL from environment variables, normalized schemas with Postgres types like JSONB, arrays and enums, plus indexes and constraints. Repeated queries become prepared statements, inserts become batch operations. Transaction examples and a connection-error wrapper are included too.
It runs with Read, Write, Edit, Bash, Grep and Glob, so it reads and edits files in your repo directly. You need @neondatabase/serverless, drizzle-orm and drizzle-kit installed, and a connection string in DATABASE_URL. On a project that does not use Neon and Drizzle, there is nothing here for it to do — worth checking your stack first.
What it helps with
- design a normalized Postgres schema for Neon
- wire Drizzle ORM through the
neon-httpadapter - cut cold-start latency in serverless functions
- convert repeated queries to prepared statements
- replace a loop of single inserts with one batch insert
Example prompts for the agent
- review my database schema and suggest Neon-specific optimizations
- set up the Drizzle connection to Neon using environment variables
- rewrite this query as a prepared statement
How to install neon-database-architect
1claude-code-templates
npx claude-code-templates@latest --agent database/neon-database-architect2Manually: put the files in place
.claude/agents/neon-database-architect.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/neon-database-architect.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/neon-database-architect.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about neon-database-architect
How do I install neon-database-architect in Claude?
Run npx claude-code-templates@latest --agent database/neon-database-architect, then confirm the file landed at .claude/agents/neon-database-architect.md.
What does neon-database-architect do?
It designs database schemas, sets up Drizzle ORM, and optimizes queries and connections for Neon's serverless behavior. As a subagent it reads your project files and applies edits itself.
What does the subagent need to work?
@neondatabase/serverless, drizzle-orm and drizzle-kit installed, plus DATABASE_URL in your environment. It is not useful on a project that does not run Neon with Drizzle.