Agent skill

Expert Database

by ReJeCtAll in ReJeCtAll/ExpertTeam-Codex

数据库优化专家入口。用于 Codex CLI 的 $expert-database 调用. An agent skill from ReJeCtAll/ExpertTeam-Codex.

MITAuto-check passedDatabases

Install Expert Database

skills CLI
$ npx skills add ReJeCtAll/ExpertTeam-Codex --skill expert-database -a claude-code

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

GitHub CLI
$ gh skill install ReJeCtAll/ExpertTeam-Codex expert-database --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/ReJeCtAll/ExpertTeam-Codex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/expert-database .claude/skills/expert-database && 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
expert-database
GitHub stars
113
Token cost
~692 tokens
SKILL.md length
109 words
Files
2
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

数据库优化专家入口。用于 Codex CLI 的 $expert-database 调用. An agent skill from ReJeCtAll/ExpertTeam-Codex.

  • Works in 6 steps: 建立事实基线:确认数据库类型、版本、表规模、索引、查询、慢日志、连接数、事务模型和… → 识别瓶颈与风险:按影响、频率、写入成本、锁风险、回滚难度和可观测性标记… → 设计目标方案:给出 SQL、索引、Schema、迁移、连接池或监控方案,并说明取舍。 → …
  • Tasks that involve SQL
  • SKILL.md covers 定位, Codex CLI 调用方式, Agent and 参数化路由, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Expert Database is an agent skill from ReJeCtAll/ExpertTeam-Codex. 数据库优化专家入口。用于 Codex CLI 的 $expert-database 调用。 适用于数据库 Schema 设计、SQL 查询优化、索引策略、执行计划分析、连接池、慢查询治理、安全迁移、PostgreSQL/MySQL/Supabase/PlanetScale 性能调优。 触发词:数据库、SQL、PostgreSQL、MySQL、Supabase、PlanetScale、EXPLAIN、索引、慢查询、N+1、连接池、迁移、Schema、查询优化

Its SKILL.md is about 690 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Databases, covering SQL and Database schema design. It works with SQL, Supabase, MySQL and PlanetScale. The repository describes itself as: 一套可直接安装到 ~/.codex 的专家配置,面向 Codex CLI / Codex App 桌面版的 Skill 调用方式 提供 3 个专家团、3 个单专家与 1 个总路由入口。 The licence is MIT.

When your agent uses it

  • Tasks that involve SQL
  • Tasks that involve Database schema design

Example prompts

  • “/expert-database”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. 建立事实基线:确认数据库类型、版本、表规模、索引、查询、慢日志、连接数、事务模型和业务访问模式。缺少数据时明确假设,不伪造指标。
  2. 识别瓶颈与风险:按影响、频率、写入成本、锁风险、回滚难度和可观测性标记 P0/P1/P2。
  3. 设计目标方案:给出 SQL、索引、Schema、迁移、连接池或监控方案,并说明取舍。
  4. 制定变更计划:包含预检查、灰度、回滚条件、观察窗口和生产注意事项。
  5. 验证结果:使用 EXPLAIN ANALYZE、慢查询日志、pg_stat_statements、云数据库 Query Insights、压测或指标对比验证。
  6. 形成报告:输出结论、证据、行动项、风险接受建议和后续优化路线图。

What it can do on your machine

Read from SKILL.md and the folder at commit 59c573b. 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

    No scripts in the folder and no shell commands in SKILL.md.

    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

Expert Database loads about 692 tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 109 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~692

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from ReJeCtAll/ExpertTeam-Codex at commit 59c573b, republished under its MIT licence (© ReJeCtAll). 109 words, ~692 tokens.

Download SKILL.mdSave it as .claude/skills/expert-database/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
expert-database
description
数据库优化专家入口。用于 Codex CLI 的 $expert-database 调用。 适用于数据库 Schema 设计、SQL 查询优化、索引策略、执行计划分析、连接池、慢查询治理、安全迁移、PostgreSQL/MySQL/Supabase/PlanetScale 性能调优。 触发词:数据库、SQL、PostgreSQL、MySQL、Supabase、PlanetScale、EXPLAIN、索引、慢查询、N+1、连接池、迁移、Schema、查询优化

Expert Database - 数据库优化专家

你现在启动单专家模式的 数据库优化专家,Agent ID 为 database-optimization-expert。

定位

面向数据库设计、性能调优和迁移安全问题,输出基于执行计划、索引成本、访问模式和生产变更风险的可验证方案。默认以 PostgreSQL 为主要领域,同时覆盖 MySQL、Supabase、PlanetScale 和现代关系型数据库实践。

Codex CLI 调用方式

text
$expert-database <database optimization request>
$expert-database --schema <schema design or normalization request>
$expert-database --query <SQL query optimization request>
$expert-database --index <indexing strategy request>
$expert-database --migration <safe migration or zero-downtime DDL request>
$expert-database --pooling <connection pooling and connection limit request>
$expert-database --review <database design or SQL review request>
$expert-database --full <complete database health assessment>

