Agent skill

Database Admin

by LeoYeAI in LeoYeAI/openclaw-master-skills

Comprehensive database administration, schema management, data operations, and optimization.

MITAuto-check passedDatabases

Install Database Admin

skills CLI
$ npx skills add LeoYeAI/openclaw-master-skills --skill database-admin -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install LeoYeAI/openclaw-master-skills database-admin --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/database-admin .claude/skills/database-admin && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
database-admin
GitHub stars
2.2k
Token cost
~552 tokens
SKILL.md length
110 words
Files
16 (incl. scripts, references)
Skills in repo
1,215
Repo updated
First seen
Licence
MIT

At a glance

Comprehensive database administration, schema management, data operations, and optimization.

  • Codex needs to:
  • SKILL.md covers 核心能力, 使用场景, 技术细节 and 数据库配置(roadflow), plus 1 more section
  • Runs JavaScript scripts from its folder
  • Modify database tables with proper indexing

What it does

Database Admin is an agent skill from LeoYeAI/openclaw-master-skills. Comprehensive database administration, schema management, data operations, and optimization. Use when Codex needs to: (1) Create or modify database tables with proper indexing, (2) Perform bulk data insertions with type safety and constraint handling, (3) Execute complex queries with JOINs, aggregations, and subqueries, (4) Optimize query performance through indexing and execution plan analysis, (5) Manage database backups, restores, and migrations, (6) Handle special data types (BIGINT, UUID, JSONB, enums), (7)…

Its SKILL.md is about 550 tokens, which your agent loads only when the skill is triggered. The skill folder holds 18 other files, including scripts and reference files (for example `.clawhub/origin.json`, `_meta.json` and `query_kaoqin_forms.js`).

It sits in Databases, covering Database administration, Query optimization and Type safety. The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.

When your agent uses it

  • Codex needs to:
  • Modify database tables with proper indexing
  • Perform bulk data insertions with type safety and constraint handling
  • Execute complex queries with JOINs

Example prompts

  • “/database-admin”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 7 files in scripts/ (JavaScript), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Database Admin loads about 552 tokens when it runs, and up to ~3k if it reads all its reference files. Until then it costs about 175 tokens; SKILL.md has 110 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~175
When it runs · the whole SKILL.md, loaded when a task matches
~552
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 110 words, ~552 tokens.

