postgresql-development

Query and manage CloudBase PostgreSQL databases via MCP tools with RLS and schema inspection.

1.1k|138|Updated May 23, 2025
One-click install
npx skills add https://github.com/TencentCloudBase/CloudBase-AI-Toolkit --skill postgresql-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql-development
Source: https://github.com/TencentCloudBase/CloudBase-AI-Toolkit/tree/main/dsh-plugin/skills/cloudbase/postgresql
Command: npx skills add https://github.com/TencentCloudBase/CloudBase-AI-Toolkit --skill postgresql-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Working with CloudBase PostgreSQL from an AI coding session requires knowing which MCP tools to call, how to inspect schemas safely, and how to avoid destructive writes without confirmation. This Skill encodes those rules so database operations follow the correct CloudBase conventions.

Core Features & Use Cases

  • Read Operations: Use queryPgDatabase with actions like context, objects, metadata, schema, and sql to inspect database structure and run read queries.
  • Safe Writes and DDL: Use managePgDatabase with action=execute and mandatory confirm=true so schema changes and writes are never executed silently.
  • Runtime Awareness: Enforces PostgreSQL tooling when RuntimeMode is postgresql, preventing accidental use of MySQL tools, and prefers public.<table> qualified names.
  • Use Case: While building an app on CloudBase, ask the AI to inspect a table's schema and add a new column; the Skill ensures the schema is read first and the DDL runs only with explicit confirmation.

Quick Start

Ask the AI to inspect the schema of the public.users table in my CloudBase PostgreSQL database and then add an email column with my confirmation.

Frequently Asked Questions about postgresql-development

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

FAQPage Schema
How do I query a CloudBase PostgreSQL database from an AI tool?

Use the queryPgDatabase MCP tool with actions like context, objects, metadata, schema, or sql. The schema action inspects table structure, while sql runs read queries against the database.

How do I run DDL or write operations on CloudBase PostgreSQL?

Use managePgDatabase with action=execute and always set confirm=true. The confirmation step is mandatory so destructive schema changes or writes never run silently without user approval.

Should I use MySQL or PostgreSQL tools in CloudBase?

When RuntimeMode is postgresql, only the PostgreSQL tools queryPgDatabase and managePgDatabase should be called. MySQL tools must not be used in a postgresql runtime environment.

Why should table names be qualified with public schema in PostgreSQL?

Qualifying names as public.<table> removes ambiguity about which schema a query targets. This prevents operations from hitting unintended tables when multiple schemas exist in the database.

Does CloudBase PostgreSQL support row-level security?

Yes, the Skill covers RLS alongside app.rdb() access patterns. Row-level security policies control which rows users can read or modify through the database layer.