db-explorer for Openclaw

A terminal-ready database tool designed to safely connect to, analyze, query, and export data from PostgreSQL, MySQL, SQLite, MongoDB, and Redis.

lrg913427-dot
v2.5.2
Jun 4, 2026
0
721
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install db-explorer-gavin

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install db-explorer-gavin using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is db-explorer?

The db-explorer skill empowers developer agents to interface securely with relational and non-relational databases from the terminal. Supporting PostgreSQL, MySQL, SQLite, MongoDB, and Redis, it enables instantaneous schema maps, data queries, file exports, and diagnostic performance tracking. By incorporating Openclaw Skills, developers gain robust query capabilities without leaving their developer environments.

This utility prioritizes read-only workflows by default to maintain database integrity. Every potential write query is intercepted with built-in protections, requesting explicit confirmations and using transactions where applicable. Safe limits are applied globally, preventing large tables from causing timeouts or service disruptions.

db-explorer Use Cases

  • Schema Mapping and Discovery: Fetch catalog lists, map relationships, view column constraints, and track row counts safely.
  • Performance Tuning: Detect slow-running queries, calculate table bloat, identify unindexed tables, and inspect cache hit ratios.
  • Data Migration and Exports: Convert raw database tables directly to standard CSV or JSON files, or perform data dumps for schema migrations.
  • Safety-First database queries: Execute CLI SELECT queries with automated constraint limits to prevent database degradation.
  • Database Maintenance and Backups: Perform on-demand backups or schema comparisons safely via integrated Openclaw Skills procedures.

How db-explorer Works

  1. Inspect Configuration: The tool checks the environment variables such as DATABASE_URL or detailed connection parameters like DB_HOST and DB_NAME.
  2. Establish Connection: Launches the database CLI client program specific to the database engine (e.g., psql, mysql, mongosh).
  3. Map the Schema: Queries the relational systems database directories to outline schemas, table sizes, and key links.
  4. Query execution with guardrails: Applies strict rules including mandatory LIMIT structures for SELECTs, warning banners on write operations, and transaction wraps.
  5. Format the Output: Displays database terminal configurations, runs performance measurements, and produces secure file exports when prompted.

db-explorer Setup

Prerequisites

Install the corresponding database engine CLI client tool based on your local system layout:

PostgreSQL (psql):

  • macOS: brew install postgresql
  • Linux: apt install postgresql-client

MySQL (mysql):

  • macOS: brew install mysql
  • Linux: apt install mysql-client

SQLite (sqlite3):

  • macOS: Built-in
  • Linux: apt install sqlite3

MongoDB (mongosh):

  • macOS: brew install mongosh
  • Linux: Install via mongodb.com docs

Redis (redis-cli):

  • macOS: brew install redis
  • Linux: apt install redis-tools

Environment Configuration

Define the database parameters inside your local shell parameters. The connection engine reads these details:

export DATABASE_URL="postgresql://user:password@host:5432/dbname"
# Or set variables independently:
export DB_TYPE="postgres"
export DB_HOST="127.0.0.1"
export DB_PORT="5432"
export DB_NAME="development_db"
export DB_USER="postgres"
export DB_PASSWORD="mysecurepassword"

db-explorer Data Schema & Taxonomy

Database Engine Mappings

This Openclaw Skills integration analyzes database configurations using internal metadata systems:

Database System Catalog Reference Inspection Command
PostgreSQL information_schema.columns \dt, \d table_name
MySQL INFORMATION_SCHEMA.COLUMNS SHOW TABLES, DESCRIBE table_name
SQLite sqlite_schema .tables, .schema table_name
MongoDB Collection catalog db.getCollectionNames()
Redis Keyspace index INFO keyspace, KEYS "*"

Export Configurations

  • CSV Format: Uses built-in CLI features (such as \copy in PostgreSQL or .mode csv in SQLite) to export datasets securely to files.
  • JSON Output: For PostgreSQL connections, queries are packaged within standard JSON formats utilizing json_agg structures.

db-explorer Advanced Features

  • Transaction Wrappers: Runs destructive actions safely in explicit transaction blocks (BEGIN / ROLLBACK) so you can preview mutations before committing.
  • Cache Hit Monitoring: Evaluates PostgreSQL connection structures, checking if table operations stay above a 99% cache hit target.
  • Index Coverage Audits: Queries system tables to find unindexed columns, table bloat levels, or dead indices.
  • SSL Connection Handling: Adapts command syntax for secure database endpoints that require standard cloud-hosted encryption features like sslmode=require.
  • SQLite WAL Activation: Sets transactional concurrent processing properties in SQLite using PRAGMA journal_mode=WAL; to mitigate connection locking.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*