xarchitecture
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
Comprehensive database management, migrations, and performance operations
How it fires
How this command gets triggered: by you, by Claude, or both.
/xdbContext preview
What this command does when you run it.
Comprehensive database management, migrations, and performance operations
description: Comprehensive database management, migrations, and performance operations tags: [database, schema, migration, performance, backup]
Perform database operations based on the arguments provided in $ARGUMENTS.
First, examine the project for database configuration and tools: !ls -la | grep -E "(database|db|migration|schema)" !find . -name "*.sql" -o -name "*migration*" -o -name "*schema*" | head -10 !which psql 2>/dev/null || which mysql 2>/dev/null || which sqlite3 2>/dev/null || echo "No database clients found"
Based on $ARGUMENTS, perform the appropriate database operation:
If managing schema (--schema): !find . -name "schema.sql" -o -name "*.schema" | head -5 !ls models/ 2>/dev/null || ls app/models/ 2>/dev/null || echo "No models directory found"
For schema operations:
If handling migrations (--migrate): !find . -name "*migration*" -o -path "*/migrations/*" | head -10 !python manage.py showmigrations 2>/dev/null || rails db:migrate:status 2>/dev/null || echo "No migration framework detected"
Migration tasks:
If seeding data (--seed): !find . -name "*seed*" -o -name "*fixture*" | head -5 !python manage.py loaddata 2>/dev/null || rails db:seed 2>/dev/null || echo "No seeding framework detected"
Seeding operations:
If analyzing performance (--performance): !ps aux | grep -E "(postgres|mysql|sqlite)" | head -3 !top -l 1 | grep -E "(CPU|Memory)" 2>/dev/null || echo "System stats not available"
Performance checks:
If performing backup (--backup): !ls -la *.sql *.dump 2>/dev/null || echo "No backup files found" !which pg_dump 2>/dev/null || which mysqldump 2>/dev/null || echo "No backup tools found"
Backup tasks:
If testing database (--test): !python -m pytest tests/test_*db* 2>/dev/null || npm test 2>/dev/null || echo "No database tests found" !find . -name "*test*" | grep -i db | head -5
Testing operations:
Check database connectivity: !python -c "import sqlite3; print('SQLite available')" 2>/dev/null || echo "SQLite not available" !python -c "import psycopg2; print('PostgreSQL client available')" 2>/dev/null || echo "PostgreSQL client not available" !python -c "import pymongo; print('MongoDB client available')" 2>/dev/null || echo "MongoDB client not available"
Think step by step about database operations and provide:
Generate database management report with actionable recommendations.
Transform Claude Code into a complete development platform with 45 AI-powered commands that automate your entire software development workflow. Now with improved git identity management!
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
Manage project configuration files, environment variables, and application settings
Continue an execution plan from where it left off across sessions
Interactive debugging support with error analysis and fix suggestions - integrates with Debug Specialist sub-agent for complex…