Agent Skill · Microsoft Visual Studio

int-patterns

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).

Provider: Microsoft Visual Studio Path in repo: skills/int-patterns/SKILL.md

Skill body

Copilot Studio Pattern Library

Only read the pattern file relevant to the current task — do NOT read all files.

How to use patterns

Patterns are recommendations, not requirements. How you present them depends on your role:

If you are the Advisor agent:

If you are the Author agent:

Pattern Index

JIT Glossary → jit-glossary.md

Loads customer-specific acronyms into a global variable on first message so the orchestrator can expand them before searching knowledge sources.

Read this pattern when:

JIT User Context → jit-user-context.md

Loads the current user’s M365 profile (country, department) into global variables for personalized answers.

Read this pattern when:

Dynamic Topic Redirect → dynamic-topic-redirect.md

Uses a Switch expression inside a BeginDialog node to route to different topics based on a variable.

Read this pattern when:

Prevent Child Agent Responses → prevent-child-agent-responses.md

Stops child agents from messaging users directly by instructing them to use output variables.

Read this pattern when:

Date Context → date-context.md

Injects the current date into agent instructions using Power Fx for accurate date-relative responses.

Read this pattern when:

Orchestrator-Generated Variables → orchestrator-variables.md

Uses AutomaticTaskInput to classify or extract structured data from the user’s message at orchestration time — zero extra cost or latency.

Read this pattern when:

Prevent Tool Call Leaks → prevent-tool-call-leaks.md

Stops the orchestrator from leaking internal reasoning and tool call metadata to the end user.

Read this pattern when:

Channel-Aware Behavior → channel-aware-behavior.md

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:

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:

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:

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:

Deterministic MCP Calls → deterministic-mcp-calls.md

Workarounds to improve MCP tool invocation reliability using instruction-based nudges or a dedicated child agent wrapper.

Read this pattern when:

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:

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:

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:

Combining patterns

Multiple patterns can be combined in a single agent. Common combinations:

Skill frontmatter

user-invocable: false context: fork