注意:Codex CLI 当前使用 $skill-name 调用 Skill,不一定识别 /expert-database Slash Command。

Agent

如环境支持 Agents,优先读取并采用:

  • ~/.codex/agents/database-optimization-expert.md

如环境不支持独立 Agent 调度,则由当前会话按本 Skill 的规则执行。

参数化路由

  • --schema:Schema 设计、表结构、约束、范式化与反范式化、数据保留策略。
  • --query:SQL 优化、执行计划解读、慢查询定位、N+1 查询治理。
  • --index:B-tree、GIN、GiST、BRIN、部分索引、表达式索引、复合索引和写入成本评估。
  • --migration:可逆迁移、零停机 DDL、分批回填、双写、锁风险和回滚方案。
  • --pooling:PgBouncer、Supabase Pooler、serverless 连接治理、连接数上限和事务模式。
  • --review:审查已有数据库设计、ORM 查询、SQL、迁移脚本或索引方案。
  • --full:完整数据库健康评估,覆盖 Schema、查询、索引、迁移、连接池、监控和容量。

未提供参数时,根据用户意图选择单一方向;同时涉及三个及以上方向时使用完整数据库健康评估。

执行流程

  1. 建立事实基线:确认数据库类型、版本、表规模、索引、查询、慢日志、连接数、事务模型和业务访问模式。缺少数据时明确假设,不伪造指标。
  2. 识别瓶颈与风险:按影响、频率、写入成本、锁风险、回滚难度和可观测性标记 P0/P1/P2。
  3. 设计目标方案:给出 SQL、索引、Schema、迁移、连接池或监控方案,并说明取舍。
  4. 制定变更计划:包含预检查、灰度、回滚条件、观察窗口和生产注意事项。
  5. 验证结果:使用 EXPLAIN ANALYZE、慢查询日志、pg_stat_statements、云数据库 Query Insights、压测或指标对比验证。
  6. 形成报告:输出结论、证据、行动项、风险接受建议和后续优化路线图。

生产与数据安全边界

  • 默认先做只读分析;没有用户明确授权时,不直接修改生产数据库。
  • 任何可能锁表、删除数据、改变约束、影响写入路径、增加长期成本或改变数据语义的操作,都必须先说明风险、影响范围、预检查和回滚方案。
  • 示例 SQL 必须标注数据库类型和版本假设;无法核实时说明假设。
  • 真实连接串、密码、Token、客户数据和个人敏感信息必须脱敏,禁止硬编码。
  • 性能优化建议必须包含验证方式;不能只给索引名或 SQL 片段。
  • 不把 CREATE INDEX、ALTER TABLE、批量回填等生产 DDL/DML 描述为未经适配即可直接执行。

交付要求

最终输出应包含:

  • TL;DR:核心结论、最高优先级数据库风险和推荐下一步。
  • 事实与假设:数据库类型、版本、表规模、查询模式、已有索引和缺失信息。
  • 发现摘要:P0/P1/P2、类别、问题、影响、证据和状态。
  • 优化方案:SQL、索引、Schema、连接池、迁移或监控改造,包含取舍和副作用。
  • 变更安全:预检查、回滚、灰度、观察窗口和生产注意事项。
  • 验证方式:执行计划、监控指标、压测、日志或回归测试。

协作边界

  • 需要改业务代码、ORM 查询、测试或批处理时,转交 $expert-software。
  • 需要调整数据库实例、备份、云监控、连接代理或生产基础设施时,转交 $expert-ops。
  • 涉及 SQL 注入、敏感数据访问、审计或合规风险时,转交 $expert-security。
  • 涉及性能 SLO、成本优先级或数据保留策略的产品决策时,转交 $expert-product。

请使用与用户原始需求一致的语言输出。

© ReJeCtAll, 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 1 other file in .codex/skills/expert-database of ReJeCtAll/ExpertTeam-Codex.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 59c573b

Compare with similar skills

Expert Database 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.

Expert Database compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Expert Database this skillReJeCtAll/ExpertTeam-Codex113—~692Automated safety check: PassMIT
Golang Databaseunxed/f42402 repos~2.9kAutomated safety check: PassMIT
SQL ProJeffallan/claude-skills12k—~1.3kAutomated safety check: PassMIT
SQL Queriesphuryn/pm-skills27k—~907Automated safety check: PassMIT
Lunora Setup Hyperdrive Globalanolilab/lunora283—~1.9kAutomated safety check: PassCustom licence
Memstack Security Rls Guardiancwinvestments/memstack423—~3.4kAutomated safety check: PassProprietary

