/observe-lens:observe-lens-dbfrom observe-lens
Query databases read-only to see what state data is in while debugging, testing or answering a question: PostgreSQL, MySQL or MariaDB and MongoDB (including AWS RDS, Aurora and DocumentDB), directly or through an SSH tunnel, with a guard that only lets SELECT-style SQL and read-only Mongo expressions through. Discovers tables, columns and collections before querying. Use this whenever the user gives an order, customer, account, request or record id and wants to know what was stored, which status or error a record has, whether a migration or job changed data, or why the data does not match what the UI or an API shows, even if they do not say database, SQL, psql or Mongo. Read-only: for writing migrations, changesets, DDL or data fixes use a development skill instead.
Ships in observe-lens. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Look up the real state of the data with read-only users so an investigation rests on facts instead of guesses.
Run scripts with python3; on Windows use python or py -3 if python3 is not found. Paths below are relative to this skill's folder.
config list shows them, each with its engine and environment). Ask if more than one fits.The first time this skill is used in a session, before running any command, ask the user once (with the multiple-choice question tool if there is one):
observe-lens, observe-lens-pipelines, observe-lens-cd, observe-lens-db and observe-lens-telemetry for the rest of the session.Skip the question if the user already picked option 3 in another observe-lens skill this session, or option 2 for this skill. Keep the choice for the session; the user can change it at any time ("ask me again", "stop auto-running").
scripts/tunnel.py status|start|stop, every scripts/db.py subcommand except config init and config add (ping, tables, columns, query with statements the guard accepts, mongo with read expressions, config list|check|path|knowledge).ls/dir/Get-ChildItem, cat/type/Get-Content, grep/findstr/Select-String). If a command could change anything, treat it as state-changing. Reading credential files is never covered (see Rules).config list marks confirm=yes (environment prod, production, prd or live unless the instance sets "confirm": false, or any instance with "confirm": true), name the instance and ask once. The scripts refuse a production instance unless the command includes --prod: add it only after the user says yes, then keep adding it to that instance's commands, which follow the choice above for the rest of the session. --prod never relaxes the read-only guards and never allows writes. Production systems are shared and hold real customer data, so a deliberate first look is worth one question.config init, editing files under the observe-lens config folder, ~/.ssh/config, .pgpass or .my.cnf, installing a database CLI, changing file permissions, killing a process the tunnel helper did not start. One yes covers that one action only. Writes to a database stay off even when asked: the guard and read-only users refuse them, so point the user to their migration or change process instead of looking for a way around.python3 scripts/db.py config check lists instances and whether their CLI, tunnel and credentials are in place. Fix gaps with references/setup.md.python3 scripts/db.py config knowledge lists notes on schemas, key tables, which user reads which schema, id formats and status values. Read them before choosing a table.python3 scripts/tunnel.py status <tunnel>; if it is down, python3 scripts/tunnel.py start <tunnel>. If start fails with an authentication error, stop and give the user the fix from references/setup.md: tunnels need key-based SSH because a password prompt cannot be answered from here.python3 scripts/db.py --instance <name> ping (add --prod for a production instance, only after the user agreed, and --user <user> when the instance has several read-only users).db.py --instance <name> tables [--schema <s>] [--filter <text>], then db.py --instance <name> columns <table> [--schema <s>]; for MongoDB columns <collection> samples a few documents and lists field paths and types. Column names differ between schemas and releases; a wrong guess wastes a round trip.db.py --instance <name> query "<SELECT ...>" [--user <u>] [--limit 50]. The guard accepts one SELECT, WITH ... SELECT, SHOW, DESCRIBE/DESC or EXPLAIN (without ANALYZE) statement, runs it in a read-only transaction and adds a row limit if the statement has none.db.py --instance <name> mongo '<expression>' [--database <db>], for example db.orders.find({orderId: "A-123"}).limit(5). Allowed: find, findOne, countDocuments, estimatedDocumentCount, distinct, aggregate without $out/$merge, getIndexes, getCollectionNames, listCollections, stats.
Filter on ids or a time window, select the columns you need, and keep result sets small: wide JSON or blob columns are slow and noisy.**Finding:** <one-line answer to the question>
| Field | Value |
| --- | --- |
| Record | orders.id = 812345 |
| Status / error | FAILED / PAYMENT_TIMEOUT |
| Time (UTC) | 2026-01-15 09:45:12 |
<what it means and what to check or fix next>
Query: `<instance>` (<engine>, <environment>) as `<user>`: `<statement or expression>`
scripts/db.py refuses anything but the statements above and opens read-only sessions; use read-only database users as well, because a guard is a seatbelt, not a permission system. Writes belong in the team's migration or change process.secrets/ folder, .pgpass, .my.cnf, .env) and never put a password on a command line. db.py passes passwords to the CLI through environment variables or temporary files readable only by the user, never through arguments.tunnel.py start instead of retrying the query in a loop.tunnel.py stop <tunnel> when the investigation is done unless the user wants it kept.[REDACTED:<kind>]; if a value still looks like a credential, do not repeat it. Say where it appears and recommend rotating it.scripts/_ol_common.py: shared helpers (config, secrets, HTTP, guards) imported by the scripts; not run directly.scripts/db.py: read-only client for engines postgres, mysql (also MariaDB) and mongodb, using psql, mysql and mongosh. --instance <name>, --user <name>, --format table|csv|json. Subcommands: ping, tables, columns, query, mongo, config list|check|path|knowledge|init|add.scripts/tunnel.py: start, check and stop SSH port forwards defined in the db config (ssh -N -L, works with the OpenSSH client on macOS, Linux and Windows 10+).references/postgres.md, references/mysql.md, references/mongodb.md: read for the engine in use: catalog queries, JSON column tricks, time zones, common errors.references/setup.md: read when a CLI, tunnel or credential is missing or failing: installing clients per OS, SSH keys, config fields, troubleshooting.assets/knowledge-template.md: template for the user's schema notes (config init copies it).assets/config.example.json, assets/secrets.example.json: placeholder config and secret shapes (config init copies the config; secrets are added with config add).assets/config.example.json (opens in a new tab)assets/knowledge-template.md (opens in a new tab)assets/secrets.example.json (opens in a new tab)references/mongodb.md (opens in a new tab)references/mysql.md (opens in a new tab)references/postgres.md (opens in a new tab)references/setup.md (opens in a new tab)scripts/_ol_common.py (opens in a new tab)scripts/db.py (opens in a new tab)scripts/tunnel.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
5 skills in this plugin
/observe-lensRead-only investigation across CI pipelines, CD deployments, databases and telemetry (logs, traces, metrics, alerts) to explain what happened to a build, a deploy, a request, an order, a test run or a feature, and why. Routes to observe-lens-pipelines (Jenkins, GitHub Actions), observe-lens-cd (Argo CD, Flux, Helm, Kubernetes rollouts), observe-lens-db (PostgreSQL, MySQL, MongoDB) and observe-lens-telemetry (Grafana, Loki, Tempo, Prometheus), and correlates their evidence on one timeline. Use this whenever a developer, tester, analyst or product owner asks why something failed, broke, is slow or behaves differently, whether a change is deployed or verified, what a service logged, what state a record is in, or wants a status or root-cause summary across systems, even if they only paste an id, a URL, an error message or a time window and do not name a tool. Also use it to set up or check observe-lens configuration. Never changes the systems it reads./observe-lens-cdRead continuous-delivery state read-only to explain what is deployed where and whether it is healthy: Argo CD applications (sync and health status, deployed revision, sync history, failing resources, events, conditions), Flux kustomizations and Helm releases, Helm release history, and Kubernetes rollouts, pods, restarts and events through guarded read-only kubectl, helm and flux commands. Use this whenever the user asks whether a commit, image tag or fix is deployed to an environment, when a deploy happened or finished, why an app is OutOfSync, Degraded, Progressing or crash-looping, what changed in the last release, or whether a rollback happened, even if they do not say Argo CD, Flux, Helm or Kubernetes. Read-only: it never syncs, rolls back, restarts, scales or edits anything; it tells the user how. For build and test results use observe-lens-pipelines; for logs and metrics use observe-lens-telemetry.Other plugins' skills for the same job
npx claudepluginhub evrentan/observe-lens --plugin observe-lens