database

Create and manage PostgreSQL databases and execute SQL queries with safety checks.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/AmirEmad11/instabot --skill database-amiremad11
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database
Source: https://github.com/AmirEmad11/instabot/tree/main/.local/skills/database
Command: npx skills add https://github.com/AmirEmad11/instabot --skill database-amiremad11

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing databases across development and production environments is risky and error-prone. This Skill provisions Replit's built-in PostgreSQL database, verifies its status, and executes SQL queries with built-in safety guardrails so you can inspect live data without risking destructive changes. ## Core Features & Use Cases - Database Provisioning: Check whether a PostgreSQL database exists and create one on demand, automatically setting environment variables like DATABASE_URL and PGHOST. - Safe SQL Execution: Run full SQL operations against the development database and read-only SELECT queries against a production replica, with Stripe table mutations and destructive statements blocked. - Data Warehouse Queries: Query BigQuery, Databricks, and Snowflake with optional sampling for large datasets. - Use Case: A user asks to "check the prod db" for inactive users. The Skill runs a read-only SELECT against the production replica and returns the results without any risk of modifying live data. ## Quick Start Ask the assistant to check whether the database is provisioned and create one if needed, then run a SELECT query to inspect your tables.

Frequently Asked Questions about database

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a PostgreSQL database on Replit?

Call checkDatabase() first to see if one is already provisioned, then call createDatabase() if needed. On success it sets environment variables including DATABASE_URL, PGHOST, PGPORT, PGUSER, PGPASSWORD, and PGDATABASE for your application to use.

How do I query a production database safely?

Use executeSql() with the environment parameter set to "production". Production queries run read-only against a replica of the production database, so only SELECT statements are allowed and live data cannot be modified.

Can I run INSERT or UPDATE queries against the production database?

No. Production queries are strictly read-only and limited to SELECT statements. INSERT, UPDATE, DELETE, and DDL statements will fail in the production environment; use the development environment for mutations.

Does the database skill support BigQuery and Snowflake?

Yes. executeSql() accepts a target parameter for bigquery, databricks, or snowflake, with an optional sampleSize for warehouse queries. For Databricks, use the databricks-m2m connector rather than the plain databricks connector.

Why are DROP and TRUNCATE statements blocked?

Destructive queries like DROP and TRUNCATE are blocked through the skill callback path as a safety measure. Mutations to Stripe schema tables are also blocked, and mutating queries are disabled in Planning or Discussion mode.