一键导入
mg-local-db-restore
Trigger phrases - "reset local db", "recreate local postgres", "restore dump to local", "reset local database", "load backup locally"
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Trigger phrases - "reset local db", "recreate local postgres", "restore dump to local", "reset local database", "load backup locally"
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
End-to-end voice agent builder for ModelGuide. Use this skill whenever someone wants to build, create, or set up a voice agent or voice bot from scratch — regardless of industry (dental, HVAC, retail, restaurant, gym, real estate, law firm, insurance, etc.). Trigger on "/build-agent" or phrases like "build a voice agent", "create a voice bot", "set up an agent", "automate our phone line / dispatch calls / inbound calls", "I need a voice agent for my [business]", "help me build an agent", or "I want to set up a new ModelGuide agent". Also trigger when someone says they are "starting from zero" or "starting fresh" on a new agent build. Guides through 8 stages: prereq check, interview, local input collection, YAML generation + provisioning, eval import, simulation feedback loop, autonomous tightening, and local LiveKit validation. Supports end-to-end provisioning for Medusa, Zendesk, and conversation-only agents. For other APIs, dispatches `@mg-connector` in parallel while the rest of the build continues — the b
Generate YAML configuration files and run CLI commands to onboard organizations into ModelGuide. Use this skill when the user asks to set up an org, create agents, import SOPs, add connectors, prepare onboarding YAML, provision a customer, seed demo data, or anything related to the `mg` CLI tool. Also trigger when the user mentions "mg setup", "mg import", "mg add", "onboard", "provision org", "create YAML for CLI", "prepare config files", or asks how to get a new organization running in ModelGuide.
Use when the user asks to add a connector, create a connector, implement a connector for a service, add a tool to a connector, update a connector tool, or asks about connector architecture. Trigger phrases include "add connector", "create connector", "new connector", "implement connector", "add tool to connector", "update connector tool", "connector architecture".
Deploy all ModelGuide services (API, UI, LB) to a Railway environment. Use when the user asks to "deploy all", "deploy to railway", "deploy services", "deploy everything", or "deploy all to environment".
Use before committing significant code changes to verify project integrity. Checks code style, project structure, naming conventions, and change management rules from CONTRIBUTING.md. Trigger phrases include "pre-commit check", "integrity check", "check before commit", "review my changes", "verify changes".
Backup a PostgreSQL database from a Railway environment. Use when the user asks to "backup db", "dump database", "save db from railway", "backup railway database", or "export db".
| name | mg-local-db-restore |
| description | Trigger phrases - "reset local db", "recreate local postgres", "restore dump to local", "reset local database", "load backup locally" |
Reset the local Docker Postgres and restore it from a .dump backup file.
Ask the user if not provided:
.dump.gz file. If not specified, list files matching .claude/local/*.dump.gz and ask the user to pick one.ls -lh .claude/local/*.dump.gz
Ask the user which backup to use.
This destroys all local database data. Ask the user to confirm before proceeding.
Only target the postgres service to avoid affecting other containers:
docker compose down -v postgres
docker compose up -d postgres
Poll until the container is healthy (~5-10 seconds):
until docker compose ps postgres | grep -q healthy; do sleep 1; done
Read docker-compose.yml at the project root and extract:
POSTGRES_USERPOSTGRES_PASSWORDPOSTGRES_DBNever hardcode credentials — always read them from the compose file.
Never pass credentials in command-line arguments. Use PGPASSWORD as an inline env var:
gunzip -c <backup-file> | PGPASSWORD=<password> pg_restore --clean --if-exists --no-owner --no-acl \
-h localhost -p <port> -U <user> -d <db>
Query pg_tables via psql to confirm tables exist:
PGPASSWORD=<password> psql -h localhost -p <port> -U <user> -d <db> \
-c "SELECT schemaname, tablename FROM pg_tables WHERE schemaname = 'public' ORDER BY tablename;"
Report the table count and list to the user.
Tell the user the restore is complete. Remind them:
make db-migrate if the dump may be behind on migrationsmake db-seed if they need fresh seed data on top of the backupdocker-compose.yml)init.sql script automatically creates the modelguide_app role on a fresh volume, so the restore should work without manual role creationpg_restore reports errors about missing roles or permissions, these are usually safe to ignore with --no-owner --no-acl