Best practices for Copilot Studio agents. Covers JIT glossary loading (customer acronyms, terminology), JIT user context provisioning (M365 profile, country, department), the shared OnActivity initialization pattern, dynamic topic redirects with Switch expressions, and preventing child agents from responding directly to users. USE FOR: glossary, acronyms, user context, user profile, country-aware answers, JIT initialization, OnActivity provisioning, conversation-init, personalized knowledge, dynamic redirect, Switch, BeginDialog, if/then/else replacement, child agent responses, completion setting, SendMessageTool, output variables, connected agents. DO NOT USE FOR: general knowledge sources (use add-knowledge), topic creation (use new-topic).
88
86%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Only read the file relevant to the current task — do NOT read all files.
Automatically loads a CSV of customer-specific acronyms and terminology into a global variable (Global.Glossary) on the first user message. The orchestrator uses it to silently expand acronyms before searching knowledge sources — improving retrieval quality without the user having to explain internal jargon.
Read this best-practice when:
Loads the current user's Microsoft 365 profile (country, department, display name, etc.) into global variables on the first user message. The orchestrator uses these to personalize answers — e.g., returning the correct country-specific WFH policy without asking the user where they are.
Read best-practice this when:
GetMyProfile / UserGet_V2)Uses a Switch() Power Fx expression inside a BeginDialog node to dynamically redirect to different topics based on a variable value. Replaces complex if/then/else condition chains with a single, maintainable YAML pattern.
Read this best-practice when:
Prevents child agents (connected agents) from sending messages directly to the user. Clarifies the common misconception about the completion setting and provides the instruction block to force child agents to use output variables instead of SendMessageTool.
Read this best-practice when:
Provides the current date to the orchestrator through agent instructions using Power FX ({Text(Today(),DateTimeFormat.LongDate)}). Enables accurate responses to date-related questions by giving the orchestrator explicit awareness of "today" for interpreting relative timeframes.
Read this best-practice when:
You can also combine more than one best pratice. For example, when using both glossary and user context, merge them into a single conversation-init topic rather than creating separate OnActivity topics. Use the template at ${CLAUDE_SKILL_DIR}/../../templates/topics/conversation-init.topic.mcs.yml. The individual files explain the details.
5c1cc83
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.