azure-functions-create
Skill22 starsChanged 11 days agoMITView on GitHub
Scaffold a new Azure Functions project, or add a new function/trigger to an existing project without re-initializing it
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- microsoft/azure-dev-toolsedited, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- microsoft/azure-dev-tools★ 1182% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository67 other files it gives its agents.
- AGENTS.mdAGENTS.md
- evals/azure-functions-update/fixtures/AGENTS.mdAGENTS.md
- starter/hosted-skills/agent-files/AGENTS.mdAGENTS.md
- templates/agents/AGENTS.mdAGENTS.md
- templates/starter/agent-files/hosted-skills/AGENTS.mdAGENTS.md
- tests/fixtures/starter/agent-files/AGENTS.mdAGENTS.md
- tests/fixtures/starter/agent-files-unknown/AGENTS.mdAGENTS.md
- starter/hosted-skills/agent-files/CLAUDE.mdCLAUDE.md
- templates/starter/agent-files/hosted-skills/CLAUDE.mdCLAUDE.md
- tests/fixtures/starter/agent-files/CLAUDE.mdCLAUDE.md
- tests/fixtures/starter/agent-files-unknown/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- starter/hosted-skills/agent-files/copilot-instructions.mdCopilot instructions
- templates/starter/agent-files/hosted-skills/copilot-instructions.mdCopilot instructions
- tests/fixtures/starter/agent-files/copilot-instructions.mdCopilot instructions
- tests/fixtures/starter/agent-files-unknown/copilot-instructions.mdCopilot instructions
- azure-functions-best-practicesSkill
- azure-functions-commonSkill
- azure-functions-connector-createSkill
- azure-functions-connector-mcpSkill
- azure-functions-connector-validateSkill
- azure-functions-createSkill
- azure-functions-deploySkill
- azure-functions-diagnosticsSkill
- azure-functions-doctorSkill
- azure-functions-feedbackSkill
- azure-functions-health-statusSkill
- azure-functions-helpSkill
- azure-functions-hosted-skills-migrateSkill
- azure-functions-hosted-skillsSkill
- azure-functions-inventorySkill
- azure-functions-setupSkill
- azure-functions-updateSkill
- frdSkill
- azure-functions-best-practicesSkill
- azure-functions-commonSkill
- azure-functions-deploySkill
- azure-functions-diagnosticsSkill
- azure-functions-doctorSkill
- azure-functions-feedbackSkill
- azure-functions-health-statusSkill
- azure-functions-helpSkill
- azure-functions-inventorySkill
- azure-functions-setupSkill
- azure-functions-updateSkill
- azure-functions-connector-createSkill
- azure-functions-connector-mcpSkill
- azure-functions-connector-validateSkill
- azure-functions-hosted-skills-migrateSkill
- azure-functions-hosted-skillsSkill
- azure-functions-best-practicesSkill
- azure-functions-commonSkill
- azure-functions-connector-createSkill
- azure-functions-connector-mcpSkill
- azure-functions-connector-validateSkill
- azure-functions-createSkill
- azure-functions-deploySkill
- azure-functions-diagnosticsSkill
- azure-functions-doctorSkill
- azure-functions-feedbackSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. About 0 are common, 15 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Ensure func (Azure Functions Core Tools v4) is installed.
- Distinctive: line 21
Before selecting a template for an existing app, identify its language and programming model from source and configuration.
- Very specific: line 25
If the target is requested or detected as Go, inspect host.json, local runtime settings, Go source, and modules.
- Distinctive: line 51
Check whether the following Azure MCP tools are available in your current tool list:
- Distinctive: line 70
Use the Azure MCP Server as the authoritative source of truth for Azure Functions templates.
- Very specific: line 74
If get_azure_bestpractices is available, call it first:
- Distinctive: line 84
Ask the user (or detect from context):
- Very specific: line 93
Call functions_language_list.
- Very specific: line 95
Call functions_project_get for the selected language before browsing its templates.
- Very specific: line 99
Call functions_template_get with only the language parameter (omit template).
- Distinctive: line 101
If no returned Go template matches the requested trigger, try Path B.
- Very specific: line 106
Do not invent or guess template identifiers such as HttpTrigger.
- Distinctive: line 108
When the user asks for a common trigger name, map it to one of the template IDs returned by the MCP list before calling the template-get …
- Very specific: line 124
If a template-get call fails with "template not found", immediately recover by calling functions_template_get again with only language, …
- Distinctive: line 129
Never mark creation complete from a template list alone.
- Very specific: line 133
Use the functions_project_get result from A.2:
- Distinctive: line 140
Write any returned project-level files into an approved new target directory.
- Very specific: line 144
Call functions_template_get with both language and template:
- Distinctive: line 174
After the host reports the function endpoints/listeners:
- Distinctive: line 177
Timer triggers: verify the listener starts and, when practical, temporarily use a short development-only schedule or manual invocation …
- Distinctive: line 179
Before installing or starting any emulator/local service: ask the user for confirmation.
- Distinctive: line 186
Use this path when Azure MCP tools are unavailable or cannot retrieve a suitable template.
- Distinctive: line 192
Follow this manifest-based fallback algorithm:
- Distinctive: line 248
Ask before installing or starting emulators.
- Distinctive: line 258
Follow the Core Tools fallback in references/go-project.md.
- Very specific: line 266
If host.json already exists, do not re-initialize.
- Very specific: line 272
MCP path: call functions_template_get with the same language as the existing project, the desired returned template ID, and output: Add.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Language: Always respond in the same language the user is using.
azure-functions-create — Create or Extend Azure Functions App
Guide the user through creating a new Azure Functions project or adding a function to an existing Azure Functions project.
Prerequisites
Ensure func (Azure Functions Core Tools v4) is installed. If not, suggest running azure-functions-setup first.
Workflow
Step 0 — Preserve an existing programming model
Before selecting a template for an existing app, identify its language and programming model from source and configuration. Preserve that model when adding a function; do not reinitialize the project or use a template from a different programming model.
If the target is requested or detected as Go, inspect host.json, local runtime
settings, Go source, and modules. Classify it as one of:
- New Go project — no existing Functions app is being extended.
- Existing app confirmed to use the Go worker — Go worker source/modules and configuration agree.
- Existing Go custom handler — a
customHandlerblock and its Go executable/source identify the custom-handler model. - Unknown or conflicting model — evidence is missing or disagrees. Stop and resolve the model before selecting templates or editing files.
For a Go custom handler, preserve its handler, runtime custom,
host.json.customHandler, and per-function function.json. Extend that model and route
to azure-functions-update only when migration is explicitly requested.
For a new Go project or an existing app confirmed to use the Go worker, load references/go-project.md for prerequisites, configuration, and registration rules. Go templates are available through MCP and the manifest; discover the current catalog rather than assuming a fixed template set.
Path C is only for a new project in an approved empty directory. For an existing app
confirmed to use the Go worker, use an MCP template with output: Add or use the
verified worker registration APIs; never enter a scaffold path.
Step 1 — Detect Azure MCP tools
Check whether the following Azure MCP tools are available in your current tool list:
functions_language_list— list supported languages and runtime versionsfunctions_project_get— scaffold project-level filesfunctions_template_get— list templates (language only) or get a specific template (language + template)
These are provided by the Azure MCP Server (@azure/mcp) and return officially maintained templates across C#, Python, TypeScript, JavaScript, Java, PowerShell, and Go.
Also check for the best practices tool:
get_azure_bestpractices/get_azure_bestpractices_getwithresource: azurefunctions- If available → proceed with Path A (MCP primary).
- If not available → proceed with Path B (composition algorithm fallback).
Path A — MCP primary (recommended)
Use the Azure MCP Server as the authoritative source of truth for Azure Functions templates. Do not write function code from scratch when these tools are available.
A.1 Gather requirements & best practices
If get_azure_bestpractices is available, call it first:
Tool: get_azure_bestpractices
resource: azurefunctions
action: code-generationApply the returned guidelines (programming models, extension bundles version, authentication levels, project structure, etc.) to every file you generate in the steps below.
Ask the user (or detect from context):
- Language:
csharp|python|typescript|javascript|java|powershell|go - Trigger / template: let the MCP list decide (step A.3)
- Project name: directory name
- Runtime version (optional): e.g. Node.js
22, Python3.11, Java21
A.2 Discover supported languages
Call functions_language_list. Returns supported languages with runtime versions, programming models, and prerequisites. Use this to confirm the user's language choice is supported and to suggest a default runtime version.
Call functions_project_get for the selected language before browsing its templates. It can return setup instructions and project structure without file contents; do not treat metadata alone as a complete scaffold.
A.3 Browse available templates
Call functions_template_get with only the language parameter (omit template). This returns the list of available templates for the chosen language with descriptions. Present the templates to the user and let them pick.
If no returned Go template matches the requested trigger, try Path B. For a new Go project, Path C is the final scaffold fallback. For an existing app confirmed to use the Go worker, use the verified worker registration APIs instead. Do not substitute an unrelated trigger, change programming models, or silently change the hosting target.
Do not invent or guess template identifiers such as HttpTrigger. Azure MCP template IDs are versioned, language-specific strings returned by the template list. For example, the TypeScript HTTP trigger template is currently returned as http-trigger-typescript-azd.
When the user asks for a common trigger name, map it to one of the template IDs returned by the MCP list before calling the template-get operation. Examples:
| User intent | Language | Prefer a returned template ID like |
| HTTP trigger | typescript | http-trigger-typescript-azd |
| Timer trigger | typescript | timer-trigger-typescript-azd |
| Blob trigger | typescript | blob-eventgrid-trigger-typescript-azd |
| Queue / Service Bus trigger | typescript | servicebus-trigger-typescript-azd |
| Office 365 Outlook connector trigger (new, flagged, or mentioned email; new, upcoming, or updated calendar events; shared mailbox email) | csharp / typescript / python | office365-connector-trigger-<language> |
| SharePoint Online connector trigger (new, updated, or deleted files and list items; form submissions; file classification; recurring digest) | csharp / typescript / python | sharepoint-connector-trigger-<language> |
| Microsoft Teams connector trigger driving an AI hosted skill (IT helpdesk) | python | ai-hosted-skills-teams-helpdesk-connector-python |
Connector trigger templates receive events from a Connector Namespace (Microsoft.Web/connectorGateways). They provision an OAuth connection that the user must authorize in a post-deploy step. The Office 365 TypeScript template contains only a new-email trigger. The other Office 365 and SharePoint templates include several triggers; keep the ones the user needs and remove the rest. For the Teams helpdesk hosted skill, use azure-functions-hosted-skills, not this skill.
Only the connectors above have connector trigger templates. For any other connector, such as Teams (without a hosted skill), OneDrive, Azure Blob, Dataverse, Salesforce, Planner, or Azure DevOps, do not guess a template ID like teams-connector-trigger-python. Check the returned template list. If no template matches, tell the user that no official template exists, and ask whether to start from the closest returned template or use azure-functions-hosted-skills for a connector-triggered AI agent.
If a template-get call fails with "template not found", immediately recover by calling functions_template_get again with only language, then select the closest returned template ID instead of retrying the failed alias.
Catalog discovery does not prove that a template can be downloaded or deployed. For retrieval/network failures, report the failed operation and try Path B. Use Path C only for a new Go project; extend an existing Go worker app through its registration APIs. Never mark creation complete from a template list alone.
A.4 Initialize the project
Use the functions_project_get result from A.2:
Tool: functions_project_get
language: <chosen language, e.g. typescript>Write any returned project-level files into an approved new target directory. If the result contains only instructions/structure, use those with the files returned in A.5 instead. Do not overwrite or reinitialize an existing project.
A.5 Add the function
Call functions_template_get with both language and template:
Tool: functions_template_get
language: <chosen language, e.g. typescript>
template: <chosen returned template ID, e.g. http-trigger-typescript-azd>
runtime-version: <optional, e.g. 22>
output: <optional, "New" (default) or "Add" for existing projects>Returns the full function source code plus any required app settings and additional package dependencies. Write the returned file(s) into the project and merge any extra settings into local.settings.json and any extra packages into the dependency manifest.
⚠️ Large template output: Some templates (especially
*-azdvariants that include infrastructure files) can produce very large output (100KB+). If the tool output is truncated or saved to a temporary file, read the file, parse the JSONfilesarray, and write each file individually. After writing files, runnpm install(or the equivalent package manager command) to generate lock files rather than relying on lock files from the template output.
A.6 Verify
For TypeScript and other compiled-language projects, build first:
npm run build # TypeScript / JavaScript
# dotnet build # C#
# mvn package # JavaThen perform an end-to-end local verification, not just a host start:
func startAfter the host reports the function endpoints/listeners:
- HTTP triggers: send an actual request to the local endpoint and verify the status code and response body, for example
curl http://localhost:7071/api/<FunctionName>?name=World. - Timer triggers: verify the listener starts and, when practical, temporarily use a short development-only schedule or manual invocation approach; restore the user's intended schedule before finishing.
- Storage, Cosmos DB, SQL, Redis, Dapr, or other service-backed triggers/bindings: load
azure-functions-common/references/local-emulators.md, identify the required local emulator or development service, and run a realistic message/blob/document/event through the trigger when the user wants E2E verification. - Before installing or starting any emulator/local service: ask the user for confirmation. If the user says the emulator is not needed, unavailable, or should be skipped, do not install it; record that emulator-backed E2E was skipped and provide manual/Azure test steps instead.
- When no practical local emulator exists: explain the limitation, suggest a temporary Azure dev resource or deployment-based test, and keep the local verification to build + host/listener startup.
Path B — Composition algorithm fallback
Use this path when Azure MCP tools are unavailable or cannot retrieve a suitable template. When the tools are unavailable, show this notice to the user verbatim (translate to the user's language if needed):
ℹ️ Azure MCP tools were not found; using the manifest-based fallback path. Enabling the Azure MCP Server unlocks dynamic template discovery and composition. Run
azure-functions-setupto configure it.
B.1 Fallback algorithm
Follow this manifest-based fallback algorithm:
1. FETCH MANIFEST
GET https://cdn.functions.azure.com/public/templates-manifest/manifest.json
If fetch fails → fall back to:
https://github.com/Azure/azure-functions-templates/blob/dev/Functions.Templates/Template-Manifest/manifest.json
If both fail → fall back to known-good Azure-Samples/functions-quickstart-* repos
If all fail → for a new Go project use Path C; for an existing Go worker app use
verified registration APIs; otherwise report error and ask user to retry later
2. FILTER TEMPLATES
Filter by: language, resource, iac
If no suitable Go trigger template matches → use Path C only for a new project;
use verified registration APIs for an existing Go worker app
3. CHECK SINGLE-TEMPLATE MATCH
If one template covers ALL requirements → use it alone
4. SELECT TEMPLATES
- Trigger template (REQUIRED) — base project with IaC
- Binding templates (OPTIONAL) — extract patterns only
5. DOWNLOAD TEMPLATES
For each template:
- If folderPath == "." → ZIP download + unzip
- If folderPath != "." → fetch tree + raw github url file downloads
- Fallback: git clone --depth 1
6. COMPOSE
- Use trigger template as BASE
- EXTRACT binding patterns from binding templates
- MERGE IaC resources, RBAC roles and settings
- ADD user's custom business logic
7. TRIM unused demo code (keep AzureWebJobsStorage)
8. WRITE all files
9. HANDOFF: azure-functions-deploy only when deployment is separately requestedB.2 Quick code reference
For minimal HTTP trigger snippets per language (last-resort fallback when the manifest is also unavailable), see references/language-snippets.md.
B.3 Verify
Build compiled projects first, then perform the same local E2E verification standard used in Path A:
func start- For HTTP triggers, send a real request to the local endpoint and validate the response.
- For non-HTTP triggers, consult
azure-functions-common/references/local-emulators.mdand use an emulator/local service when practical. - Ask before installing or starting emulators. If the user declines, skip emulator-backed E2E and document the skipped verification plus manual/Azure test steps.
Path C — Go Core Tools fallback
Path C is only for a new project in an approved empty directory. Use it when MCP and manifest retrieval cannot provide a suitable Go template. Never use it to extend or repair an existing app.
Follow the Core Tools fallback in references/go-project.md. Never scaffold another language as a substitute.
Go is GA on Linux Flex Consumption. Confirm preview availability and acceptance for a Linux Elastic Premium or Dedicated target before production deployment.
Adding functions to existing projects
If host.json already exists, do not re-initialize. Instead:
- Programming-model gate: identify the existing language and model before selecting
templates. For a Go custom handler, preserve the dispatch/HTTP-forwarding model,
host.json.customHandler, runtimecustom, and per-functionfunction.json; add the requested handler and metadata without merging Go worker templates. - MCP path: call
functions_template_getwith the same language as the existing project, the desired returned template ID, andoutput: Add. Merge only the needed function code, dependencies, and settings; do not replace the existing project or deploy its template infrastructure. - Fallback path: fetch the manifest, filter for the desired template by language and resource, download the template source, and merge the function files into the existing project.
- Go worker registration only: merge the relevant MCP template pattern when
available, or use the verified worker APIs. Add another
app.*registration and, for an extension trigger, the blank import.func newis not supported for apps using the Go worker. Do not use Path C, runfunc initorgo mod initagain, or createfunction.json. See references/go-project.md.
After Creation
✅ Your project is scaffolded! Next: use azure-functions-deploy to deploy to Azure.
Next steps
- On success, suggest
azure-functions-deploybecause the project is ready to deploy to Azure. - On failure, suggest
azure-functions-setupto verify local tooling and prerequisites.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

