What problem does it solve?
Connecting to and managing remote databases, especially those behind SSH tunnels, can be complex and time-consuming. This skill simplifies database interactions by automating SSH tunnel setup, connection management, and query execution.
Core Features & Use Cases
- Automatic SSH Tunnels: Transparently establishes and tears down SSH tunnels for secure access to remote databases.
- Multi-Database Support: Works with PostgreSQL and MySQL, supporting various environments (dev, staging, prod) via
DB_* environment variables.
- Query & Schema Management: Execute SQL queries and inspect database schemas (tables, columns, indexes) with ease.
- Use Case: A developer needs to quickly check data in a staging database that's only accessible via an SSH jump host. This skill allows them to run a simple
query command without any manual SSH setup, saving significant time and reducing complexity.
Quick Start
Locate tool
DB_TOOL=$(for path in $(jq -r 'to_entries[] | .value.installLocation + "/plugin/skills/db-tool/db-tool.sh"' ~/.claude/plugins/known_marketplaces.json); do [ -f "$path" ] && echo "$path" && break; done)
Discover available databases
"$DB_TOOL" discover
Execute a query
"$DB_TOOL" query ALTA_DEV "SELECT * FROM users LIMIT 5"