$npx -y skills add microsoft/skills-for-copilot-studio --skill int-project-contextShared project context for all Copilot Studio sub-agents. Provides project structure, schema lookup usage, and skill invocation guidance.
| 1 | # Copilot Studio — Shared Project Context |
| 2 | |
| 3 | You are working inside a Copilot Studio agent project. All YAML files have the `.mcs.yml` extension. |
| 4 | |
| 5 | ## Project Structure |
| 6 | |
| 7 | ``` |
| 8 | <agent-dir>/ # Auto-discover via Glob: **/agent.mcs.yml |
| 9 | ├── agent.mcs.yml # Agent metadata (display name, schema version) |
| 10 | ├── settings.mcs.yml # Agent settings (schemaName, GenerativeActionsEnabled, instructions) |
| 11 | ├── topics/ # Conversation topics (AdaptiveDialog YAML files) |
| 12 | ├── actions/ # Connector-based actions (TaskDialog YAML files) |
| 13 | ├── knowledge/ # Knowledge sources (KnowledgeSourceConfiguration YAML files) |
| 14 | ├── variables/ # Global variables (GlobalVariableComponent YAML files) |
| 15 | └── agents/ # Child agents (AgentDialog YAML files, each in its own subfolder) |
| 16 | ``` |
| 17 | |
| 18 | ## Schema Lookup Script |
| 19 | |
| 20 | When you write new YAML files, be sure to use the schema lookup script to understand the schema, including mandatory fields, definitions, and references. The script is located at `${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js`, and you can use it in the terminal as follows: |
| 21 | |
| 22 | ```bash |
| 23 | node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js search trigger # Search by keyword |
| 24 | node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js lookup SendActivity # Look up a definition |
| 25 | node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js resolve AdaptiveDialog # Resolve with $refs |
| 26 | node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js kinds # List all valid kind values |
| 27 | node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js summary Question # Compact overview |
| 28 | node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js validate <file.yml> # Validate a YAML file |
| 29 | ``` |
| 30 | |
| 31 | If you already know the specific definition you want to look up, use `lookup`. If you want to explore the schema around a certain topic, use `search` or `summary`. |
| 32 | Always check the schema before writing YAML to ensure you include all required fields and use valid values. |
| 33 | |
| 34 | **NEVER load the full schema file** (`reference/bot.schema.yaml-authoring.json`) — it's too long. Always use the script above. |
| 35 | |
| 36 | ## Connector Lookup Script |
| 37 | |
| 38 | The connector lookup script is at `${CLAUDE_SKILL_DIR}/../../scripts/connector-lookup.bundle.js`. Use it for any questions about connectors, actions, their inputs, and outputs: |
| 39 | |
| 40 | ```bash |
| 41 | node ${CLAUDE_SKILL_DIR}/../../scripts/connector-lookup.bundle.js list # List all connectors with operation counts |
| 42 | node ${CLAUDE_SKILL_DIR}/../../scripts/connector-lookup.bundle.js operations <connector> # List operations for a connector |
| 43 | node ${CLAUDE_SKILL_DIR}/../../scripts/connector-lookup.bundle.js operation <connector> <operationId> # Full details of one operation (inputs/outputs) |
| 44 | node ${CLAUDE_SKILL_DIR}/../../scripts/connector-lookup.bundle.js search <keyword> # Search operations across all connectors |
| 45 | ``` |
| 46 | |
| 47 | `<connector>` matches by API name (`shared_office365`) or partial display name (`outlook`). |
| 48 | |
| 49 | **When to use this**: When you need to understand available connectors, what inputs/outputs an action has, or what operations are available. The action YAML files in the agent only show *configured* inputs — connector-lookup shows the *full* connector definition with all available inputs and outputs. |
| 50 | |
| 51 | ## Skill-First Rule (VERY IMPORTANT) |
| 52 | |
| 53 | You have access to specialized skills that handle YAML creation, editing, validation, and testing. **ALWAYS invoke the matching skill instead of doing it manually.** |
| 54 | Skills contain correct templates, schema validation, and patterns. Doing it manually risks hallucinated `kind:` values, missing required fields, and broken YAML. |
| 55 | Example skills include `/copilot-studio:new-topic` for creating new topics, `/copilot-studio:add-action` for adding connector actions and tools, and `/copilot-studio:validate` for validating YAML files. |
| 56 | |
| 57 | **If no skill matches**, only then work manually — but always validate with `/copilot-studio:validate` afterward. |
| 58 | |
| 59 | ## Key Conventions |
| 60 | |
| 61 | - **Agent Discovery**: NEVER hardcode agent names. Always `Glob: **/agent.mcs.yml`. |
| 62 | - **ID Generation**: Random alphanumeric, 6-8 chars after prefix (e.g., `sendMessage_g5Ls09`). |
| 63 | - **Template `_REPLACE`**: Always replace `_REPLACE` placeholder IDs with unique random IDs. |
| 64 | - **Power Fx**: Expressions start with `=`. String interpolation uses `{}`. Only use supported functions (check `int-reference` skill). |
| 65 | - **Generative Orchestration**: When `GenerativeActionsEnabled: true`, use topic inputs/outputs instead of hardcoded questions/messages. |