best-practices

Configure Copilot Studio agents with JIT glossary and user context provisioning.

391|88|Updated Jan 13, 2026
One-click install
npx skills add https://github.com/microsoft/skills-for-copilot-studio --skill best-practices-microsoft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: best-practices
Source: https://github.com/microsoft/skills-for-copilot-studio/tree/main/skills/best-practices
Command: npx skills add https://github.com/microsoft/skills-for-copilot-studio --skill best-practices-microsoft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides concise, tested authoring patterns and initialization templates that ensure Copilot Studio agents load the right context, route user intents correctly, and avoid common orchestration mistakes such as premature connector calls, ambiguous date handling, or child agents messaging users directly.

Core Features & Use Cases

  • JIT Glossary Loading: Load customer-specific acronyms into a conversation-scoped global variable on first user message to improve knowledge retrieval without returning the glossary to users.
  • JIT User Context Provisioning: Fetch M365 profile fields (country, department, display name) once per conversation to enable country-aware answers and knowledge routing.
  • Initialization & Routing Patterns: Templates for OnActivity conversation-init topics, dynamic BeginDialog Switch expressions for topic redirects, orchestrator-generated variables for classification-based knowledge searches, and date-context injection for time-relative queries.
  • Safety & Orchestration Controls: Guidance on preventing child agents from sending direct messages and validation checklists for knowledge sources, connector setup, and fallback handling.

Quick Start

Open the best-practices skill and apply the conversation-init topic template to add JIT glossary and user context provisioning to your agent so it loads contextual variables on the first user message.

Frequently Asked Questions about best-practices

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

FAQPage Schema
How do I load user context and glossaries when a Copilot Studio conversation starts?

Use conversation-init topics with Power Fx to provision JIT glossary and M365 user context. This loads customer-specific acronyms and profile fields into global variables on the first user message, enabling country-aware answers without returning the glossary directly to users.

How do I dynamically route topics in Copilot Studio based on user intent?

Dynamic topic routing uses BeginDialog Switch expressions in Adaptive Dialog topics. You can redirect conversations based on runtime conditions and orchestrator-generated variables for classification-based knowledge searches.

How do I prevent child agents from sending direct messages to users in Copilot Studio?

Apply safety and orchestration controls during agent authoring to prevent child agents from messaging users directly. Use validation checklists for knowledge sources, connector setup, and fallback handling to avoid unintended orchestration mistakes.

How do I handle time-relative queries and ambiguous dates in Copilot Studio agents?

Inject date-context using Power Fx expressions during topic initialization. This provides the runtime with the necessary temporal context to resolve ambiguous date handling and accurately process time-relative user queries.

Do I need Dataverse storage to configure a JIT glossary in Copilot Studio?

Yes, configuring knowledge sources or Dataverse storage is required for glossary data. The skill requires Copilot Studio agent YAML edits and an M365 Users connector to fetch profile data for country-aware knowledge routing.

What is the best way to initialize orchestrator variables for knowledge routing?

Use OnActivity conversation-init topic templates to initialize orchestrator-generated variables. This ensures classification-based knowledge searches load the correct context and route user intents without premature connector calls.