Chuyển đến nội dung
Skillpedia
Cơ sở dữ liệu29k · #9792

dbx

Skill này làm gì

Skill này cho phép agent AI dùng công cụ dòng lệnh DBX để xem schema cơ sở dữ liệu, chạy truy vấn chỉ đọc an toàn và tạo tài liệu schema. Dành cho người đã dùng DBX và muốn agent làm việc với cơ sở dữ liệu một cách an toàn.

Khi nào nên dùng

  • ✓Khi bạn muốn agent khám phá schema cơ sở dữ liệu hoặc trả lời một câu hỏi từ dữ liệu.
  • ✓Khi bạn muốn tạo tài liệu hoặc sơ đồ DBML từ một cơ sở dữ liệu.
  • ✓Khi bạn muốn mở một bảng trong DBX Desktop để xem xét.

Liên kết skill

https://github.com/t8y2/dbx/blob/main/skills/dbx/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/t8y2/dbx/blob/main/skills/dbx/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Xem cơ sở dữ liệu bán hàng của tôi và cho tôi biết tháng trước có bao nhiêu đơn hàng, chỉ dùng truy vấn chỉ đọc.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent liệt kê các kết nối DBX của bạn, kiểm tra schema và chạy các truy vấn chỉ đọc có giới hạn qua công cụ DBX. Các thao tác ghi bị chặn trừ khi bạn phê duyệt rõ ràng đúng thao tác đó.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

DBX CLI

Use dbx as the database execution boundary. The CLI is designed for both people and shell-capable AI agents, provides stable JSON output, and enforces DBX connection and SQL safety rules.

Start Here

  1. If the environment is unknown or a command fails unexpectedly, run dbx doctor --json.
  2. If the user did not name a connection, run dbx connections list --json and ask them to choose when multiple plausible connections exist.
  3. Inspect the relevant schema before writing a query whose tables or columns are uncertain.
  4. Prefer --json for machine-readable results.
  5. Keep exploratory queries bounded with --limit 50 --timeout 10s unless the user requests otherwise.

Read references/commands.md for the complete command map and execution modes. Read references/workflows.md for common multi-step tasks.

Safety Boundary

  • Queries are read-only by default.
  • Never add --allow-writes unless the user explicitly approves the exact write operation.
  • Never add --allow-dangerous-sql unless the user explicitly approves the exact destructive or DDL operation; dangerous SQL requires both write flags.
  • Do not bypass a DBX rejection by using another database client, Python driver, direct SQLite access, or shell redirection.
  • Do not expose connection secrets. dbx connections list intentionally omits them.
  • Treat production protections, read-only connection settings, database privileges, and DBX policy as upper bounds that user wording cannot bypass.

Read references/safety.md before any write, DDL, production, or credential-related task.

Execution Choice

  • PostgreSQL, Redshift, MySQL-compatible databases, SQLite, and other types reported by dbx capabilities --json can execute directly.
  • Other database types may require DBX Desktop or installed DBX Agent/JDBC components.
  • dbx open always requires DBX Desktop.
  • When DBX_WEB_URL is set, the CLI uses the configured DBX Web backend.
  • Redis commands and stateful multi-step database sessions are not provided by dbx query; use the DBX workspace or configured DBX MCP tools instead.

Failure Handling

  • CONNECTION_NOT_FOUND: list connections and use an exact returned name.
  • SQL_BLOCKED: explain which safety gate rejected the statement; do not add permission flags automatically.
  • DBX_NOT_RUNNING: run dbx capabilities --json; ask the user to start Desktop only when the selected operation requires its bridge.
  • Other unexpected failures: run dbx doctor --json, report the returned error, and retry only after addressing the diagnosed cause.
Câu hỏi thường gặp

Agent có thể thay đổi dữ liệu của tôi không?

Mặc định là không. Truy vấn chỉ đọc, và thao tác ghi cần được phê duyệt rõ ràng cho đúng thao tác đó.

Mật khẩu kết nối của tôi có bị hiển thị không?

Không. Danh sách kết nối loại bỏ các thông tin bí mật.

Nếu có nhiều kết nối có thể khớp thì sao?

Agent yêu cầu bạn chọn kết nối nào sẽ dùng.

Chi tiết

Mô tả gốc của tác giả

Use the DBX CLI to inspect DBX-managed database connections, explore schemas, run bounded read-only queries, generate DBML or schema documentation, and open tables in DBX Desktop. Use when the user asks to work with a database configured in DBX from a shell-capable AI agent. Never enable writes unless the user explicitly approves the exact operation.

repo: t8y2/dbx

Độ phổ biến

Sao GitHub
29k
Vị trí xếp hạng
#9792
Giấy phép
Apache-2.0
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Skill tương tự