Skip to main content
subagent

neon-auth-specialist — Claude Code subagent: how to install

Configures Stack Auth integration with Neon database synchronization. Helps set up user management, protected routes, and safe query patterns.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --agent database/neon-auth-specialist
Open on GitHub

What neon-auth-specialist does

The subagent inspects the repository using Grep and file searches for useUser, StackProvider, or auth handlers. It coordinates running npx @stackframe/init-stack@latest and populating environment variables such as STACK_SECRET_SERVER_KEY and DATABASE_URL. It also writes Next.js route guards in middleware.ts alongside client-side profile components.

User details synchronize directly into the neon_auth.users_sync table. Adding foreign keys to this auth schema is strictly prohibited, meaning application records must connect through a LEFT JOIN. Every lookup must explicitly include WHERE deleted_at IS NULL to hide soft-deleted accounts.

What it helps with

  • integrate Stack Auth with a Neon database instance
  • guard private Next.js dashboard routes with redirect middleware
  • query application data linked to neon_auth.users_sync
  • filter out deleted users properly across application queries

Example prompts for the agent

  • Inspect our project auth setup and wire up Stack Auth with Neon
  • Create a Next.js middleware that guards /protected and redirects unauthenticated guests
  • Write a SQL query joining our application tables with neon_auth.users_sync

How to install neon-auth-specialist

1claude-code-templates

npx claude-code-templates@latest --agent database/neon-auth-specialist

2Manually: put the files in place

.claude/agents/neon-auth-specialist.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about neon-auth-specialist

How to install neon-auth-specialist in Claude Code?

Run npx claude-code-templates@latest --agent database/neon-auth-specialist. Alternatively, save the subagent definition file to .claude/agents/neon-auth-specialist.md.

What does neon-auth-specialist do?

It manages authentication workflows connecting Stack Auth to Neon databases. The subagent inspects files, creates user provider wrappers, and enforces database access rules.

Can application tables use foreign keys to neon_auth.users_sync?

No, foreign keys to the auth schema should not be created. Connect user records with LEFT JOIN instead and always verify that deleted_at IS NULL.

Similar subagents

All subagents for Backend and APIs →

From the same set804

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor