azure-apim-policy

Translate user requirements into Azure API Management policy XML.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/ukhan262/github-copilot-agent-skills --skill azure-apim-policy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-apim-policy
Source: https://github.com/ukhan262/github-copilot-agent-skills/tree/main/.github/skills/azure-apim-policy
Command: npx skills add https://github.com/ukhan262/github-copilot-agent-skills --skill azure-apim-policy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Azure API Management policy authoring is complex and error-prone. This Skill provides a self-contained way to write, review, repair, and explain APIM policy XML, translating user requirements into correct policy blocks and validating structure against best practices.

Core Features & Use Cases

  • Write a new policy: Build policy XML from requirements so it can be pasted into APIM.
  • Fix or refactor a policy: Preserve behavior and correct structure, syntax, and naming.
  • Explain a policy: Summarize a policy's overall behavior and walk through each section for clarity.
  • Review a policy: Identify correctness issues, risks, placeholders, and deployment considerations.
  • Generate a fragment: Return a targeted section (inbound, backend, outbound, or on-error) when requested.

Quick Start

Provide a ready-to-paste APIM policy XML snippet that satisfies the user's described scenario.

Frequently Asked Questions about azure-apim-policy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write Azure API Management policy XML to validate JWT tokens?

To enforce CORS in Azure API Management policy XML, you generate a policy block for the inbound phase that defines allowed origins, methods, and headers. This ensures cross-origin requests are handled correctly before backend routing.

How do I fix or refactor incorrect APIM policy XML without changing its behavior?

To validate JWT tokens in Azure API Management policy XML, you generate a runnable inbound policy block with placeholders for required values. The policy enforces authentication by checking token claims and signatures before routing requests to the backend.

How do I enforce CORS in Azure API Management policy XML?

Fixing APIM policy XML involves reviewing the existing structure, syntax, and naming to correct errors while preserving the original behavior. The process identifies risks, missing placeholders, and deployment considerations to ensure safe refactoring.

What is the best way to configure rate limiting in Azure APIM policies?

The best way to configure rate limiting in Azure APIM policies is to generate an inbound policy XML block that applies call-count quotas. This enforces traffic limits dynamically based on user requirements and best practices.

Can I generate a specific policy fragment for the backend or outbound phase instead of a full policy?

Yes, you can generate targeted policy fragments for the backend, outbound, or on-error phases individually. This returns specific XML sections for dynamic backend selection or response transformation without writing a complete policy.

Why does my APIM policy XML fail during deployment and how can I review it?

APIM policy XML deployment failures often stem from structural errors or invalid syntax. Reviewing the policy identifies correctness issues, risks, and placeholders, validating the structure against best practices before deployment.