$npx -y skills add microsoft/skills-for-copilot-studio --skill list-topicsList all topics in the Copilot Studio agent with their trigger types, phrases, and action counts. Use when the user wants to see what topics exist.
| 1 | # List Topics in Solution |
| 2 | |
| 3 | List all topics in the current agent with their trigger types and details. |
| 4 | |
| 5 | ## Instructions |
| 6 | |
| 7 | 1. **Auto-discover the agent directory** — find all agents via: |
| 8 | ``` |
| 9 | Glob: **/agent.mcs.yml |
| 10 | ``` |
| 11 | - If multiple agents found, list them and ask which one to inspect. |
| 12 | - NEVER hardcode an agent name or path. |
| 13 | |
| 14 | 2. Find all topic files in the discovered agent directory: |
| 15 | ``` |
| 16 | Glob: <discovered-agent>/topics/*.topic.mcs.yml |
| 17 | ``` |
| 18 | |
| 19 | 3. For each topic file, read it and extract: |
| 20 | - Topic name (from the `# Name:` comment or filename) |
| 21 | - Trigger type (from `beginDialog.kind`) |
| 22 | - Trigger phrases (if `OnRecognizedIntent`, from `triggerQueries`) |
| 23 | - Number of actions in the `actions` array |
| 24 | - Dialog references (any `BeginDialog` or `ReplaceDialog` calls) |
| 25 | |
| 26 | 4. Present results in a table: |
| 27 | |
| 28 | ``` |
| 29 | | # | Topic Name | Trigger | Phrases | Actions | Calls | |
| 30 | |---|------------|---------|---------|---------|-------| |
| 31 | | 1 | Greeting | OnRecognizedIntent | Hello, Hi, Hey | 2 | - | |
| 32 | | 2 | Fallback | OnUnknownIntent | - | 4 | Escalate | |
| 33 | ``` |
| 34 | |
| 35 | 5. Note any system topics (OnError, OnSelectIntent, OnSignIn) that should be modified with care. |