Configure multi-developer Neon Postgres branching and collaboration. TRIGGER when: user asks to set up team branches, create developer database roles, configure git hooks for auto-branching, or connect DBeaver to Neon branches. DO NOT TRIGGER for: API or dashboard usage.
Connector:
~~data warehouse= Neon Postgres 18 (projectcalm-paper-82059121). Pattern: Claude Code parallel subagents with Neon branching guide.
Set up isolated Neon database branches for a development team. Each developer gets their own branch with full schema, a dedicated database role, and automatic branch provisioning via git hooks.
/neon-team-setup [developers]
Or from the shell:
make team-setup # Creates 3 branches + configures git hooks
bash scripts/neon-team-setup.sh # Direct script execution
Ensure these environment variables are set (loaded by scripts/setup-env.sh):
| Variable | Purpose |
|---|---|
NEON_API_KEY | Neon API authentication |
NEON_PROJECT_ID | Target Neon project (calm-paper-82059121) |
NEON_DATABASE_URL | Main branch connection string |
Install the Neon CLI: npm install -g neonctl
The scripts/neon-team-setup.sh script (uses set -euo pipefail per project convention):
For each developer (default: sebastian, alex, jake):
dev/{name} from main via neonctl branches createdev_{name} via neonctl roles createpsql with branch connection string + ontology/schema.sqlontology/migrations/ (if any exist)After team setup, activate the post-checkout hook:
git config core.hooksPath .githooks
This is done automatically by make team-setup.
Follow docs/dbeaver-setup.md for GUI database access:
ep-xxx.us-east-2.aws.neon.tech)5432neondbsslmode=requireThe .githooks/post-checkout hook triggers on git checkout:
main branch.env from main worktree if missingNEON_DATABASE_URL to .envThis means every git checkout -b feature/my-feature automatically provisions a Neon branch with its own compute endpoint.
| Git Branch | Neon Branch | Role |
|---|---|---|
main | main | Shared production schema |
dev/sebastian | dev-sebastian | dev_sebastian |
dev/alex | dev-alex | dev_alex |
dev/jake | dev-jake | dev_jake |
feature/my-feat | feature-my-feat | (auto-created by hook) |
The feature-developer and data-optimizer subagents (.claude/agents/) use isolation: worktree which:
This enables multiple Claude Code agents to develop features in parallel without database conflicts.
| File | Purpose |
|---|---|
scripts/neon-team-setup.sh | Branch + role creation script |
.githooks/post-checkout | Auto-branch provisioning hook |
docs/dbeaver-setup.md | DBeaver connection guide |
.claude/agents/feature-developer.md | Worktree-isolated feature agent |
.claude/agents/data-optimizer.md | Worktree-isolated DB optimizer agent |
Makefile | make team-setup target |
neon-dashboard skillneon-api skillmake sql (Harlequin) or the neon-dashboard SQL screen