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
Not recommended
49/ 100 5-point scale 2.5 / 5
Trust14 / 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.

Reliability7 / 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.

Adaptability9 / 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.

Convention9 / 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.

Effectiveness6 / 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.

Verifiability4 / 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 it does & when to 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.

Pros & cons

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 to install

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 to use

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.

Compared to similar skills

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 Python

A practical skill for securing Python Azure applications with Microsoft Entra ID credentials.

Dev & Engineering ✓ Microsoft · Official

Azure Event Hubs Java Skill

Build production-oriented Java event streaming applications on Azure Event Hubs.

Dev & Engineering ✓ Microsoft · Official

Azure Tables for Python

A practical guide to building authenticated Azure Tables applications with Python entity CRUD, queries, and partition-scoped batch operations.

Dev & Engineering ✓ Microsoft · Official

Azure Identity for TypeScript

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

Automation & Ops ✓ Microsoft · Official

Azure Reliability Advisor

Assess and improve reliability for Azure Functions and App Service.

Dev & Engineering ✓ Microsoft · Official

Azure Cloud Architect

Guides coding agents through production-grade Azure architecture design and review using Azure Architecture Center practices.

Dev & Engineering ✓ Microsoft · Official

Azure AI Text Analytics for Python

Guides Python developers through Azure-powered text analysis and NLP workflows.

Automation & Ops ✓ Microsoft · Official

Azure Resource Architecture Visualizer

Analyze Azure resource groups and turn their dependencies into detailed Mermaid architecture diagrams.

Dev & Engineering ✓ Microsoft · Official

Azure Maps for .NET

Build .NET location features for search, routing, maps, geolocation, and weather.

Dev & Engineering ✓ Microsoft · Official

Azure AI Vision Image Analysis

Guides Python coding agents in implementing Azure AI Vision image understanding.

Dev & Engineering ✓ Microsoft · Official

Azure Blob Storage for Python

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

Dev & Engineering ✓ Microsoft · Official

Azure Queue Storage for Python

Gives coding agents reliable Python patterns for secure Azure Queue Storage messaging and asynchronous task processing.

Automation & Ops ✓ Microsoft · Official

Azure AI Gateway Governance

Use Azure API Management to govern traffic across AI models, MCP tools, and agents.

Automation & Ops ✓ Microsoft · Official

AKS Automatic Readiness

Assess Kubernetes workloads for AKS Automatic compatibility and identify migration blockers before you switch.

Dev & Engineering ✓ Microsoft · Official

Azure Cosmos DB ARM for .NET

Provision and manage Azure Cosmos DB resources from .NET through ARM.

Dev & Engineering ✓ Microsoft · Official

Azure Playwright Workspace Manager

Provision and manage Microsoft Playwright Testing workspaces with .NET and Azure Resource Manager.

Dev & Engineering ✓ Microsoft · Official

Azure Cosmos DB for Python

A practical guide for building reliable Python applications on Azure Cosmos DB’s NoSQL API.

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 API Management for Python

Gives coding agents practical Python SDK patterns for managing Azure API Management services, APIs, products, subscriptions, and policies.

Dev & Engineering ✓ Microsoft · Official

Azure Monitor Query for Python

Generate Python code for querying Azure Monitor logs and metrics.

Related skills