Similar skills

  • Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…

    240 GitHub starsUsed in 2 repos~2.9k tokens
    DatabasesAuto-check passed
  • SQL Pro

    Jeffallan/claude-skills

    Optimizes SQL queries and designs schemas using CTEs, window functions, covering indexes and EXPLAIN ANALYZE, with notes on dialect differences between major databases.

    12k GitHub stars~1.3k tokensUpdated 4 days ago
    DatabasesAuto-check passed
  • SQL Queries

    phuryn/pm-skills

    Generate SQL queries from natural language descriptions. An agent skill from phuryn/pm-skills.

    27k GitHub stars~907 tokensUpdated 22 days ago
    DatabasesAuto-check passed
  • Use PlanetScale (Postgres/MySQL via Cloudflare Hyperdrive) as a first-class, REACTIVE .global() storage backend for a Lunora app — and migrate an existing D1 .global() dataset to it.

    283 GitHub stars~1.9k tokensUpdated today
    DatabasesAuto-check passed
  • Memstack Security Rls Guardian

    cwinvestments/memstack

    A skill your agent uses when creating or altering database tables in Supabase or PostgreSQL projects.

    423 GitHub stars~3.4k tokensUpdated 10 days ago
    DatabasesAuto-check passed
  • Agent SQL Pro

    xiaoyuge886/aigc

    Expert SQL developer specializing in complex query optimization, database design, and performance tuning across PostgreSQL, MySQL, SQL Server, and Oracle.

    198 GitHub stars~315 tokensUpdated 2 mo ago
    DatabasesAuto-check passed

More from ReJeCtAll/ExpertTeam-Codex

All 12 skills in this repo
  • Product Playbook

    ReJeCtAll/ExpertTeam-Codex

    产品战略团队完整手册。覆盖需求文档撰写、路线图管理、竞品分析、用户研究综合、指标评审、Sprint规划、干系人沟通和产品头脑风暴全流程。当涉及任何产品管理相关的请求时自动触发。

    113 GitHub starsUsed in 1 repo~998 tokens
    Auto-check passed
  • Expert Design

    ReJeCtAll/ExpertTeam-Codex

    设计原型专家团入口。用于 Codex CLI 的 $expert-design 调用. An agent skill from ReJeCtAll/ExpertTeam-Codex.

    113 GitHub stars~441 tokensUpdated 3 mo ago
    Auto-check passed
  • Expert Ops

    ReJeCtAll/ExpertTeam-Codex

    基础设施运维专家入口。用于 Codex CLI 的 $expert-ops 调用. An agent skill from ReJeCtAll/ExpertTeam-Codex.

    113 GitHub stars~625 tokensUpdated 3 mo ago
    Auto-check passed
  • Expert Product

    ReJeCtAll/ExpertTeam-Codex

    产品战略团队专家团入口。用于 Codex CLI 的 $expert-product 调用. An agent skill from ReJeCtAll/ExpertTeam-Codex.

    113 GitHub stars~430 tokensUpdated 3 mo ago
    Auto-check passed
  • Expert Security

    ReJeCtAll/ExpertTeam-Codex

    安全专家入口。用于 Codex CLI 的 $expert-security 调用. An agent skill from ReJeCtAll/ExpertTeam-Codex.

    113 GitHub stars~780 tokensUpdated 3 mo ago
    Auto-check passed
  • Expert Software

    ReJeCtAll/ExpertTeam-Codex

    软件开发团队专家团入口。用于 Codex CLI 的 $expert-software 调用. An agent skill from ReJeCtAll/ExpertTeam-Codex.

    113 GitHub stars~467 tokensUpdated 3 mo ago
    Auto-check passed

Categories

Questions about Expert Database

What does Expert Database do?

数据库优化专家入口。用于 Codex CLI 的 $expert-database 调用. An agent skill from ReJeCtAll/ExpertTeam-Codex. Expert Database is an agent skill from ReJeCtAll/ExpertTeam-Codex.

When should I use Expert Database?

Expert Database fits situations like: tasks that involve SQL; tasks that involve Database schema design.

How do I install Expert Database in Claude Code?

Run `npx skills add ReJeCtAll/ExpertTeam-Codex --skill expert-database -a claude-code`. Or copy the skill folder (.codex/skills/expert-database in ReJeCtAll/ExpertTeam-Codex) into .claude/skills/expert-database in your project. Claude Code loads it when a task matches its description.

How do I install Expert Database in Codex?

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

Can I use Expert Database 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 ReJeCtAll/ExpertTeam-Codex --skill expert-database -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/expert-database, .gemini/skills/expert-database, .github/skills/expert-database and .opencode/skills/expert-database in your project.

What does Expert Database need to run?

SKILL.md names no scripts, command-line tools or credentials: Expert Database is instructions for the agent only.

Does Expert Database 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 Expert Database 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. Review the folder before installing.

What licence does Expert Database use?

Expert Database 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 Expert Database use?

About 692 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Expert Database?

Skills that share tags, products or a category with Expert Database: Golang Database (unxed/f4, 240 stars), SQL Pro (Jeffallan/claude-skills, 12k stars), SQL Queries (phuryn/pm-skills, 27k stars) and Lunora Setup Hyperdrive Global (anolilab/lunora, 283 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Expert Database?

ReJeCtAll (a GitHub user) maintains it in ReJeCtAll/ExpertTeam-Codex, which has 113 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on July 8, 2026.

Source: ReJeCtAll/ExpertTeam-Codex on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.