Token导航 LogoToken导航TokenDH.com
开发权限需确认clawhub未标认证来源可访问clear审计通过

db数据库

Agent Skill

db 用于处理数据库查询、表结构、迁移和数据维护任务,适合在 OpenClaw 中需要分析 schema、编写 SQL 或排查数据问题时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

61,669

周安装

2,649

GitHub Stars

3

下载量

21,616
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:db(数据库)
来源仓库:https://github.com/ivangdavila/db
安装命令:
openclaw skills install db
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install db

简介

用于数据库 Schema 设计与 SQL 查询优化。

  • 避免扩展瓶颈、可靠性与数据完整性陷阱。适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。
  • 支持迁移脚本编写与索引策略建议。db 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 安装前需确认数据库连接权限与只读/写模式。
  • 适用于后端开发团队保障数据层稳定运行。

SKILL.md

name
Database
description
Design and operate databases avoiding common scaling, reliability, and data integrity traps.
metadata
{"clawdbot":{"emoji":"🗃️","os":["linux","darwin","win32"]}}

Database Gotchas

Connection Traps

  • Connection pools exhausted = app hangs silently — set max connections, monitor pool usage
  • Each Lambda/serverless invocation may open new connection — use connection pooling proxy (RDS Proxy, PgBouncer)
  • Connections left open block schema changes — ALTER TABLE waits for all transactions
  • Idle connections consume memory — set connection timeout, kill idle connections

Transaction Gotchas

  • Long transactions hold locks and bloat MVCC — keep transactions short
  • Read-only transactions still take snapshots — can block vacuum/cleanup in Postgres
  • Implicit autocommit varies by database — explicit BEGIN/COMMIT is safer
  • Deadlocks from inconsistent lock ordering — always lock tables/rows in same order
  • Lost updates from read-modify-write without locking — use SELECT FOR UPDATE or optimistic locking

Schema Changes

  • Adding column with default rewrites entire table in old MySQL/Postgres — use NULL default, backfill, then alter
  • Index creation locks writes in some databases — use CONCURRENTLY in Postgres, ONLINE in MySQL 8+
  • Renaming column breaks running application — add new column, migrate, drop old
  • Dropping column with active queries causes errors — deploy code change first, then schema change
  • Foreign key checks slow bulk inserts — disable constraints, insert, re-enable

Backup and Recovery

  • Logical backups (pg_dump, mysqldump) lock tables or miss concurrent writes — use consistent snapshot
  • Point-in-time recovery requires WAL/binlog retention — configure before you need it
  • Backup verification: restore regularly — backups that can't restore aren't backups
  • Replication lag during backup can cause inconsistency — backup from replica, verify consistency

Replication Traps

  • Replication lag means stale reads — check lag before trusting replica data
  • Writes to replica corrupt replication — make replicas read-only
  • Schema changes can break replication — replicate schema changes, don't apply separately
  • Split-brain after failover loses writes — use fencing/STONITH to prevent
  • Promoting replica doesn't redirect connections — application must reconnect to new primary

Query Patterns

  • N+1 queries from ORM lazy loading — eager load relationships or batch queries
  • Missing indexes on foreign keys slows joins and cascading deletes
  • Large IN clauses become slow — batch into multiple queries or use temp table
  • COUNT(*) on large tables is slow — use approximate counts or cache
  • SELECT without LIMIT on unbounded data risks OOM

Data Integrity

  • Application-level unique checks have race conditions — use database constraints
  • Check constraints often disabled for "flexibility" then data corrupts — keep them on
  • Orphan rows from missing foreign keys — add constraints retroactively, clean up first
  • Timezone confusion: store UTC, convert on display — never store local time without zone
  • Floating point for money causes rounding errors — use DECIMAL or integer cents

Scaling Limits

  • Single table over 100M rows needs sharding strategy — plan before you hit it
  • Autovacuum falling behind causes table bloat — monitor dead tuple ratio
  • Query planner statistics stale after bulk changes — ANALYZE after large imports
  • Connection count doesn't scale linearly — more connections = more lock contention
  • Disk IOPS often bottleneck before CPU — monitor I/O wait

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

85.53%
按下载量换算18,488

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills