database-management
БесплатноБез исполняемых скриптовНе проверенWhen you need to modify the database schema, run migrations, or deploy Supabase changes. Use this for all SQL and Supabase-related tasks.
от nextblock-cms★ 20 звёзд на GitHubОб этом скилле
Database Management (Supabase)
1. Core Workflow
- Environment: We use Supabase (PostgreSQL + Auth).
- Local Config:
supabase/config.tomlmanages local settings. - Env Vars: Ensure
.env.localis populated with valid Supabase credentials.
2. Key Commands
- Check Migrations:
npm run db:migrate:check- Dry-runs pending remote migrations. Run this before any live migration.
- Push Migrations:
npm run db:migrateornpm run db:push- Applies pending migration files only.
- It does not reset data, seed sandbox media, deploy functions, or push local Supabase config.
- Repair Existing Baseline History:
npm run db:migrate:repair-history:check, thennpm run db:migrate:repair-history- For existing production/shared databases whose schema already exists but whose Supabase migration ledger is missing old baseline versions.
- Marks historical baseline migrations as applied without running their SQL.
- Link Database:
npm run db:link- Links the local development environment to the remote Supabase project.
- Generate Types:
npm run db:types- Generates TypeScript definitions from the database schema. Run this after every schema change.
- Deploy:
npm run deploy:supabase- Deploys migrations and config (often used in CI/CD).
3. Schema Management
- Migrations: SQL migrations are located in
libs/db/src/supabase/migrations. - Production Rule: Always create a new append-only migration for production/shared database changes. Do not rewrite, squash, reorder, delete, or recycle existing migrations once they may have been applied to a real database.
- Data Safety: Never run or recommend
db:reset,sandbox:reset,db:push:sandbox, ordb:migrate:freshagainst a production/shared database containing orders, users, payments, or customer data. - Fresh Databases Only:
npm run db:migrate:freshis only for a brand-new empty database. - No Local Docker: There is no local Supabase Docker instance. The user will usually push DB migrations manually via
npm run db:migrate. Do not attempt to run mutating DB commands yourself unless explicitly asked and the target is confirmed. - Validation: Always verify schema changes are syntactically correct SQL before leaving them for the user to push.
4. Troubleshooting
- CSP/Connection Issues: If the build fails to connect to Supabase, check the Content Security Policy (CSP) headers in
next.config.jsormiddleware.ts. - Url Sync: Ensure
NEXT_PUBLIC_URLmatches yoursite_urlin Supabase config to prevent redirect issues with auth.
Установить database-management в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл database-management?
When you need to modify the database schema, run migrations, or deploy Supabase changes. Use this for all SQL and Supabase-related tasks.
Как установить скилл database-management?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл database-management запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub