Dev & Engineering ✓ Microsoft · Official azure-postgresqlnode-postgrestypescriptconnection-poolingentra-idsql-transactionsparameterized-queries

Azure PostgreSQL TypeScript Connector

A practical pg-based guide for secure, pooled Azure PostgreSQL access in Node.js and TypeScript.

FollowSkills review · FSRS-2.0
Use with care
49/ 100 5-point scale 2.5 / 5
1 2 3 4 5 6
1Trust14 / 25 · 2.8/5

The document uses parameterized queries, TLS verification, Entra ID passwordless authentication, and environment variables, with no evidence of malware, exfiltration, or destructive defaults. It does not fully specify confirmation boundaries for writes, secret-handling and logging risks, sensitive connection-string handling, least-privilege database roles, or recovery procedures, so points are deducted.

2Reliability7 / 20 · 1.8/5

Single-client, pooling, transaction, cleanup, timeout, and error-handling paths are documented. However, the token-refresh example uses QueryResult and PoolClient without importing them, pool replacement has concurrency and checked-out-connection edge cases, and no skill-specific tests or statically verifiable abnormal-input coverage are provided. The score remains conservative under the static-review ceiling.

3Adaptability9 / 15 · 3.0/5

The name, audience, Node.js/TypeScript setting, and trigger terms are clear, covering password auth, Entra ID, pooling, transactions, and typed queries. Non-fit scenarios, required Azure-side setup, database permission boundaries, and Chinese-language guidance are not stated, so adaptability is reduced.

4Convention9 / 15 · 3.0/5

The document has clear progressive sections for installation, environment variables, authentication, workflows, errors, configuration, best practices, types, and references; it also declares MIT licensing, author, and version. It lacks a changelog, explicit maintenance/update path, FAQ or systematic troubleshooting, and some examples depend on unstated surrounding context, so points are deducted.

5Effectiveness6 / 15 · 2.0/5

The skill provides directly adaptable examples for connections, pools, parameterized queries, transactions, typing, and token refresh, with clear core-task value. Placeholder values and assumed users/orders schemas remain, the token-refresh pool example has usability risks, and no key-path execution evidence is supplied; light review and correction are still required.

6Verifiability4 / 10 · 2.0/5

The skill includes concrete code, configuration values, and reference links, while the repository provides general CI and test materials. The supplied tests do not cover this skill's key paths, and no committed skill-specific acceptance tests or third-party execution evidence are shown, so the assessment relies mainly on static text.

Evidence confidence:Low Reviewed Jul 20, 2026 Reviewed revision 9ccaf7c3704a
Before you use it
  • The token-refresh pool example may race under concurrent requests or while connections are checked out, and its imports are incomplete; compile, concurrency, and token-expiry tests should be added before adoption.
  • Do not log passwords or tokens; the interpolated connection-string example does not explain escaping special characters or secret management.
  • Write examples execute INSERT operations without defining user confirmation, idempotency, least-privilege database roles, or business recovery after failure.
See the full review method →

What does this skill do, and when should you use it?

This skill helps Node.js and TypeScript developers connect to Azure Database for PostgreSQL Flexible Server with pg (node-postgres). It covers password authentication and Microsoft Entra ID passwordless authentication, plus Client and Pool usage, parameterized queries, transactions, and typed results. It also documents token refresh for long-running applications, PostgreSQL error handling, connection strings, pool events, and Azure-specific settings. It is a focused fit for Azure PostgreSQL applications rather than a general database or ORM guide.

Shows how to install pg, @azure/identity, and @types/pg; read Azure PostgreSQL connection and authentication environment variables; create SSL-enabled Client or Pool connections; run parameterized SQL, transactions, and typed queries; obtain PostgreSQL access tokens with DefaultAzureCredential or managed identity; recreate pools before Entra ID token expiry; handle common PostgreSQL error codes; and configure pool sizing, timeouts, lifecycle events, and graceful shutdown.

  1. A Node.js/TypeScript developer needs a basic SSL-enabled connection to Azure PostgreSQL from environment variables.
  2. A production service needs pooling, connection timeouts, pool monitoring, and clean shutdown behavior.
  3. A backend performs related user and order writes that must be protected by transactions and parameterized queries.
  4. A team is moving from database passwords to Microsoft Entra ID or managed identity authentication.
  5. A long-running service needs to refresh Entra ID credentials without leaving an expired-password pool in use.

What are this skill's strengths and limitations?

Pros
  • Covers both password and Microsoft Entra ID authentication.
  • Includes production-oriented pooling, transactions, parameterized queries, and shutdown patterns.
  • Provides TypeScript generics for query results and examples for common PostgreSQL error codes.
  • Documents Azure-specific SSL, token scope, ports, token lifetime, and pool settings.
Limitations
  • Its scope is limited to Azure Database for PostgreSQL Flexible Server, Node.js/TypeScript, and pg.
  • It does not cover migrations, schema design, ORMs, or application data modeling.
  • The source does not identify a skill-specific test suite or runtime compatibility matrix.
  • Pool sizing and token-refresh behavior still require adjustment for the application lifecycle, concurrency, and Azure SKU.

How do you install this skill?

Install the collection with npx skills add microsoft/skills, then select azure-postgres-ts in the wizard. The README says selected skills are installed in the chosen agent directory, such as .github/skills/ for GitHub Copilot. The source does not define a separate package or standalone installation command for this skill.

How do you use this skill?

In an Agent Skills-compatible coding agent, make a request such as: “Connect my TypeScript service to Azure PostgreSQL with pg, use a production connection pool, and authenticate with Microsoft Entra ID.” The skill supplies patterns for dependencies, environment variables, Client/Pool setup, transactions, parameterized queries, typed results, error handling, and token refresh. It does not prescribe a schema, deployment model, or application framework.

How does this skill compare with similar options?

The skill presents password authentication and Microsoft Entra ID passwordless authentication as the main authentication choices. Passwords are configured directly, while Entra ID uses DefaultAzureCredential or managed identity and passes an access token as the PostgreSQL password. For connection management, it contrasts a single Client with Pool and recommends Pool for production.

FAQ

Is this for PostgreSQL in general or for other languages?
It is specifically written for Azure Database for PostgreSQL Flexible Server with Node.js/TypeScript and pg. It does not provide dedicated guidance for other languages or non-Azure databases.
What is required for Entra ID authentication?
The examples require @azure/identity, an available Azure credential, and an Entra-enabled PostgreSQL user configuration. They also use the PostgreSQL-specific token scope shown in the skill.
Why does the guidance require SSL?
The Azure-specific configuration marks `ssl.rejectUnauthorized: true` as required for Azure, and the connection examples consistently enable it.
Does it include a complete application or deployment recipe?
No. It focuses on connectivity, queries, transactions, error handling, pooling, and token refresh, without defining an application framework, deployment workflow, or database schema.

More skills from this repository

All from microsoft/agent-skills

Dev & Engineering ✓ Microsoft · Official

Azure Identity for TypeScript

Configure secure, flexible Microsoft Entra ID authentication for TypeScript Azure applications.

Dev & Engineering ✓ Microsoft · Official

Azure Playwright Cloud Testing

Scale TypeScript Playwright tests on Azure-hosted browsers and publish results.

Dev & Engineering ✓ Microsoft · Official

Azure Queue Storage TypeScript Skill

Build Azure Queue Storage workers that send, receive, inspect, and manage messages in TypeScript or JavaScript.

Dev & Engineering ✓ Microsoft · Official

Azure Blob Storage for Python

Guides secure, production-minded Blob Storage operations in Python.

Dev & Engineering ✓ Microsoft · Official

Azure Key Vault SDK for Python

Gives Python coding agents practical guidance for securely managing Azure Key Vault secrets, keys, and certificates.

Dev & Engineering ✓ Microsoft · Official

Azure AI Content Safety for Python

Guides Python applications in detecting harmful text and images and enforcing custom blocklists.

Dev & Engineering ✓ Microsoft · Official

Azure App Configuration for Python

Centralize Python application settings, feature flags, and dynamic configuration in Azure.

Dev & Engineering ✓ Microsoft · Official

Azure Container Registry for Python

Manage Azure container images, artifacts, and repositories from Python.

Dev & Engineering ✓ Microsoft · Official

Azure Key Vault Certificates for Rust

Guides Rust applications in creating, managing, and using X.509 certificates in Azure Key Vault.

Dev & Engineering ✓ Microsoft · Official

Microsoft Entra App Registration

A practical guide to Entra app registration and OAuth integration.

Dev & Engineering ✓ Microsoft · Official

Azure Communication Common for Java

Guides Java developers through shared ACS authentication, token refresh, and communication identifier handling.

Dev & Engineering ✓ Microsoft · Official

Azure File Share for Python

Guides Python developers through secure Azure SMB share, directory, and file management.

Dev & Engineering ✓ Microsoft · Official

Azure Batch Java Job Orchestration

Run and manage large-scale parallel and HPC workloads on Azure from Java.

Dev & Engineering ✓ Microsoft · Official

Azure Web PubSub Real-Time Messaging

Build TypeScript WebSocket messaging, group communication, and live notification features with Azure Web PubSub.

Dev & Engineering ✓ Microsoft · Official

Azure Cosmos DB Python Service Builder

Build secure, testable Azure Cosmos DB NoSQL services for Python and FastAPI applications.

Dev & Engineering ✓ Microsoft · Official

Azure Identity for Rust

Configure Microsoft Entra ID authentication for Azure SDK clients written in Rust.

Dev & Engineering ✓ Microsoft · Official

Azure App Configuration for Java

Guides Java apps in centralizing settings, feature flags, and release snapshots.

Dev & Engineering ✓ Microsoft · Official

Azure Monitor OpenTelemetry for TypeScript

Add Application Insights observability to Node.js services with OpenTelemetry.

Dev & Engineering ✓ Microsoft · Official

Entra Authentication Events for .NET

Customize Entra ID authentication flows with Azure Functions.

Dev & Engineering ✓ Microsoft · Official

Azure Cosmos DB TypeScript Skill

Gives TypeScript and JavaScript coding agents practical Cosmos DB data-access patterns.

Related skills