$npx -y skills add microsoft/skills-for-copilot-studio --skill edit-agentEdit Copilot Studio agent settings, instructions, or configuration. Use when the user asks to change agent instructions, display name, conversation starters, AI settings, or generative actions toggle.
| 1 | # Edit Agent Settings/Instructions |
| 2 | |
| 3 | Modify agent metadata (`agent.mcs.yml`) or configuration (`settings.mcs.yml`). |
| 4 | |
| 5 | ## Instructions |
| 6 | |
| 7 | 1. **Auto-discover the agent directory**: |
| 8 | ``` |
| 9 | Glob: **/agent.mcs.yml |
| 10 | ``` |
| 11 | NEVER hardcode an agent name. If multiple agents found, ask which one. |
| 12 | |
| 13 | 2. **Identify what the user wants to change** and read the appropriate file: |
| 14 | - **Instructions, display name, conversation starters, AI settings** → `agent.mcs.yml` |
| 15 | - **GenerativeActionsEnabled, authentication, recognizer, capabilities** → `settings.mcs.yml` |
| 16 | |
| 17 | 3. **If the user wants to change the AI model**, run the schema lookup tool first: |
| 18 | ```bash |
| 19 | node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js models |
| 20 | ``` |
| 21 | Use the output to determine the correct `modelNameHint` and `provider` values. |
| 22 | **CRITICAL:** Do NOT include `kind` in the model block — the agent-level schema uses `CurrentModelsNoKind`. |
| 23 | |
| 24 | 4. **Read the current file** before making any changes. |
| 25 | |
| 26 | 5. **Make the requested changes** using the Edit tool. |
| 27 | |
| 28 | ## Editable Fields in `agent.mcs.yml` |
| 29 | |
| 30 | | Field | Description | Example | |
| 31 | |-------|-------------|---------| |
| 32 | | `displayName` | Agent's display name | `displayName: My Agent` | |
| 33 | | `instructions` | System prompt / personality | Multi-line YAML with `\|` | |
| 34 | | `conversationStarters` | Suggested conversation starters | Array of `{title, text}` | |
| 35 | | `aISettings.model.modelNameHint` | Model hint (run `models` command for convention) | `Sonnet46`, `GPT5Chat` | |
| 36 | | `aISettings.model.provider` | Model provider (required for non-OpenAI) | `Anthropic` | |
| 37 | |
| 38 | ## Editable Fields in `settings.mcs.yml` |
| 39 | |
| 40 | | Field | Description | Example | |
| 41 | |-------|-------------|---------| |
| 42 | | `GenerativeActionsEnabled` | Enable generative orchestration | `true` / `false` | |
| 43 | | `authenticationMode` | Auth mode | `Integrated`, `None` | |
| 44 | | `authenticationTrigger` | When to auth | `Always`, `AsNeeded` | |
| 45 | | `accessControlPolicy` | Access control | `ChatbotReaders` | |
| 46 | | `configuration.aISettings.*` | AI capabilities | Various booleans | |
| 47 | | `configuration.settings.*.content.capabilities.webBrowsing` | Web browsing | `true` / `false` | |
| 48 | |
| 49 | ## Writing Effective Instructions |
| 50 | |
| 51 | For detailed guidance on writing knowledge-aware instructions, grounding directives, citation control, and scope enforcement, see [instructions-guide.md](instructions-guide.md). |
| 52 | |
| 53 | ## Fields to NEVER Modify |
| 54 | |
| 55 | - `schemaName` — This is the internal Power Platform identifier. Changing it breaks the agent. |
| 56 | - `publishedOn` — Managed by the platform. |
| 57 | - `template` — Managed by the platform. |
| 58 | - `language` — Changing this can corrupt the agent. |
| 59 | |
| 60 | If the user asks to change any of these, warn them. |
| 61 | |
| 62 | ## Example: Update Instructions |
| 63 | |
| 64 | ```yaml |
| 65 | instructions: | |
| 66 | You are a customer support agent for Contoso Ltd. |
| 67 | |
| 68 | Guidelines: |
| 69 | - Be professional and empathetic |
| 70 | - Always verify the customer's identity first |
| 71 | - Escalate billing issues to a human agent |
| 72 | ``` |