用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/liauw-media/CodeAssist --skill database-backup命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Build immersive, scroll-driven websites with GSAP ScrollTrigger, Lenis smooth scroll, parallax effects, and cinematic page transitions. Use when building premium corporate sites, landing pages, or marketing microsites that need motion and polish beyond static designs.
Use when adding docstrings, creating API documentation, or building documentation sites. Invoke for OpenAPI/Swagger specs, JSDoc, doc portals, tutorials, user guides.
Use when reviewing pull requests, conducting code quality audits, or identifying security vulnerabilities. Invoke for PR reviews, code quality checks, refactoring suggestions.
基于 SOC 职业分类
正在显示 SKILL.md
| name | database-backup |
| description | Backup database before tests, migrations, or other database operations |
Create a backup before running any operation that could modify or destroy database data.
Before running:
npm test, pytest, php artisan test)php artisan migrate, prisma migrate)php artisan db:seed)# Create backup
./scripts/backup-database.sh
# Run tests with automatic backup
./scripts/safe-test.sh npm test
# Run migrations with automatic backup
./scripts/safe-migrate.sh php artisan migrate
# Restore if needed
./scripts/restore-database.sh --latest
Real incidents that informed this practice:
migrate:fresh in wrong terminal reset staging databaseA backup takes seconds. Recovery without one can take hours or be impossible.
# Verify which database you're connected to
cat .env | grep DB_
If you see production credentials, stop and switch to a test database.
./scripts/backup-database.sh
Or use the safe wrappers which backup automatically:
./scripts/safe-test.sh [your test command]
./scripts/safe-migrate.sh [your migration command]
After backup is confirmed, proceed with your operation.
If something went wrong:
./scripts/restore-database.sh --latest
| Script | Purpose |
|---|---|
backup-database.sh | Create timestamped backup |
restore-database.sh | Restore from backup |
safe-test.sh | Backup + run tests |
safe-migrate.sh | Backup + run migrations |
See scripts/README.md for detailed usage.
Before database operations:
.env.testing for test database configuration