edit-triggers
Modify topic triggers — trigger phrases and model description. Use when the user asks to add, remove, or change trigger phrases, or edit a topic's model description.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 493
- Forks
- 103
01 前言 Front Matter
- agent
- copilot-studio-author
- context
- fork
- description
- Modify topic triggers — trigger phrases and model description. Use when the user asks to add, remove, or change trigger phrases, or edit a topic's model description.
- allowed-tools
- Read, Edit, Glob
- argument-hint
- <topic-name>
- user-invocable
- false
02 资源文件 1
- 参考文档agents/openai.yaml135 B
03 SKILL.md 正文
Edit Topic Triggers
Modify how a topic gets triggered: trigger phrases (triggerQueries) and model description (modelDescription).
Instructions
-
Auto-discover the agent directory:
Glob: **/agent.mcs.ymlNEVER hardcode an agent name.
-
Find the target topic:
Glob: <agent-dir>/topics/*.topic.mcs.ymlIf
$ARGUMENTSspecifies a topic name, match it. Otherwise, list all topics and ask which one. -
Read the topic file and identify what to change.
-
Check the agent's settings.mcs.yml for
GenerativeActionsEnabled. This determines which trigger mechanism matters most. -
Make the requested changes using the Edit tool.
Model Description (modelDescription)
The modelDescription is a natural language description at the root of an AdaptiveDialog that tells the generative orchestrator when to route to this topic. When GenerativeActionsEnabled: true, this is the primary way the agent decides which topic to trigger — even more important than trigger phrases.
kind: AdaptiveDialog
modelDescription: This topic helps users order a pizza by collecting their preferred size, toppings, and delivery address.
beginDialog:
kind: OnRecognizedIntent
id: main
...
Best Practices for Model Description
- Write a clear, specific sentence describing what the topic does and when it should be used
- Focus on the user's intent: "Use this topic when the user asks for information about our perfumes" rather than "This topic sends a message"
- Include key scenarios the topic covers: "This topic handles billing inquiries, refund requests, and payment issues"
- Keep it concise but complete — the orchestrator reads this to decide routing
- Avoid vague descriptions like "This topic handles requests" — be specific about which requests
Examples from Real Topics
# Good — specific about what the topic does and when to use it
modelDescription: Use this topic when the user asks for help or needs assistance with something. Search the SharePoint knowledge base to find relevant information.
# Good — describes the full flow
modelDescription: This topic takes the user's favorite color, generates a word by concatenating the color with four random digits, and returns the generated word. If the color is white, it also provides information about the wavelength.
# Good — describes the computation
modelDescription: This sample topic performs the sum between the two numbers in input
When to Add/Edit Model Description
- Always add a
modelDescriptionto topics withOnRecognizedIntentwhen the agent hasGenerativeActionsEnabled: true - Update it when the topic's purpose or scope changes
- Topics with system triggers (OnError, OnUnknownIntent, OnConversationStart) don't need a
modelDescription— they're triggered automatically
Trigger Phrases (triggerQueries)
Trigger phrases are used for intent recognition. They live inside beginDialog.intent.triggerQueries.
Only topics with OnRecognizedIntent triggers have editable trigger phrases. Other trigger types (OnConversationStart, OnUnknownIntent, etc.) are system-triggered and don't use phrases.
Operations
- Add phrases: Append new entries to
triggerQueries - Remove phrases: Delete entries from
triggerQueries - Replace phrases: Swap old entries for new ones
- Rewrite all: Replace the entire
triggerQueriesarray
Best Practices for Trigger Phrases
- Use 5-10 phrases per topic for good recognition
- Cover synonyms and variations (e.g., "help", "assist", "support", "I need help")
- Include different sentence structures (questions, statements, keywords)
- Avoid overlap — don't use the same phrases in multiple topics
- Keep phrases short and natural (how users actually type/speak)
- Mix formal and informal phrasing
Example Structure
kind: AdaptiveDialog
modelDescription: This topic helps users with greeting and introduction.
beginDialog:
kind: OnRecognizedIntent
id: main
intent:
displayName: Greeting
triggerQueries:
- Hello
- Hi
- Hey
- Good morning
- Good afternoon
What This Skill Cannot Do
- Cannot change the trigger type (e.g., from OnRecognizedIntent to OnConversationStart) — this requires recreating the topic.
- Cannot add triggers to system topics that don't use OnRecognizedIntent.
04 同仓库更多 Skills
validate
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.
test-auth
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.
run-tests-kit
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.
run-eval
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.
new-topic
Create a new Copilot Studio topic YAML file. Use when the user asks to create a new topic, conversation flow, or dialog for their agent.
manage-agent
Push/pull Copilot Studio agent content via the VS Code extension's LanguageServerHost LSP binary. Handles authentication (interactive browser login for push/pull, device code flow for chat token), sync push, sync pull, clone, and diff operations.