Step-by-step tutorial:
How to install and use 2 agents, 8 commands for the database, and an MCP server to automate development for Supabase in Claude Code.
Claude Code Stack for Supabase:
Claude Code Templates offers three ready-made components for integrating with Supabase:
1️⃣ Agents:
» Supabase Schema Architect
An expert in database design, migrations, and RLS policies. Automatically analyzes requirements and generates production-ready schemas with a focus on performance.
» Supabase Realtime Optimizer
A specialist in WebSocket optimization and real-time. Monitors connections, optimizes subscriptions, and helps maintain scalable real-time without degradation.
2️⃣ Commands:
» supabase-schema-sync
Synchronization of local and remote schemas, version control, and automatic detection of schema drift.
» supabase-migration-assistant
Generation, management, and application of database migrations with rollback support and conflict resolution.
» supabase-performance-optimizer
Analysis of query performance, index recommendations, and optimization of database operations for maximum speed.
» supabase-security-audit
Full security audit, validation of RLS policies, and vulnerability detection with automatic fixes.
» supabase-backup-manager
Scheduled backups, recovery procedures, and DR planning with testing.
» supabase-type-generator
Generation of TypeScript types from the database schema, support for type safety, and automatic updates when the schema changes.
» supabase-data-explorer
Interactive data viewing, visual query builder, and export with filters.
» supabase-realtime-monitor
Monitoring of real-time connections, performance tracking, and WebSocket diagnostics.
3️⃣ Supabase MCP Server. Direct integration with the Supabase API via MCP. Gives Claude Code native access to the project: executing commands, working with schemas and data, managing real-time, and security without unnecessary intermediaries.
Before installation, you can view all available Supabase components on the official Claude Code Templates website.
Go to aitmpl.com and find supabase
INSTALLATION OPTIONS:
There are several ways to install the Supabase stack for Claude Code. Choose the one that best suits you:
1️⃣ Installing individual components# Install a specific agent
npx claude-code-templates@latest --agent database/supabase-schema-architect
# Install a specific Supabase command
npx claude-code-templates@latest --command database/supabase-schema-sync
# Install the MCP server
npx claude-code-templates@latest --mcp database/supabase
The components will be installed in:
* 📁.claude/commands/
* 📁.claude/agents/
* 📁.mcp.json
2️⃣ Creating global agents (available in any project)# Create global agents available from any project
npx claude-code-templates@latest --create-agent database/supabase-schema-architect
npx claude-code-templates@latest --create-agent database/supabase-realtime-optimizer
# Show the list of all global agents
npx claude-code-templates@latest --list-agents
# Update a global agent
npx claude-code-templates@latest --update-agent database/supabase-schema-architect
# Remove a global agent
npx claude-code-templates@latest --remove-agent database/supabase-realtime-optimizer
••••••••••••••••••••••••••••••••••••••
🤖 Data Science, ML & Big Data with @DataXplore & @PromptXplore
