Resets local development database by deleting all data and restarting API container to trigger auto-seeding. SINGLE SOURCE OF TRUTH for dev database reset automation.
Resets local development database by deleting all data and restarting the API container to trigger automatic re-seeding. Use this when you need fresh seed data for testing, after database corruption, or to restore a clean slate for development.
/plugin marketplace add DarkMonkDev/WitchCityRope/plugin install darkmonkdev-witchcityrope-agents@DarkMonkDev/WitchCityRopeThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Purpose: Full database reset for local development environment - deletes all data and restarts API container to trigger automatic seed data population.
When to Use:
When NOT to Use:
database-reset-staging skill instead)restart-dev-containers skill)Background: API container automatically seeds database on startup through DatabaseInitializationService when database is empty.
This skill performs DESTRUCTIVE operations:
public AND cms schemas will be DROPPED and recreatedwitchcityrope_dev)Prerequisites:
Executable Script: execute.sh
# From project root - with confirmation prompt
bash .claude/skills/database-reset-dev/execute.sh
# Skip confirmation prompt (for automation)
SKIP_CONFIRMATION=true bash .claude/skills/database-reset-dev/execute.sh
What the script does:
Script includes CRITICAL safety warnings - this is a DESTRUCTIVE operation that cannot be undone.
Local Development Database:
Note: Port 5434 is used to avoid conflicts with other local PostgreSQL instances.
When API container starts with an empty database:
DatabaseInitializationService runs automaticallySeedCoordinator to populate seed data:
Total seed time: ~10-15 seconds after container startup
If skill fails, manual steps:
Step 1: Connect to database and drop schemas
PGPASSWORD=devpass123 psql -h localhost -p 5434 -U postgres -d witchcityrope_dev -c "DROP SCHEMA IF EXISTS public CASCADE; CREATE SCHEMA public; DROP SCHEMA IF EXISTS cms CASCADE;"
Step 2: Restart containers
bash .claude/skills/restart-dev-containers/execute.sh
Step 3: Verify seed data
PGPASSWORD=devpass123 psql -h localhost -p 5434 -U postgres -d witchcityrope_dev -c "SELECT COUNT(*) FROM \"Users\" WHERE \"Email\" LIKE '%@witchcityrope.com';"
Cause: PostgreSQL client not installed locally
Solution:
# Ubuntu/Debian
sudo apt install postgresql-client
# macOS
brew install postgresql
Cause: Docker containers not running
Solution:
Cause: Database was deleted entirely (not just schemas)
Solution:
PGPASSWORD=devpass123 psql -h localhost -p 5434 -U postgres -c "CREATE DATABASE witchcityrope_dev;"
Cause: API container seeding disabled or failed
Solution:
DatabaseInitializationService ranCause: API container needs more time to start, or compilation/migration errors
Solution:
Cause: Another PostgreSQL instance using that port
Solution:
lsof -i :5434Typical usage scenarios:
Scenario 1: Clean testing environment
Before E2E tests that require specific seed data state:
1. Run this skill to reset database
2. Run tests immediately
Scenario 2: Database corruption during development
Database in bad state from manual changes:
1. Run this skill to get fresh seed data
2. Continue development
Scenario 3: Testing seed data changes
Modified seed data logic in API:
1. Run this skill
2. Verify new seed data populated correctly
Related skills:
restart-dev-containers: Use this if you just need container restart WITHOUT database resetdatabase-reset-staging: Staging environment equivalent (different database, different procedure)When to use which:
restart-dev-containersdatabase-reset-stagingOn success:
ā
Database Reset Complete
==========================
š Summary:
⢠Database: witchcityrope_dev
⢠Schemas: Dropped and recreated
⢠Seed data: Populated
⢠Test users: 7 accounts
šÆ Ready for:
⢠Development
⢠Testing
⢠Fresh start
On failure:
ā Database Reset Failed
Error: [specific error message]
š” Troubleshooting:
⢠Check Docker is running
⢠Verify psql client installed
⢠Review container logs for errors
⢠See: .claude/skills/database-reset-dev/SKILL.md (Common Issues)
restart-dev-containers skillrestart-dev-containers skill (container management)database-reset-staging skill (staging equivalent)Remember: This skill is for development only. Never use on staging or production. Use restart-dev-containers skill if you don't need database reset.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.