database

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

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/gopaljilab/Gupta-Portfolio --skill database-gopaljilab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: database
Source: https://github.com/gopaljilab/Gupta-Portfolio/tree/main/.local/skills/database
Command: npx skills add https://github.com/gopaljilab/Gupta-Portfolio --skill database-gopaljilab

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up and querying a PostgreSQL database inside a Replit project normally requires manual provisioning, connection string management, and careful handling of production data. This Skill automates database provisioning, status checks, and SQL execution with built-in safety guardrails. ## Core Features & Use Cases - Database Provisioning: Check whether a PostgreSQL database exists and create one on demand, automatically exposing environment variables like DATABASE_URL and PGHOST. - Safe SQL Execution: Run CREATE TABLE, INSERT, and SELECT statements against the development database, with destructive queries and Stripe table mutations blocked. - Read-Only Production Queries: Run SELECT-only queries against a production replica without risking data modification. - Data Warehouse Queries: Execute sampled queries against BigQuery, Databricks, or Snowflake. - Use Case: You are building a contact form backend and need a contact_messages table. Use this Skill to verify the database exists, create the table, insert test rows, and confirm the data with a SELECT query. ## Quick Start Check whether my Replit PostgreSQL database is provisioned, create it if needed, and then create a users table with an id and email column.

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 run SQL queries against my Replit database?▼

Use executeSql() with your SQL string in the sqlQuery parameter. By default it runs against the development database where all SQL operations are supported, and it returns success status, output, and exit code.

Can I run queries against my production database?▼

Yes, but production queries are read-only. Set environment to "production" in executeSql() to run SELECT queries against a read replica; INSERT, UPDATE, DELETE, and DDL statements will fail, and the replica schema may lag behind deployments.

Does the Replit database skill support BigQuery or Snowflake?▼

Yes, executeSql() accepts a target parameter for bigquery, databricks, or snowflake, with an optional sampleSize parameter for warehouse queries. The production environment option is only supported for the replit_database target.

Why is my DROP or TRUNCATE query 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.