Thanks to visit codestin.com
Credit goes to officialskills.sh

Setup & Installation

npx skills add https://github.com/microsoft/skills --skill azure-postgres-ts
or paste the link and ask your coding assistant to install it
https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-typescript/skills/azure-postgres-ts
View on GitHub

What This Skill Does

Connects Node.js/TypeScript applications to Azure Database for PostgreSQL Flexible Server using the pg (node-postgres) package. Supports both password and Microsoft Entra ID (passwordless) authentication, connection pooling, transactions, and typed queries.

Handling Entra ID token acquisition, SSL requirements, and token expiry refresh for Azure PostgreSQL manually is error-prone; this skill provides working patterns for all three auth scenarios and pool configurations specific to Azure's connection limits.

When to use it

  • Querying an Azure PostgreSQL database from a TypeScript API with typed result rows
  • Setting up a connection pool for a production Node.js service on Azure
  • Authenticating to Azure PostgreSQL using a managed identity instead of a password
  • Running multi-statement transactions with automatic rollback on failure
  • Refreshing Entra ID tokens automatically for long-running backend services