{"id":31830802,"url":"https://github.com/gemini-cli-extensions/cloud-sql-postgresql","last_synced_at":"2026-04-14T07:03:37.413Z","repository":{"id":316317756,"uuid":"1055655102","full_name":"gemini-cli-extensions/cloud-sql-postgresql","owner":"gemini-cli-extensions","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-14T00:29:27.000Z","size":193,"stargazers_count":24,"open_issues_count":4,"forks_count":5,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-14T04:10:26.474Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gemini-cli-extensions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-12T15:36:36.000Z","updated_at":"2026-01-14T00:29:27.000Z","dependencies_parsed_at":"2025-10-28T22:25:00.627Z","dependency_job_id":"dfaad462-d3cf-4183-9415-e8e44c65867b","html_url":"https://github.com/gemini-cli-extensions/cloud-sql-postgresql","commit_stats":null,"previous_names":["gemini-cli-extensions/cloud-sql-postgresql"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/gemini-cli-extensions/cloud-sql-postgresql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-cli-extensions%2Fcloud-sql-postgresql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-cli-extensions%2Fcloud-sql-postgresql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-cli-extensions%2Fcloud-sql-postgresql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-cli-extensions%2Fcloud-sql-postgresql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gemini-cli-extensions","download_url":"https://codeload.github.com/gemini-cli-extensions/cloud-sql-postgresql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-cli-extensions%2Fcloud-sql-postgresql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-11T21:26:07.156Z","updated_at":"2026-04-14T07:03:37.406Z","avatar_url":"https://github.com/gemini-cli-extensions.png","language":null,"funding_links":[],"categories":["Databases","Databases and Data"],"sub_categories":[],"readme":"# Cloud SQL for PostgreSQL Agent Skills\n\n\u003e [!NOTE]\n\u003e Currently in beta (pre-v1.0), and may see breaking changes until the first stable release (v1.0).\n\nThis repository provides a set of agent skills to interact with [Cloud SQL for PostgreSQL](https://cloud.google.com/sql/docs/postgres) instances. These skills can be used with various AI agents, including [Gemini CLI](https://google-gemini.github.io/gemini-cli/), Claude Code, and Codex, to manage your databases, execute queries, explore schemas, and troubleshoot issues using natural language prompts.\n\n\u003e [!IMPORTANT]\n\u003e **We Want Your Feedback!**\n\u003e Please share your thoughts with us by filling out our feedback [form][form].\n\u003e Your input is invaluable and helps us improve the project for everyone.\n\n[form]: https://docs.google.com/forms/d/e/1FAIpQLSfEGmLR46iipyNTgwTmIDJqzkAwDPXxbocpXpUbHXydiN1RTw/viewform?usp=pp_url\u0026entry.157487=cloud-sql-postgresql\n\n## Table of Contents\n\n- [Why Use Cloud SQL for PostgreSQL Agent Skills?](#why-use-cloud-sql-for-postgresql-agent-skills)\n- [Prerequisites](#prerequisites)\n- [Getting Started](#getting-started)\n  - [Configuration](#configuration)\n  - [Installation \u0026 Usage](#installation--usage)\n    - [Gemini CLI](#gemini-cli)\n    - [Claude Code](#claude-code)\n    - [Codex](#codex)\n    - [Antigravity](#antigravity)\n- [Usage Examples](#usage-examples)\n- [Supported Skills](#supported-skills)\n- [Additional Agent Skills](#additional-agent-skills)\n- [Troubleshooting](#troubleshooting)\n\n## Why Use Cloud SQL for PostgreSQL Agent Skills?\n\n- **Seamless Workflow:** Integrates seamlessly into your AI agent's environment. No need to constantly switch contexts for common database tasks.\n- **Natural Language Queries:** Stop wrestling with complex commands. Explore schemas and query data by describing what you want in plain English.\n- **Full Lifecycle Control:** Manage the entire lifecycle of your database, from creating instances to exploring schemas and running queries.\n- **Code Generation:** Accelerate development by asking your agent to generate data classes and other code snippets based on your table schemas.\n\n## Prerequisites\n\nBefore you begin, ensure you have the following:\n\n- One of these AI agents installed\n  - [Gemini CLI](https://github.com/google-gemini/gemini-cli) version **v0.6.0** or higher\n  - [Claude Code](https://claude.com/product/claude-code) version **v2.1.94** or higher\n  - [Codex](https://developers.openai.com/codex) **v0.117.0** or higher\n  - [Antigravity](https://antigravity.google) **v1.14.2** or higher\n- A Google Cloud project with the **Cloud SQL Admin API** enabled.\n- Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.\n- IAM Permissions:\n  - Cloud SQL Client (`roles/cloudsql.client`)\n  - Cloud SQL Admin (`roles/cloudsql.admin`)\n\n\u003e [!NOTE]\n\u003e If you do not configure a specific `CLOUD_SQL_POSTGRES_USER` or `CLOUD_SQL_POSTGRES_PASSWORD`, these skills default to using the active local IAM user credentials. You must also add the IAM user to your Cloud SQL instance, see [Creating a database user](https://cloud.google.com/sql/docs/postgres/add-manage-iam-users#creating-a-database-user).\n\n## Getting Started\n\n### Configuration\n\nPlease keep these env vars handy during the installation process:\n\n- `CLOUD_SQL_POSTGRES_PROJECT`: The GCP project ID.\n- `CLOUD_SQL_POSTGRES_REGION`: The region of your Cloud SQL instance.\n- `CLOUD_SQL_POSTGRES_INSTANCE`: The ID of your Cloud SQL instance.\n- `CLOUD_SQL_POSTGRES_DATABASE`: The name of the database to connect to.\n- `CLOUD_SQL_POSTGRES_USER`: (Optional) The database username. Defaults to the active IAM user.\n- `CLOUD_SQL_POSTGRES_PASSWORD`: (Optional) The password for the database user.\n- `CLOUD_SQL_POSTGRES_IP_TYPE`: (Optional) Type of the IP address: `PUBLIC`, `PRIVATE`, or `PSC`. Defaults to `PUBLIC`.\n\n\u003e [!NOTE]\n\u003e\n\u003e - Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.\n\u003e - If your Cloud SQL for PostgreSQL instance uses private IPs, you must run your agent in the same Virtual Private Cloud (VPC) network.\n\n### Installation \u0026 Usage\n\nTo start interacting with your database, install the skills for your preferred AI agent, then launch the agent and use natural language to ask questions or perform tasks.\n\nFor the latest version, check the [releases page][releases].\n\n[releases]: https://github.com/gemini-cli-extensions/cloud-sql-postgresql/releases\n\n\u003c!-- {x-release-please-start-version} --\u003e\n\n\u003cdetails open\u003e\n\u003csummary id=\"gemini-cli\"\u003eGemini CLI\u003c/summary\u003e\n\n**1. Install the extension:**\n\n```bash\ngemini extensions install https://github.com/gemini-cli-extensions/cloud-sql-postgresql\n```\n\nDuring the installation, enter your environment vars as described in the [configuration section](#configuration).\n\n**2. (Optional) Manage Configuration:**\nTo view or update your configuration in Gemini CLI:\n\n- Terminal: `gemini extensions config cloud-sql-postgresql [setting name] [--scope \u003cscope\u003e]`\n- Gemini CLI: `/extensions list`\n\n**3. Start the agent:**\n\n```bash\ngemini\n```\n\n_(Tip: Run `/extensions list` to verify your configuration and active extensions.)_\n\n\u003e [!WARNING]\n\u003e **Changing Instance \u0026 Database Connections**\n\u003e Currently, the database connection must be configured before starting the agent and can not be changed during a session.\n\u003e To save and resume conversation history in Gemini CLI use command: `/chat save \u003ctag\u003e` and `/chat resume \u003ctag\u003e`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary id=\"claude-code\"\u003eClaude Code\u003c/summary\u003e\n\n**1. Set env vars:**\nIn your terminal, set your environment vars as described in the [configuration section](#configuration).\n\n**2. Start the agent:**\n\n```bash\nclaude\n```\n\n**3. Add the marketplace:**\n\n```bash\n/plugin marketplace add https://github.com/gemini-cli-extensions/cloud-sql-postgresql.git#0.4.0\n```\n\n**4. Install the plugin:**\n\n```bash\n/plugin install cloud-sql-postgresql@cloud-sql-postgresql-marketplace\n```\n\n_(Tip: Run `/plugin list` inside Claude Code to verify the plugin is active, or `/reload-plugins` if you just installed it.)_\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary id=\"codex\"\u003eCodex\u003c/summary\u003e\n\n**1. Clone the Repo:**\n\n```bash\ngit clone --branch 0.4.0 git@github.com:gemini-cli-extensions/cloud-sql-postgresql.git\n```\n\n**2. Install the plugin:**\n\n```bash\nmkdir -p ~/.codex/plugins\ncp -R /absolute/path/to/cloud-sql-postgresql ~/.codex/plugins/cloud-sql-postgresql\n```\n\n**3. Set env vars:**\nEnter your environment vars as described in the [configuration section](#configuration).\n\n**4. Create or update marketplace.json:**\n`~/.agents/plugins/marketplace.json`\n\n```json\n{\n  \"name\": \"my-data-cloud-google-marketplace\",\n  \"interface\": {\n    \"displayName\": \"Google Data Cloud Skills\"\n  },\n  \"plugins\": [\n    {\n      \"name\": \"cloud-sql-postgresql\",\n      \"source\": {\n        \"source\": \"local\",\n        \"path\": \"./plugins/cloud-sql-postgresql\"\n      },\n      \"policy\": {\n        \"installation\": \"AVAILABLE\",\n        \"authentication\": \"ON_INSTALL\"\n      },\n      \"category\": \"Database\"\n    }\n  ]\n}\n```\n\n_(Tip: Run `codex plugin list` or use the `/plugins` interactive menu to verify your installed plugins.)_\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary id=\"antigravity\"\u003eAntigravity\u003c/summary\u003e\n\n**1. Clone the Repo:**\n\n```bash\ngit clone --branch 0.4.0 https://github.com/gemini-cli-extensions/cloud-sql-postgresql.git\n```\n\n**2. Install the skills:**\n\nChoose a location for the skills:\n- **Global (all workspaces):** `~/.gemini/antigravity/skills/`\n- **Workspace-specific:** `\u003cworkspace-root\u003e/.agents/skills/`\n\nCopy the skill folders from the cloned repository's `skills/` directory to your chosen location:\n\n```bash\ncp -R cloud-sql-postgresql/skills/* ~/.gemini/antigravity/skills/\n```\n\n**3. Set env vars:**\nSet your environment vars as described in the [configuration section](#configuration).\n\n_(Tip: Antigravity automatically discovers skills in these directories at the start of a session.)_\n\n\u003c/details\u003e\n\n\u003c!-- {x-release-please-end} --\u003e\n\n## Usage Examples\n\nInteract with Cloud SQL for PostgreSQL using natural language:\n\n- **Provision Infrastructure:**\n  - \"Create a new Cloud SQL for Postgres instance named 'e-commerce-prod' in the 'my-gcp-project' project.\"\n  - \"Create a new user named 'analyst' with read access to all tables.\"\n- **Explore Schemas and Data:**\n  - \"Show me all tables in the 'orders' database.\"\n  - \"What are the columns in the 'products' table?\"\n  - \"How many orders were placed in the last 30 days, and what were the top 5 most purchased items?\"\n- **Generate Code:**\n  - \"Generate a Python dataclass to represent the 'customers' table.\"\n\n## Supported Skills\n\nThe following skills are available in this repository:\n\n- [Cloud SQL for PostgreSQL Admin](./skills/cloud-sql-postgres-admin/SKILL.md) - Use these skills when you need to provision new Cloud SQL instances, create databases and users, clone existing environments, and monitor the progress of long-running operations.\n- [Cloud SQL for PostgreSQL Data](./skills/cloud-sql-postgres-data/SKILL.md) - Use these skills when you need to explore the database structure, discover schema objects like views or stored procedures, and execute custom SQL queries to interact with your data.\n- [Cloud SQL for PostgreSQL Health](./skills/cloud-sql-postgres-health/SKILL.md) - Use these skills when you need to audit database health, identify storage bloat, find invalid indexes, analyze table statistics, and manage maintenance configurations like autovacuum.\n- [Cloud SQL for PostgreSQL Lifecycle](./skills/cloud-sql-postgres-lifecycle/SKILL.md) - Use these skills when you need to manage the lifecycle of your instances, including performing backups and restores, checking major version upgrade compatibility, and monitoring overall instance status.\n- [Cloud SQL for PostgreSQL Monitor](./skills/cloud-sql-postgres-monitor/SKILL.md) - Use these skills when you need to troubleshoot performance bottlenecks, analyze query execution plans, identify resource-heavy processes, and monitor system-level PromQL metrics.\n- [Cloud SQL for PostgreSQL Replication](./skills/cloud-sql-postgres-replication/SKILL.md) - Use these skills when you need to monitor replication health, manage sync states between nodes, and audit database roles and security settings to ensure environment integrity.\n- [Cloud SQL for PostgreSQL View Config](./skills/cloud-sql-postgres-view-config/SKILL.md) - Use these skills when you need to discover and manage PostgreSQL extensions or fine-tune engine-level settings such as memory allocation and server configuration parameters.\n\n## Additional Agent Skills\n\nFind additional skills to support your entire software development lifecycle at [github.com/gemini-cli-extensions](https://github.com/gemini-cli-extensions), including:\n\n- [Generic PostgreSQL skills](https://github.com/gemini-cli-extensions/postgres)\n- [Cloud SQL for PostgreSQL Observability skills](https://github.com/gemini-cli-extensions/cloud-sql-postgresql-observability)\n- and more!\n\n## Troubleshooting\n\nUse the debug mode of your agent (e.g., `gemini --debug`) to enable debugging.\n\nCommon issues:\n\n- \"failed to find default credentials: google: could not find default credentials.\": Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment. See [Set up Application Default Credentials](https://cloud.google.com/docs/authentication/external/set-up-adc) for more information.\n- \"✖ Error during discovery for server: MCP error -32000: Connection closed\": The database connection has not been established. Ensure your configuration is set via environment variables.\n- \"✖ MCP ERROR: Error: spawn .../toolbox ENOENT\": The Toolbox binary did not download correctly. Ensure you are using the latest version of your agent.\n- \"cannot execute binary file\": The Toolbox binary did not download correctly. Ensure the correct binary for your OS/Architecture has been downloaded. See [Installing the server](https://mcp-toolbox.dev/documentation/introduction/#install-toolbox) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemini-cli-extensions%2Fcloud-sql-postgresql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgemini-cli-extensions%2Fcloud-sql-postgresql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemini-cli-extensions%2Fcloud-sql-postgresql/lists"}