AI Blocks › Make documents, sheets and slides
Safe database query runner
Ask a question about your Postgres data. Get a read-only query run with write protection and the results back.
Safe database query runner is a free AI skill for the job "Make documents, sheets and slides". Give the instructions to an AI assistant that supports the required files and tools, then review its output.
Free · No account · CC BY 4.0 licence · Made by sickn33 · Thinking: low
Made by sickn33. See the original on GitHub; we copied it as it is, with its licence.
What it does
Ask a question about your Postgres data in plain words and see real results, with no risk of changing anything. Every query runs read-only, so a bad command cannot delete or edit a row. You set up a connections file listing each database with a name, a short note on what it holds and a login. Keep the file locked down since it holds passwords. A Python script lists databases and tables, shows columns and runs queries. Protection comes in layers: the connection is read-only, and the script checks each command for inserts, updates, deletes and schema changes. It needs Python and a Postgres driver. Use a read-only login.
You give it
- A connections file with database details
- A question in plain words
- A read-only database login
- Table names you care about (optional)
You get
- A list of your databases and tables
- A read-only query that runs
- Results from your data
- A clear refusal if a command would write
Use it when
- You want to count orders or users without asking a developer.
- You are exploring an unfamiliar database and need to see its tables.
- You have several databases and need the right one picked.
- You fear an AI-written query might change live data.
How to use it
- Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
- Ask for the job in your own words. Your AI opens the skill when it fits.
- It works best when your AI can connect to your database.