Skip to content
5 changes: 3 additions & 2 deletions plugin/skills/azure-prepare/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: "Prepare Azure apps for deployment (infra Bicep/Terraform, azure.ya
license: MIT
metadata:
author: Microsoft
version: "1.0.10"
version: "1.0.11"
---

# Azure Prepare
Expand Down Expand Up @@ -35,7 +35,8 @@ Activate this skill when user wants to:
5. **Validate before deploy** — Invoke azure-validate before azure-deploy
6. **Confirm Azure context** — Use `ask_user` for subscription and location per [Azure Context](references/azure-context.md)
7. ❌ **Destructive actions require `ask_user`** — [Global Rules](references/global-rules.md)
8. **Scope: preparation only** — This skill generates infrastructure code and configuration files. Deployment execution (`azd up`, `azd deploy`, `terraform apply`) is handled by the **azure-deploy** skill, which provides built-in error recovery and deployment verification.
8. ⛔ **NEVER delete user project or workspace directories** — When adding features to an existing project, MODIFY existing files. `azd init -t <template>` is for NEW projects only; do NOT run `azd init -t` in an existing workspace. Plain `azd init` (without a template argument) may be used in existing workspaces when appropriate. File deletions within a project (e.g., removing build artifacts or temp files) are permitted when appropriate, but NEVER delete the user's project or workspace directory itself. See [Global Rules](references/global-rules.md).
9. **Scope: preparation only** — This skill generates infrastructure code and configuration files. Deployment execution (`azd up`, `azd deploy`, `terraform apply`) is handled by the **azure-deploy** skill, which provides built-in error recovery and deployment verification.

---

Expand Down
2 changes: 2 additions & 0 deletions plugin/skills/azure-prepare/references/global-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ ask_user(
- Do NOT assume user wants to delete/overwrite
- Do NOT proceed based on "the user asked to deploy" (deploy ≠ delete old)
- Do NOT batch destructive actions without individual confirmation
- ⛔ Do NOT delete user project or workspace directories (e.g., `rm -rf <project-dir>`) even when adding features, converting, or migrating — use MODIFY mode to edit existing files instead. File deletions within a project (e.g., removing build artifacts or temp files) are permitted when appropriate.
- ⛔ `azd init -t <template>` (and any `azd init` command with a template argument) is for NEW projects only — run it **only** in an empty/new directory. If the user explicitly requests re-initialization of an existing project, create a separate new directory, run the template there, and then migrate changes into the existing project with user-confirmed edits. Never run `azd init -t` directly in a non-empty existing workspace. `azd init` without a template argument may be used in existing workspaces when appropriate.

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@ Templates for hosting MCP (Model Context Protocol) servers on Azure Functions.

**Indicators**: `mcp_tool_trigger`, `MCPTrigger`, `@app.mcp_tool`, project name contains "mcp"

## Standard MCP Templates
> ⚠️ **Warning: Templates are for NEW projects only.**
> If the user has an existing Azure Functions project, do NOT use `azd init` — this will overwrite their workspace.
> For existing projects, use the **recipe approach** instead: [recipes/mcp/](recipes/mcp/README.md).
> ⛔ **NEVER run `rm -rf` or delete the user's project/workspace directory under any circumstances.** For all other destructive actions (excluding deletion of user workspaces), follow `ask_user` confirmation rules as described in [global-rules.md](../../../global-rules.md).

## When to Use Templates vs. Recipes

| Scenario | Action |
|----------|--------|
| **New project** — no existing code | Use `azd init -t` template below |
| **Existing project** — add MCP support | Use [recipes/mcp/](recipes/mcp/README.md) — modify existing files, do NOT reinitialize |

## Standard MCP Templates (NEW projects only)

| Language | Template |
|----------|----------|
Expand All @@ -13,13 +25,13 @@ Templates for hosting MCP (Model Context Protocol) servers on Azure Functions.
| C# (.NET) | `azd init -t remote-mcp-functions-dotnet` |
| Java | `azd init -t remote-mcp-functions-java` |

## MCP + API Management (OAuth)
## MCP + API Management (OAuth) (NEW projects only)

| Language | Template |
|----------|----------|
| Python | `azd init -t remote-mcp-apim-functions-python` |

## Self-Hosted MCP SDK
## Self-Hosted MCP SDK (NEW projects only)

| Language | Template |
|----------|----------|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ This recipe creates functions that respond to blob creation/deletion events via
| **Auth** | Managed Identity (UAMI) |
| **IaC** | ✅ Full template available |

## AZD Templates (Recommended)
## AZD Templates (NEW projects only)

> ⚠️ **Warning:** Use these templates only for **new projects**. If the user has an existing Azure Functions project, use the **Composition Steps** below to modify existing files instead.

Use these templates directly instead of composing from HTTP base:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ This recipe creates functions that respond to row changes in Azure SQL Database
| **Auth** | Entra ID (Managed Identity) |
| **IaC** | ✅ Full template available |

## AZD Templates (Recommended)
## AZD Templates (NEW projects only)

> ⚠️ **Warning:** Use these templates only for **new projects**. If the user has an existing Azure Functions project, use the **Composition Steps** below to modify existing files instead.

Use these templates directly instead of composing from HTTP base:

Expand Down
Loading