skills/patterns/SKILL.md
Index of repeatable implementation patterns for Copilot Studio agents. When a request may need a best-practice architecture or reusable pattern for building an agent capability, retrieve this index before deciding what detailed guidance is relevant. Do not decide from this frontmatter alone; use the index summaries, then open only the specific pattern file if needed. Do not use for general knowledge sources or topic creation.
npx skillsauth add microsoft/skills-for-copilot-studio patternsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reference architectures for building specific capabilities in MCS agents. Each pattern is a proven, end-to-end implementation guide.
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 pattern 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 this pattern when:
GetMyProfile / UserGet_V2)Uses AutomaticTaskInput to let the orchestrator's LLM classify or extract structured data from the user's message at orchestration time — no extra AI Prompt call, no extra latency, no extra cost. The primary use case is routing knowledge searches by category or country inside an OnKnowledgeRequested topic.
Read this pattern when:
AutomaticTaskInput, shouldPromptUser, or orchestrator-generated inputsYou can combine more than one pattern. 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.
testing
Validate Copilot Studio agent YAML files using the LSP binary's full diagnostics (YAML structure, Power Fx, schema, cross-file references). Use when the user asks to check, validate, or verify YAML files.
development
Authenticate for Copilot Studio evaluation API and SDK chat. Caches a token that is shared across run-eval and chat-sdk skills. Run this before any eval or SDK chat workflow. Requires an App Registration with MakerOperations and Copilots.Invoke permissions.
development
Run a batch test suite via the Copilot Studio Kit (Dataverse API). Uses the Power CAT Copilot Studio Kit to execute test cases against a published agent and produces pass/fail results with latencies. Requires the Kit installed in the environment, an App Registration with Dataverse permissions, and a published agent.
development
Run evaluations against a Copilot Studio agent via the Power Platform Evaluation API. Works on DRAFT agents — no publish step required. Lists test sets, starts a run, polls until complete, fetches results, and proposes YAML fixes for failures. Use when the user wants to test agent changes without publishing.