# Postgres Skill

> A Claude skill from kubiyabot/skill.

- **Type:** Skill
- **Install:** `agentstack add skill-kubiyabot-skill-postgres-skill`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [kubiyabot](https://agentstack.voostack.com/s/kubiyabot)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [kubiyabot](https://github.com/kubiyabot)
- **Source:** https://github.com/kubiyabot/skill/tree/main/examples/native-skills/postgres-skill

## Install

```sh
agentstack add skill-kubiyabot-skill-postgres-skill
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# PostgreSQL Skill

PostgreSQL database operations with native psql CLI integration.

## Overview

This skill provides comprehensive PostgreSQL operations through the native psql CLI. It supports querying, schema inspection, administration, and backup/restore operations.

## Requirements

- **psql** must be installed and in PATH
- **pg_dump** and **pg_restore** for backup operations
- Database connection credentials

## Tools (18)

### Query Tools
- `query` - Execute SQL queries with format options
- `query-file` - Execute SQL from a file

### Schema Tools
- `databases` - List all databases
- `tables` - List tables in database
- `describe` - Describe table structure
- `columns` - List columns of a table
- `indexes` - List indexes on a table
- `constraints` - List constraints on a table
- `size` - Show database or table size

### Admin Tools
- `connections` - Show active database connections
- `running-queries` - Show currently running queries
- `cancel-query` - Cancel a running query by PID

### DDL Tools
- `create-database` - Create a new database
- `drop-database` - Drop a database (requires confirmation)
- `create-user` - Create a new database user/role
- `grant` - Grant privileges on database objects

### Backup Tools
- `backup` - Backup database using pg_dump
- `restore` - Restore database using pg_restore

## Security

- Passwords passed via PGPASSWORD environment variable
- DROP/TRUNCATE require explicit confirmation
- DELETE without WHERE is blocked
- SQL identifiers validated for injection prevention

## Configuration

Set password via environment: `export PGPASSWORD=your_password`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [kubiyabot](https://github.com/kubiyabot)
- **Source:** [kubiyabot/skill](https://github.com/kubiyabot/skill)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-kubiyabot-skill-postgres-skill
- Seller: https://agentstack.voostack.com/s/kubiyabot
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
