Skip to main content
rule official · GitHub

azure-functions-typescript — GitHub Copilot rule for Azure Functions

This rule guides Copilot when generating TypeScript APIs for Azure Functions, including async code and endpoint file layout. It also calls for updating the OpenAPI schema and README.md when the API changes.

Install into GitHub Copilot · Manually: put the files in place All methods and platforms ↓
.github/instructions/azure-functions-typescript.instructions.md
Open on GitHub

What azure-functions-typescript does

The rule applies to *.ts, *.js, and *.json files. It asks for modern TypeScript for Node.js and async/await for asynchronous work. For I/O, it favors APIs such as node:fs/promises to avoid blocking the event loop. Copilot should ask before adding a dependency.

The API uses Azure Functions with @azure/functions@4. Each endpoint belongs in its own file, following src/functions/<resource-name>-<http-verb>.ts. That convention shapes where generated functions go. When the API changes, update the OpenAPI schema if one exists, along with README.md; the rule also favors Node.js v22 LTS built-ins where possible.

What it helps with

  • organize API endpoints into separate function files
  • use asynchronous Node.js APIs for I/O
  • keep API changes reflected in the OpenAPI schema and README.md
  • ask before introducing project dependencies

Example prompts for the agent

  • Add an HTTP endpoint for orders in src/functions/orders-get.ts.
  • Replace blocking file access with an asynchronous Node.js API.
  • Update the API and bring its OpenAPI schema and README.md in line.

How to install azure-functions-typescript

Manually: put the files in place

.github/instructions/azure-functions-typescript.instructions.md

The applyTo field sets which files it applies to

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about azure-functions-typescript

How do I install azure-functions-typescript in GitHub Copilot?

Add the rule file to your project at .github/instructions/azure-functions-typescript.instructions.md.

What does azure-functions-typescript do?

It guides Copilot on TypeScript API code for Azure Functions, including async operations, endpoint file layout, and API documentation updates.

How should I name an endpoint function file?

Use src/functions/<resource-name>-<http-verb>.ts, with one function file per endpoint.

Source text

azure-functions-typescript.instructions.md · MIT
---
description: 'TypeScript patterns for Azure Functions'
applyTo: '**/*.ts, **/*.js, **/*.json'
---

## Guidance for Code Generation
- Generate modern TypeScript code for Node.js
- Use `async/await` for asynchronous code
- Whenever possible, use Node.js v22 LTS built-in modules instead of external packages
- Always use Node.js async functions, like `node:fs/promises` instead of `fs` to avoid blocking the event loop
- Ask before adding any extra dependencies to the project
- The API is built using Azure Functions using `@azure/functions@4` package.
- Each endpoint should have its own function file, and use the following naming convention: `src/functions/<resource-name>-<http-verb>.ts`
- When making changes to the API, make sure to update the OpenAPI schema (if it exists) and `README.md` file accordingly.

© github · MIT · github/awesome-copilot

Topics and platforms

All IDE rules for Cloud: AWS, Azure, GCP →

From the same set770

The whole set →
azure-verified-modules-bicep Instructs GitHub Copilot to use Azure Verified Modules when writing Bicep templates. It enforces AVM registry modules over raw Azure resource declarations. ★ 40,418repo stars azure-naming The rule makes GitHub Copilot name Azure resources following Microsoft CAF: type prefix, workload, environment, region, instance number. ★ 40,418repo stars azure-logic-apps-power-automate A GitHub Copilot rule that guides JSON workflow definitions for Azure Logic Apps and Power Automate: triggers, actions, error handling. ★ 40,418repo stars azure-iot-edge-architecture Requires reviewing Azure IoT Edge documentation before proposing architectures. It targets Bicep, Terraform, and edge-related markdown files. ★ 40,418repo stars azure-functions-csharp A GitHub Copilot rule that sets conventions for building Azure Functions in C# with the isolated worker model. Useful when you want consistent style across a functions project. ★ 40,418repo stars azure-durable-functions-csharp Sets guidelines for building C# Azure Durable Functions in the isolated worker model. Enforces replay safety, correct logging, and task hub configuration. ★ 40,418repo stars azure-devops-pipelines This rule guides Azure DevOps Pipeline YAML structure, testing, security, and deployment. Use it when reviewing or maintaining pipeline files. ★ 40,418repo stars aws-appsync Guides GitHub Copilot to write AWS AppSync Event API handlers using the constrained APPSYNC_JS runtime, official utilities, and strict data source patterns. ★ 40,418repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor