
Best Practices
Apply Microsoft Copilot Studio patterns—JIT glossary, user context, OnActivity init, Switch redirects, and child-agent handoffs—while authoring enterprise agents.
Install
npx skills add https://github.com/microsoft/skills-for-copilot-studio --skill best-practicesWhat is this skill?
- JIT glossary loads customer acronyms into Global.Glossary on first message for better knowledge retrieval
- JIT user context provisions M365 profile, country, department via shared OnActivity initialization
- Dynamic topic redirects using Switch expressions instead of brittle if/then chains
- Prevents child agents from replying directly—completion settings and SendMessageTool output variables
- Fork context: read only the one best-practice markdown file relevant to the task
Adoption & trust: 24 installs on skills.sh; 306 GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Microsoft Foundrymicrosoft/azure-skills
Azure Aimicrosoft/azure-skills
Azure Hosted Copilot Sdkmicrosoft/azure-skills
Lark Eventlarksuite/cli
Running Claude Code Via Litellm Copilotxixu-me/skills
Setup Matt Pocock Skillsmattpocock/skills
Journey fit
Primary fit
Canonical shelf is build agent-tooling because the skill routes authors through Copilot Studio agent design files. Copilot Studio orchestration topics and global variables are agent-platform tooling, not generic frontend or SEO work.
Common Questions / FAQ
Is Best Practices safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Best Practices
# Copilot Studio Best Practices **Only read the file relevant to the current task** — do NOT read all files. ## JIT Glossary → [jit-glossary.md](jit-glossary.md) 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:** - The user wants to add a glossary, acronym list, or terminology table - Knowledge search quality is poor because the agent doesn't understand internal abbreviations - The user asks about loading CSV/text data from SharePoint into a variable at conversation start ## JIT User Context → [jit-user-context.md](jit-user-context.md) 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:** - The user wants country-aware, department-aware, or role-aware answers - The agent needs to call the M365 Users connector (`GetMyProfile` / `UserGet_V2`) - The user asks about personalizing responses based on who is chatting ## Dynamic Topic Redirect with Variable → [Topic-redirect-withvariable.md](Topic-redirect-withvariable.md) 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:** - The user needs to route to one of several topics based on a variable - The user wants to replace nested ConditionGroup nodes with a cleaner approach - The user asks about dynamic topic redirects or Switch expressions in BeginDialog ## Prevent Child Agent Responses → [prevent-child-agent-responses.md](prevent-child-agent-responses.md) 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:** - The user wants a child agent to return data without messaging the user - The user is confused about the completion setting on a child agent - The parent agent needs to control all user-facing responses ## Date Context → [date-context.md](date-context.md) 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:** - Users ask date-relative questions ("What's next week?", "upcoming events", "recent announcements") - The agent needs to filter time-sensitive knowledge sources - Dat