agentleFS
korchard333korchard333/claude-power-platform-community/.claude/skills/azure-openai/SKILL.md

azure-openai

Skill46 starsChanged 8 months agoMITView on GitHub

Azure OpenAI and AI integration with Power Platform. Use when: Azure OpenAI, AOAI, AI Foundry, GPT, LLM, AI integration, BYOM, bring your own model, AI Builder prompts, structured output, AI architecture decisions, Copilot Studio custom models.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use managed identity: when possible — Azure Function with managed identity to AOAI is the most secure pattern

    line 41
  2. Distinctive:

    No retry logic on AI calls (AOAI returns 429 under load)

    line 52
  3. Distinctive:

    No token limit management (prompt + response exceeding model context window)

    line 53
  4. Distinctive:

    No cost monitoring on AOAI deployment (token costs can spike unexpectedly)

    line 56
  5. Distinctive:

    Not testing with representative data (AI behavior varies with real-world input)

    line 58

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: Azure OpenAI Integration

When to Use

Trigger when integrating Azure OpenAI (or AI Foundry models) with Power Platform — from Power Automate flows, Code Apps, Copilot Studio agents, or when making architecture decisions about which AI approach to use.


Integration Patterns

PatternDescriptionBest For
AI Builder promptsLow-code GPT prompts in flows/appsSimple text generation, classification, extraction
Azure AI Foundry connectorPower Automate connector to AOAIFlow-based AI with premium connector
HTTP connector to AOAIDirect REST calls to AOAI endpointFull control, streaming, advanced parameters
Custom API + Azure FunctionServer-side AI calls exposed via Custom APICode Apps, secure key management, streaming
Copilot Studio BYOMCustom model for agent responses/promptsDomain-specific agent behavior
Copilot Studio generative actionsAI selects actions dynamicallyContext-dependent automation

⚠️ REQUIRED: Load Sub-Files Before Implementation

SKILL.md is a summary only — it is NOT sufficient for implementation.

The detailed content (complete payloads, XML templates, working examples, edge-case handling) lives in sub-files in the same directory as this SKILL.md. Before writing any code, you MUST use read_file on the sub-files relevant to your task:

  • Power Automate + AI — AI Foundry connector in flows, HTTP connector to AOAI endpoints, prompt patterns, retry/fallback, structured output parsing, token limit management
  • Code Apps + AI — AOAI from Code Apps via Custom API or Azure Function (never client-side keys), streaming responses, chat UI patterns, React hooks for AI calls
  • Copilot Studio BYOM — Bring Your Own Model for prompts and response generation, AI Foundry model configuration, testing, monitoring token usage
  • AI Architecture Decisions — decision tree: Copilot Studio agent vs Azure AI Foundry agent vs Power Automate Agent Flow vs AI Builder vs direct AOAI, licensing implications, data residency

Key Principles

  1. Never expose API keys client-side — Code Apps and Canvas Apps must call AOAI via a server-side intermediary (Custom API, Azure Function, or Power Automate flow)
  2. Use managed identity when possible — Azure Function with managed identity to AOAI is the most secure pattern
  3. AI Builder for simple, Foundry for complex — AI Builder prompts are faster to build; direct AOAI is more flexible
  4. Monitor token consumption — set up alerts on Azure OpenAI usage to prevent unexpected costs
  5. Structured output — use JSON mode or function calling for parseable responses, not free-form text

Anti-Patterns

  • Exposing AOAI API keys in client-side code (Canvas/Code Apps)
  • Using GPT for deterministic tasks that don't need AI (regex, simple lookups)
  • No retry logic on AI calls (AOAI returns 429 under load)
  • No token limit management (prompt + response exceeding model context window)
  • Free-form text output when structured data is needed (use JSON mode)
  • Using AI Builder for everything (limited control, limited models)
  • No cost monitoring on AOAI deployment (token costs can spike unexpectedly)
  • Calling AOAI from every flow run without caching (expensive for repetitive queries)
  • Not testing with representative data (AI behavior varies with real-world input)

Related Skills

  • copilot-studio — Agent building, generative actions, knowledge sources
  • power-automate — Flow integration with AI connectors
  • code-apps — React UI patterns for AI features
  • licensing — AI Builder credits, Copilot Credits, AOAI consumption costs
  • integration-patterns — Azure Functions for server-side AI

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.