← 返回 Skills 市场
aidan945

Safeagentdb

作者 Aidan Zarski · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ⚠ suspicious
39
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install safeagentdb
功能描述
Sets up and maintains SafeAgentDB-style database safety infrastructure for AFK agentic development. Use when integrating isolated local, develop, preview, an...
使用说明 (SKILL.md)

SafeAgentDB

Use 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.

Mission

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:

  • Supabase for Postgres, Auth, Storage, migrations, and database branches
  • Vercel for production, staging, and preview deployments
  • GitHub Actions for branch and PR automation

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.

Bundled Files

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.json
  • templates/package-scripts.json
  • templates/package-dev-dependencies.json
  • templates/docs/database-branching.md
  • templates/scripts/supabase/
  • templates/scripts/ci/
  • templates/.github/workflows/
  • templates/agent-instructions/

Required First Step

Inspect the target project before editing. Determine:

  • framework and package manager
  • database provider
  • auth provider
  • object storage provider
  • deployment provider
  • CI provider
  • migration system
  • branch model
  • environment variable names
  • whether production, develop/staging, preview, and local database workflows already exist
  • whether Supabase CLI files exist: supabase/config.toml, supabase/migrations/, supabase/seed.sql
  • whether migrations are committed or SQL is managed manually in a dashboard
  • which database should initialize or hydrate persistent develop
  • which database should hydrate feature/agent preview databases
  • whether auth users, public table data, and storage objects should be copied into previews

After inspection, summarize the current state and proposed setup before making infrastructure changes. Do not start by copying templates.

Infrastructure Map

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.

Porting To Other Stacks

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.

Core Workflow

  1. Summarize the target project's current state.
  2. Copy 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.
  3. Explain needed credentials and costs, and ask permission before using or setting anything. Database branching is billed per branch-hour; confirm the user's plan supports it.
  4. Confirm the data hydration policy before copying data.
  5. Install or adapt scripts, workflows, package scripts, config, and docs.
  6. Validate with safe local and CI checks, including npm run preview:provision -- \x3Cbranch> --dry-run for the cloud path.
  7. Report changed files, remaining secrets/config, and testing steps.

Install Or Adapt

Install or adapt:

  • local database command that points env vars at local services without overwriting unrelated env values
  • persistent develop/staging database workflow
  • feature/agent preview database provisioning
  • Vercel preview env-var wiring so each preview deployment points at its matching preview database
  • preview redeploy behavior after env vars change, because frontend public env vars are build-time values
  • migration deployment workflow for develop and main
  • guardrails so feature migrations stay on feature previews until merge
  • optional auth user copying with preview password reset
  • optional public table data copying with include/exclude lists
  • optional storage bucket creation and object copying
  • cleanup automation for closed or deleted preview branches
  • scheduled orphan preview cleanup for deleted Git branches
  • optional persistent preview environments (long-lived design/demo branches with custom domains) that cleanup skips
  • migration safety checks for duplicate timestamps and destructive SQL
  • a committed branching architecture doc (from templates/docs/database-branching.md) covering branch model, hydration policy, secrets, OAuth callbacks, and debugging
  • optional agent packaging as a Cursor/Codex/Claude Code skill or project instruction file, only if the user wants it

Data Source Rule

Recommended 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.

Safety Rules

  • Never commit secrets, .env.local, service role keys, access tokens, or preview passwords.
  • Never point agent feature work at production.
  • Never copy production data into previews without explicit user approval.
  • Never apply feature-branch migrations to shared develop until merge.
  • Keep production, develop, preview, and local databases separate.
  • Preserve unrelated user changes.
  • If the stack differs from Supabase/Vercel/GitHub Actions, stop and propose an adapted plan before editing.

Credential Rule

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.

Packaging Guidance

If the user asks to install SafeAgentDB as a skill:

  • Cursor project skill: .cursor/skills/safeagentdb/SKILL.md
  • Cursor/Codex cross-agent project skill: .agents/skills/safeagentdb/SKILL.md
  • Claude Code project skill: .claude/skills/safeagentdb/SKILL.md
  • Codex always-on instructions: AGENTS.md
  • Claude Code always-on instructions: CLAUDE.md

If 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.

Done Criteria

When finished, report:

  • files changed
  • credentials still required
  • where secrets were stored, without revealing values
  • what database develop is initialized from
  • what database previews are hydrated from
  • whether auth users, public data, and storage are copied or seeded
  • how to test local dev, develop/staging, feature preview, and production migration paths
  • validation commands run, including the provision dry-run output
  • where the branching architecture doc lives in the repo
安全使用建议
Install only if you intend to give the agent controlled access to Supabase, Vercel, and GitHub automation. Before enabling it, review the hydration settings, keep copyAuthUsers and copyPublicData off unless you explicitly need them, avoid copying production data into previews, scope provider tokens tightly, and confirm that service-role keys used in Vercel previews cannot reach client code or logs.
能力标签
requires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
The Supabase, Vercel, GitHub, migration, preview-branch, and credential capabilities fit the stated SafeAgentDB purpose, and the docs repeatedly disclose that secrets and user approval are required.
Instruction Scope
The skill asks for a plan, approval, dry runs, and conservative defaults, but the executable templates do not enforce strong runtime confirmation or hard target-environment validation before sensitive operations such as auth sync, table truncation, migration application, and Vercel secret updates.
Install Mechanism
Installation is template-based and user-directed, with package scripts and optional agent instructions; no hidden install-time execution was found, but adopting the scripts changes local dev and CI behavior around database environment switching.
Credentials
Cloud tokens, service-role keys, branch-scoped Vercel environment variables, Supabase Admin APIs, and database connections are proportionate to the purpose but high impact, especially because the preview service-role key is set in Vercel preview envs by default.
Persistence & Privilege
The skill can create and delete Supabase branches, remove Vercel preview env vars, write Supabase keys into .env.local, and optionally persist always-on agent instructions; these are disclosed, but privileged enough to merit review.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install safeagentdb
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /safeagentdb 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
Script templates converted to fully typed TypeScript (passes tsc --strict). Run via tsx. Adds dry-run provisioning, persistent preview environments, auth pagination, and hydration row counts.
v1.0.0
Initial release: isolated local, develop, preview, and production database workflows for parallel agentic development. Supabase + Vercel + GitHub Actions templates with adaptation guidance for other stacks.
元数据
Slug safeagentdb
版本 1.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Safeagentdb 是什么?

Sets up and maintains SafeAgentDB-style database safety infrastructure for AFK agentic development. Use when integrating isolated local, develop, preview, an... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 39 次。

如何安装 Safeagentdb?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install safeagentdb」即可一键安装,无需额外配置。

Safeagentdb 是免费的吗?

是的,Safeagentdb 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Safeagentdb 支持哪些平台?

Safeagentdb 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Safeagentdb?

由 Aidan Zarski(@aidan945)开发并维护,当前版本 v1.1.0。

💬 留言讨论