cockpit-db
Skill by jacobaraujo7
Lets an AI assistant query and inspect a workspace's databases from a Cockpit terminal. It covers SQL, Redis and MongoDB, and is aimed at developers working in Cockpit.
Install cockpit-db
Built from the published package, never by AI.
git clone --depth 1 https://github.com/jacobaraujo7/remote_pi /tmp/remote_pi && mkdir -p ~/.claude/skills && cp -r /tmp/remote_pi/cockpit/cli/skills/cockpit-db ~/.claude/skills/cockpit-dbRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/jacobaraujo7/remote_pi /tmp/remote_pi && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/remote_pi/cockpit/cli/skills/cockpit-db ~/.gemini/antigravity-cli/skills/cockpit-dbAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
cockpit-db is an agent skill that lets an AI assistant query and inspect a workspace's databases from a Cockpit terminal. It covers SQL engines (SQLite, Postgres, MySQL and MSSQL), Redis and Valkey commands, and MongoDB runCommand. Connections are registered in .cockpit/databases.json, and the app executes every query, so the assistant never sees credentials.
Connections are read-only for agents by default, and writes require the human to enable them in the Database panel. The skill can also reach a database through an SSH bastion using key-only authentication. Each command returns one JSON line, and browse commands open a view for the human to see what was found. It suits developers who want an assistant to explore schemas, run queries and show results inside Cockpit.
Written from the project's SKILL.md and checked against it.
What it can do
- SQL queriesRuns SQL against SQLite, Postgres, MySQL and MSSQL through registered connections or .dbq files.
- Schema inspectionLists connections, tables and the columns of a table.
- SQL writesRuns write statements, which are rejected unless the human enables writes for the connection.
- Redis commandsRuns Redis, Valkey and KeyDB cache commands against a registered connection.
- MongoDB runCommandSends runCommand documents to MongoDB and lists databases and collections.
- Connection registrationAdds database connections to .cockpit/databases.json without storing passwords in the file.
- SSH bastion accessReaches a database through an SSH tunnel defined in the connection's ssh block.
- Browse viewsOpens the Redis key table or Mongo collection browser for the human, pre-filtered.
What you need
- Cockpit app with a workspace open
- SSH key for bastion connections, if used
Try asking
- List the database connections in this workspace and their access levels.
- Show the columns of the orders table in the dev-local database.
- Find users with active set to true in the app MongoDB connection.
Good to know
- Connections are read-only for agents by default.
- SSH authentication is key only, and a passphrase must be saved in advance for agents.
- MongoDB tunnels need a driver built with SOCKS5 support.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: cockpit/cli/skills/cockpit-db/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to cockpit-db
All alternatives →Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.
Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.
Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.
Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.
Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.
Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.
Compare with hugging-face-datasets, db-repair or alloydb-basics
cockpit-db: common questions
Can the assistant see my database passwords?
No. The app executes every query, and the assistant never sees credentials. Passwords are entered in the Database panel and can be stored in the OS keychain.
Can the assistant change data in my database?
Only if the human enables Allow writes (agents) on that connection in the Database panel. Otherwise writes are rejected with a read_only_connection error.
Does it work with databases behind an SSH bastion?
Yes. A connection can carry an ssh block, and the app opens the tunnel so the same cockpit db, redis and mongo commands work unchanged.
How do I install cockpit-db?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is cockpit-db free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is cockpit-db safe to use?
It scores 76 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to cockpit-db?
Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.
