Help us improve
Share bugs, ideas, or general feedback.
From sealos
Provisions, connects, and operates Sealos Cloud databases (PostgreSQL, MySQL, MongoDB, Redis) via sealos-cli for local or Devbox development. Wires DATABASE_URL and env vars, manages backups, logs, and public access.
npx claudepluginhub labring/sealos-skills --plugin sealosHow this skill is triggered — by the user, by Claude, or both
Slash command
/sealos:sealos-databaseThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill to give a project a real Sealos Cloud database during development. The default outcome is: identify the app's database need, create or reuse a Sealos database with `sealos-cli`, fetch connection details, wire only the needed local env vars, and verify the app can connect.
Converts Docker Compose files or installation docs into production-grade Sealos (Kubernetes) templates. Automatically analyzes, converts, validates, and outputs without asking for missing fields.
Deploys MySQL, PostgreSQL, MongoDB, or Redis databases on Zeabur and provides connection instructions for local and inter-service access.
Creates managed PostgreSQL or MariaDB databases in Kube-DC Kubernetes projects, configures workload access via secrets and env vars, optional external exposure, and kubectl backups/restores.
Share bugs, ideas, or general feedback.
Use this skill to give a project a real Sealos Cloud database during development. The default outcome is: identify the app's database need, create or reuse a Sealos database with sealos-cli, fetch connection details, wire only the needed local env vars, and verify the app can connect.
.env, .env.local, connection strings, passwords, kubeconfig, or Sealos auth files.database delete, backup-delete, restoring over a name that may collide, or disabling access that an active app depends on.sealos-cli by default and parse it instead of scraping table output.Confirm the working directory with pwd or git rev-parse --show-toplevel.
Run the analyzer when a project directory is available:
node <SKILL_DIR>/scripts/analyze-project-database.mjs <project-dir>
Use the analyzer result as a starting point, then inspect the real files it cites before editing anything. It intentionally avoids printing secret values.
sealos-cliPrefer an existing sealos-cli binary:
sealos-cli --version
sealos-cli database --help
sealos-cli whoami
If it is not installed, use npx -y sealos-cli@latest ... for one-off commands. Ask before installing it globally.
If auth is missing or expired, run:
sealos-cli login <region>
sealos-cli workspace list
sealos-cli workspace current
Use the workspace the user expects. If multiple workspaces exist and the target is ambiguous, ask before provisioning.
List existing databases first:
sealos-cli database list -o json
Reuse an existing database when the name, type, and purpose match. Create a new one when the project has no suitable database or the user asks for a fresh dev database.
Use conservative development defaults unless the project clearly needs more:
sealos-cli database create postgresql --name <app-dev-db> --cpu 1 --memory 1 --storage 3 --replicas 1 -o json
Before creating, check supported versions if version choice matters:
sealos-cli database versions --type postgresql -o json
Supported CLI database types include postgresql, mongodb, mysql, apecloud-mysql, redis, kafka, qdrant, nebula, weaviate, milvus, pulsar, and clickhouse. Use the type detected from the project; default to postgresql only when the project has no database-specific signals.
Poll details until the database is running or connection data is present:
sealos-cli database get <name> -o json
sealos-cli database connection <name> -o json
Read references/sealos-cli-database.md for the current command contract and response handling.
Map the connection into the env var the project already uses:
| Project signal | Preferred env key |
|---|---|
| Prisma, Drizzle, TypeORM, generic Postgres | DATABASE_URL |
| MySQL app with existing MySQL-specific config | DATABASE_URL or existing MYSQL_URL |
| MongoDB app | MONGODB_URI |
| Redis cache/queue | REDIS_URL |
Use the existing local env convention:
.env.local for Next.js and frontend-adjacent projects..env only when the repo already uses it for local development and it is gitignored..env.example as documentation only; never write real secrets there.If a connection string is not directly returned in the desired form, compose it from host, port, username, and password fields from sealos-cli database connection.
Run the project's normal verification path, not just the CLI command:
prisma migrate, drizzle-kit migrate, db:migrate, db:push).sealos-cli database enable-public <name> -o json
sealos-cli database connection <name> -o json
Disable public access after testing if it is no longer needed:
sealos-cli database disable-public <name> -o json
Summarize:
postgres, mysql, mongo, or redis compose services.scripts/analyze-project-database.mjs - read-only project database intent analyzer.references/sealos-cli-database.md - sealos-cli database command contract.references/env-integration.md - safe env-file editing and connection-string mapping.