Download SKILL.mdSave it as .claude/skills/database-admin/SKILL.md (or your agent's skills folder). This skill also uses 15 other files; get the full folder from GitHub.
name
database-admin
description
Comprehensive database administration, schema management, data operations, and optimization. Use when Codex needs to: (1) Create or modify database tables with proper indexing, (2) Perform bulk data insertions with type safety and constraint handling, (3) Execute complex queries with JOINs, aggregations, and subqueries, (4) Optimize query performance through indexing and execution plan analysis, (5) Manage database backups, restores, and migrations, (6) Handle special data types (BIGINT, UUID, JSONB, enums), (7) Implement transactional safety with ACID compliance, or (8) Debug and resolve database errors including constraint violations, type mismatches, and foreign key issues

数据库管理员 Database Admin 📜

"先严父后慈" —— 杜子美

本技能提供全面的数据库管理功能,包括表结构创建、数据操作、查询优化、类型处理(如 BIGINT)等。所有操作均遵循 SQL 最佳实践和事务安全原则。

核心能力

🔹 表结构设计
  • 自动设计最优表结构(主键、索引、约束)
  • 支持多种数据类型(TEXT、VARCHAR、BIGINT、UUID、JSONB、ENUM)
  • 自动创建适当的索引以提高查询性能
  • 设置外键约束和检查约束
  • 处理 NULL 值和默认值策略
🔹 数据插入
  • 批量插入大量数据(使用事务优化)
  • 处理 BIGINT 等大数类型数据
  • 验证数据类型兼容性
  • 避免主键冲突和外键违规
🔹 查询优化
  • 编写高效的 JOIN 查询
  • 聚合统计和分析查询
  • 子查询和 CTE 的使用
  • 执行计划分析和优化建议
🔹 数据库维护
  • CREATE TABLE、ALTER TABLE、DROP TABLE
  • INDEX 创建和 DROP INDEX
  • TRUNCATE 清空表(保留结构)
  • VACUUM 分析表
  • 备份和恢复操作

使用场景

当你需要以下操作时,请触发此技能:

  • "创建一个用户表,包含用户名、邮箱、注册时间"
  • "向 products 表中插入这些商品数据..."
  • "查询所有销售额超过 10 万元的订单"
  • "为 orders 表的 customer_id 创建索引"
  • "将 text_column 从 TEXT 转换为 VARCHAR(255)"
  • "批量导入 10 万条记录,使用事务优化"
  • "修复 BIGINT 类型数据溢出问题"

技术细节

本技能在幕后会使用:

  • 驱动: pg (PostgreSQL)
  • 连接池: pgpool 管理并发连接
  • 批量插入: 使用 COPY 或批量 INSERT 优化性能
  • 事务控制: 自动开启/提交事务,保证 ACID 属性
  • 错误处理: 捕获并报告约束违规、类型不匹配等

数据库配置(roadflow)

  • 主机: 192.168.1.136
  • 端口: 35438
  • 用户: postgres
  • 密码: Hxkj510510
  • 目标库: roadflow

示例用法

创建表
创建一个库存表 stock_info,包含:
- id (SERIAL PRIMARY KEY)
- product_name (VARCHAR(100))
- quantity (INT)
- price (DECIMAL(10,2))
- created_at (TIMESTAMP)
- 为 product_name 创建索引
插入数据
向 stock_info 表插入以下商品:
[{product_name: "苹果", quantity: 100, price: 8.5}, ...]
查询统计
计算每个类别的商品平均价格
WHERE quantity > 50
GROUP BY category
ORDER BY avg_price DESC

技能由杜甫(📜)编写,秉承"致君尧舜上,再使风俗淳"的务实精神

© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 15 other files (scripts, references) in skills/database-admin of LeoYeAI/openclaw-master-skills.

  • SKILL.md
  • .clawhub/origin.json
  • _meta.json
  • create_kaoqin_form.sql
  • init.sql
  • query_kaoqin_forms.js
  • query_rf_form.js
  • references/DB_SCHEMA.md
  • references/USAGE_GUIDE.md
  • scripts/backup_restore.js
  • scripts/create_table.js
  • scripts/insert_bulk.js
  • scripts/jsonb_handler.js
  • scripts/query_helper.js
  • scripts/query_optimizer.js
  • scripts/schema_migrate.js

Open the folder on GitHubat commit e5199b5

Compare with similar skills

Database Admin next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Database Admin compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Database Admin this skillLeoYeAI/openclaw-master-skills2.2k—~552Automated safety check: PassMIT
Postgres Expertcin12211/orca-q223—~5.5kAutomated safety check: PassMIT
Prisma Expertdavila7/claude-code-templates32k6 repos~2.6kAutomated safety check: PassMIT
Postgres ExpertRightNow-AI/openfang18k—~830Automated safety check: PassApache-2.0
Postgres Optimizationrohitg00/awesome-claude-code-toolkit2.7k—~1.1kAutomated safety check: PassApache-2.0
Relational Data Modelingpproenca/dot-skills214—~2.4kAutomated safety check: PassMIT

Similar skills

  • Postgres Expert

    cin12211/orca-q

    PostgreSQL query optimization, JSONB operations, advanced indexing strategies, partitioning, connection management, and database administration.

    223 GitHub stars~5.5k tokensUpdated 16 days ago
    DatabasesAuto-check passed
  • Prisma Expert

    davila7/claude-code-templates

    Prisma ORM expert for schema design, migrations, query optimization, relations modeling, and database operations.

    32k GitHub starsUsed in 6 repos~2.6k tokens
    DatabasesAuto-check passed
  • Postgres Expert

    RightNow-AI/openfang

    PostgreSQL expert for query optimization, indexing, extensions, and database administration

    18k GitHub stars~830 tokensUpdated 3 mo ago
    DatabasesAuto-check passed
  • Postgres Optimization

    rohitg00/awesome-claude-code-toolkit

    PostgreSQL optimization including indexes, query plans, partitioning, JSONB operations, and connection pooling

    2.7k GitHub stars~1.1k tokensUpdated 4 mo ago
    DatabasesAuto-check passed
  • Relational Data Modeling

    pproenca/dot-skills

    Corrects the wrong defaults a model has when designing a relational schema — the DDL decisions an experienced engineer makes differently.

    214 GitHub stars~2.4k tokensUpdated 1 mo ago
    DatabasesAuto-check passed
  • Database Architect

    FerroxLabs/wayland

    Database schema design expertise covering normalization, denormalization strategies, indexing, query optimization, partitioning, connection pooling, migration management, multi-tenancy patterns, and…

    608 GitHub stars~4k tokensUpdated yesterday
    DatabasesAuto-check passed

More from LeoYeAI/openclaw-master-skills

All 1,215 skills in this repo
  • DevOps Pipeline Management

    LeoYeAI/openclaw-master-skills

    Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.

    2.2k GitHub stars~4.2k tokensUpdated 2 mo ago
    Auto-check: notes
  • Feishu Document Collaboration

    LeoYeAI/openclaw-master-skills

    Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.

    2.2k GitHub stars~2k tokensUpdated 2 mo ago
    Auto-check passed
  • Files Memory System

    LeoYeAI/openclaw-master-skills

    Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.

    2.2k GitHub stars~3.8k tokensUpdated 2 mo ago
    Auto-check passed
  • GEO-Claw AI Visibility Agent

    LeoYeAI/openclaw-master-skills

    Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.

    2.2k GitHub stars~4.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Google Workspace CLI

    LeoYeAI/openclaw-master-skills

    Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.

    2.2k GitHub stars~2.6k tokensUpdated 2 mo ago
    Auto-check: notes
  • HealthFit Health Advisors

    LeoYeAI/openclaw-master-skills

    Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.

    2.2k GitHub stars~4.4k tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Database Admin

What does Database Admin do?

Comprehensive database administration, schema management, data operations, and optimization. Database Admin is an agent skill from LeoYeAI/openclaw-master-skills. Comprehensive database administration, schema management, data operations, and optimization.

When should I use Database Admin?

Database Admin fits situations like: Codex needs to:; modify database tables with proper indexing; perform bulk data insertions with type safety and constraint handling; execute complex queries with JOINs.

How do I install Database Admin in Claude Code?

Run `npx skills add LeoYeAI/openclaw-master-skills --skill database-admin -a claude-code`. Or copy the skill folder (skills/database-admin in LeoYeAI/openclaw-master-skills) into .claude/skills/database-admin in your project. Claude Code loads it when a task matches its description.

How do I install Database Admin in Codex?

Run `npx skills add LeoYeAI/openclaw-master-skills --skill database-admin -a codex`. Or copy the skill folder (skills/database-admin in LeoYeAI/openclaw-master-skills) into .agents/skills/database-admin in your project. Codex loads it when a task matches its description.

Can I use Database Admin in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --skill database-admin -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/database-admin, .gemini/skills/database-admin, .github/skills/database-admin and .opencode/skills/database-admin in your project.

What does Database Admin need to run?

Going by SKILL.md and its folder, Database Admin needs JavaScript for the scripts in its folder. Our summary lists: Node.js.

Does Database Admin access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Database Admin safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Database Admin use?

Database Admin is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Database Admin use?

About 552 tokens (SKILL.md is roughly 2.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.4k tokens, read only when the agent opens those files.

What are the alternatives to Database Admin?

Skills that share tags, products or a category with Database Admin: Postgres Expert (cin12211/orca-q, 223 stars), Prisma Expert (davila7/claude-code-templates, 32k stars), Postgres Expert (RightNow-AI/openfang, 18k stars) and Postgres Optimization (rohitg00/awesome-claude-code-toolkit, 2.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Database Admin?

LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,158 GitHub stars. The repository holds 1,215 skills in this directory. The repository was last updated on July 20, 2026.

Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.