Pattern library for Copilot Studio agent design. Contains proven and recommended implementation patterns with YAML examples. Used by the Advisor agent to suggest patterns and by the Author agent to reference YAML structure during implementation. USE FOR: design guidance, pattern suggestions, review against best practices, troubleshooting known pitfalls, YAML reference during implementation. DO NOT USE FOR: general YAML schema reference (use int-reference), topic creation mechanics (use new-topic).
3k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
386
stars on the repo
on the repository, not the skill itself
Install
one command, takes just this skill from the repository
Detects the host channel from System.Activity.ChannelId and gates behavior per surface (Teams, M365 Copilot, web chat, Direct Line, voice).
Read this pattern when:
A feature works on one channel but breaks on another (file upload, Adaptive Card variants, hyperlinks)
The user asks to detect Teams vs. M365 Copilot vs. web vs. voice
A naive =Lower(ChannelId) = "msteams" check is silently failing for msteams:Copilot or other compound channel IDs
RAI Error Handling → rai-error-handling.md
Classifies Azure OpenAI content-filter errors by subcode in the OnError topic and returns category-specific user messages with telemetry. Azure OpenAI models only — does not work with Anthropic or xAI models.
Read this pattern when:
The user needs industry-specific or empathetic error messages for RAI content-filter violations
The user wants category-specific handling (e.g., crisis resources for self-harm, security messaging for jailbreak attempts)
The user asks about OnError, ContentFiltered, Azure OpenAI content filters, or RAI subcodes
Line Breaks in Messages → line-breaks-in-messages.md
Uses <br /><br /> inside message and question nodes to render reliable paragraph spacing across channels.
Read this pattern when:
Users report that bot messages feel like walls of text
Multi-part questions or welcome messages need visual separation
The user asks about line breaks, <br />, or formatting in messages or questions
Knowledge Hold Message → knowledge-hold-message.md
Sends a randomized hold message during knowledge search so users know the agent is working.
Read this pattern when:
The agent has noticeable knowledge-search latency
Users are abandoning conversations or resending questions during delays
The user asks about OnKnowledgeRequested, typing indicators, or hold messages
Workarounds to improve MCP tool invocation reliability using instruction-based nudges or a dedicated child agent wrapper.
Read this pattern when:
An MCP tool must fire every time for a specific intent but the orchestrator skips it
The user asks about forcing MCP tool invocation or / syntax with MCP tools
The user needs deterministic tool calls for business-critical workflows
Chain of Thought Logging → chain-of-thought-logging.md
Sends high-level "Thinking" messages during multi-step orchestration to improve observability and perceived responsiveness.
Read this pattern when:
The agent uses multiple tools, MCP servers, or child agents that chain together
Users experience long silences during multi-step reasoning
The user wants a debug or observability trace of orchestrator behavior
The user asks about streaming, typing indicators, or progress messages for complex flows
Conversation History Variable → conversation-history-variable.md
Captures a best-effort conversation transcript into a variable for escalation, logging, and downstream automation.
Read this pattern when:
The user needs to capture conversation context for live-agent escalation
A downstream tool or connector requires conversation history as input
The user wants to log conversations to Dataverse, a ticketing system, or email
Teams Production Hardening → teams-production-hardening.md
Eight coordinated production patterns for Teams and M365 Copilot agents covering reinstalls, stale context, resets, diagnostics, and suggested prompts.
Read this pattern when:
The user is deploying or hardening a Copilot Studio agent on Microsoft Teams
Users report stale context after returning to a long-running Teams conversation
Context variables work on web chat but not in Microsoft 365 Copilot
The user wants richer OnError or Start Over experiences with diagnostic info
The user asks about OnInstallationUpdate, OnInactivity, OnSystemRedirect, suggested prompts, or Teams-specific behavior
Combining patterns
Multiple patterns can be combined in a single agent. Common combinations:
JIT Glossary + JIT User Context → merge into a single conversation-init OnActivity topic (template at templates/topics/conversation-init.topic.mcs.yml)
Date Context + JIT User Context → both go in agent instructions; date is a Power Fx expression, user context is a global variable reference
Orchestrator Variables + JIT User Context → classify by category AND personalize by country for precise knowledge routing
RAI Error Handling + Teams Production Hardening → handle RAI subcodes first in OnError, then fall through to the generic diagnostic card from Pattern 7
Knowledge Hold Message + Chain of Thought Logging → use hold messages for knowledge-heavy agents and CoT logging for multi-tool agents; both reduce perceived latency but solve different problems
Teams Production Hardening + JIT User Context → Pattern 4 sets Global.UserContext cross-channel; replace hard-coded values with the JIT User Context connector call for real profile data
How to use it
Copy the folder
Take microsoft/int-patterns from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
Check the name does not clash
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.