Install
openclaw skills install safeagentdbSets up and maintains SafeAgentDB-style database safety infrastructure for AFK agentic development. Use when integrating isolated local, develop, preview, and production database workflows; configuring Supabase/Vercel/GitHub Actions previews; adding migration guardrails; packaging SafeAgentDB into a project; or adapting branch-safe database infrastructure to another stack.
openclaw skills install safeagentdbUse this skill when the user wants to install, adapt, audit, package, or maintain SafeAgentDB-style infrastructure in a project.
SafeAgentDB is database safety infrastructure for AFK agentic development. It helps multi-agent teams create testable PRs and live preview URLs backed by isolated database environments, without risking production or shared development data.
Set up or adapt a workflow where:
main -> production app + production database
develop -> staging app + persistent develop database
feature/* -> preview app + isolated preview database
agent/* -> preview app + isolated preview database
local -> local app + local Docker database
The default implementation is built for:
If the target project does not use this stack, this skill is no longer prescriptive. Use the target codebase, target platform docs, and the user's judgment to design the equivalent infrastructure. Explain what this skill does not cover and what decisions the user needs to make before editing.
This skill is self-contained. Read the bundled references as needed:
references/setup-process.md for the end-to-end install flow.references/credentials.md before asking for tokens or setting secrets.references/data-hydration-policy.md before creating develop or preview databases.references/local-development.md when adding local database development.references/non-standard-stacks.md if the target project is not Supabase + Vercel + GitHub Actions.references/troubleshooting.md when debugging previews, hydration, migrations, or costs after setup.references/agent-operating-rules.md when adding ongoing maintenance rules to the target project's docs.references/agent-packaging.md if the user wants Cursor, Codex, or Claude Code packaging.Use bundled templates from:
templates/branching-config.example.jsontemplates/package-scripts.jsontemplates/package-dev-dependencies.jsontemplates/docs/database-branching.mdtemplates/scripts/supabase/templates/scripts/ci/templates/.github/workflows/templates/agent-instructions/Inspect the target project before editing. Determine:
supabase/config.toml, supabase/migrations/, supabase/seed.sqlAfter inspection, summarize the current state and proposed setup before making infrastructure changes. Do not start by copying templates.
Treat these concepts as the portable infrastructure:
Git branch model
main / develop / feature-* / agent-* / local
Database environment model
production database
persistent develop database
disposable preview databases
local Docker database
Migration model
committed migration files
local reset before push
preview-only feature migrations
develop migrations after merge
production migrations from main
Preview deployment model
create preview database
hydrate or seed preview database
set branch-scoped deployment env vars
rebuild/redeploy preview app
clean up preview database and env vars when branch closes
Credential model
provider access tokens in secret stores
non-secret project refs in config
no committed service keys or local env files
Supabase, Vercel, and GitHub Actions are the default implementation, not the only possible implementation.
If the target project uses a different stack, map each concept before editing:
Supabase branches -> database branch/clone/ephemeral DB equivalent
Supabase migrations -> target project's migration system
Supabase Auth -> target auth provider or user seed/copy process
Supabase Storage -> target object storage provider
Vercel previews -> target preview deployment system
Vercel branch env vars -> target environment variable mechanism
GitHub Actions -> target CI/CD runner and secret store
Read references/non-standard-stacks.md, explain the adaptation plan to the user, and only then implement.
templates/docs/database-branching.md into the project, fill in the placeholders as the proposed plan, and review that document with the user. The approved document stays in the repo as the source of truth and decision record.npm run preview:provision -- <branch> --dry-run for the cloud path.Install or adapt:
templates/docs/database-branching.md) covering branch model, hydration policy, secrets, OAuth callbacks, and debuggingRecommended hydration default:
production/default schema -> persistent develop
persistent develop data -> feature/agent previews
local Docker database -> migrations + seed only
Do not copy production data into previews unless the user explicitly approves it and confirms privacy/compliance requirements.
Read references/data-hydration-policy.md before implementing hydration.
.env.local, service role keys, access tokens, or preview passwords.Before running commands that require external access, explain what credentials are needed, why they are needed, where they will be stored, and ask the user for permission. Do not ask the user to paste secrets into committed files.
Read references/credentials.md for the exact checklist.
If the user asks to install SafeAgentDB as a skill:
.cursor/skills/safeagentdb/SKILL.md.agents/skills/safeagentdb/SKILL.md.claude/skills/safeagentdb/SKILL.mdAGENTS.mdCLAUDE.mdIf the user is using npx skills add, this skill should be discoverable from the repository skills/safeagentdb/SKILL.md.
Read references/agent-packaging.md before adding agent-specific files.
When finished, report: