azure-dev extensions.instructions.md

Coding instructions for extensions to Azure Developer CLI, a command-line tool for building, deploying, and monitoring applications on Azure.

In plain words
What is it for?
Use them when adding or reviewing Azure Developer CLI extensions, especially subscription login, delete operations, cleanup, and style-guide compliance.
Why use it?
They prevent authentication mistakes in multi-tenant accounts and require careful handling of destructive commands and saved local state.

Instructions file for GitHub Copilot

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/azure/azure-dev/extensions
Clone the repo
git clone --depth 1 https://github.com/Azure/azure-dev

Made for: GitHub Copilot.

Per session 693 This file is loaded in full into every session.
When invoked 693 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00693 $0.00693
Opus 5 $0.00347 $0.00347
Sonnet 5 $0.00139 $0.00139
Haiku 4.5 $0.00069 $0.00069

Measured yesterday against content hash 43728a113e2f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

azure-dev extensions.instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/instructions/extensions.instructions.md · 45 lines

What it actually says

applyTo:

  • cli/azd/extensions/**

  • When accessing a Subscription from PromptSubscription(), always use Subscription.UserTenantId (user access tenant) for credential creation, NOT Subscription.TenantId (resource tenant). For multi-tenant/guest users these differ, and using TenantId causes authentication failures. The LookupTenant() API already returns the correct user access tenant.

  • When adding or reviewing destructive extension commands, verify the service API contract and local cleanup behavior end-to-end: confirm whether the API supports the requested delete scope, handle empty successful delete responses, avoid redundant pre-checks that later operations already cover, and clean up any persisted local state such as conversation or session IDs.

  • Follow extension guidelines in: cli/azd/docs/extensions/extensions-style-guide.md. If the work violates any of these principles, include a link to the guide so the user can read it and get ahead of some of the problems.

  • Reject explicitly-set flags that cannot take effect; never silently drop them. When a flag is explicitly supplied (check via cmd.Flags().Changed("<flag>")) but the selected code path ignores it — for example, --inspector-port with --no-client, or any agent-creation flag during a reuse flow, or init-only flags during a standalone-eject run — return a clear error that names the conflicting inputs. Automation scripts that pass explicit flags and receive a success exit code must be able to trust that those flags were honored. In extensions that provide internal/exterrors, report flag conflicts with exterrors.Validation(exterrors.CodeConflictingArguments, message, suggestion). Otherwise, follow the extension's established validation-error pattern.

  • Redact credentials from URLs before printing to terminal, logs, or error messages. URLs may carry credentials in the userinfo component (user:pass@host) or in the query string (SAS tokens, sig= parameters). Clear URL.User and drop RawQuery and Fragment before passing a URL to any output function, error message, or log call. redactURL in cli/azd/pkg/azdext/pagination.go and redactURLForDebug in cli/azd/extensions/azure.ai.training/pkg/client show the shape, but both only strip the query and fragment, so clear the userinfo as well. This applies to download URLs, clone URLs, registry addresses, and any URL stored in artifacts or uploaded CI outputs. Add a non-disclosure test that feeds a credential-bearing URL and asserts no sensitive portion appears in the output.

  • Keep output on the injected writer when a command handler or helper receives one; do not bypass it with direct writes to os.Stdout or os.Stderr, including in debug and diagnostic paths. Extensions that do not expose a writer must follow their local AGENTS.md output conventions. See "Keep terminal output on the injected writer" in cli/azd/AGENTS.md.

  • When behavior narrows, narrow the help text and doc comments with it.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 45 lines · 693 tokens per session scan A 43728a113e2f

Subscribe to this mod's changes

azure-dev extensions.instructions.md is an instructions file published in the GitHub repository Azure/azure-dev (567 stars, last pushed yesterday), licensed MIT. It adds 693 tokens to every session, about $0.0035 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories