$npx -y skills add microsoft/power-platform-skills --skill add-datasourceAdds a data source or connector to a Power Apps code app. Asks what the user wants to accomplish and routes to the appropriate specialized skill.
| 1 | **📋 Shared Instructions: [shared-instructions.md](${PLUGIN_ROOT}/shared/shared-instructions.md)** - Cross-cutting concerns. |
| 2 | |
| 3 | # Add Data Source |
| 4 | |
| 5 | Router skill that understands the user's goal and connects them to the right data source -- without requiring them to know Power Platform terminology. |
| 6 | |
| 7 | ## Workflow |
| 8 | |
| 9 | ### Check Memory Bank |
| 10 | |
| 11 | Check for `memory-bank.md` per [shared-instructions.md](${PLUGIN_ROOT}/shared/shared-instructions.md). |
| 12 | |
| 13 | ### Understand the Goal |
| 14 | |
| 15 | 1. **If `$ARGUMENTS` is provided or the caller already specified what's needed**, use it directly and skip the question below. |
| 16 | 2. Otherwise, ask the user **what they want their app to do** -- not which connector to use. Focus on the end goal. Example questions: |
| 17 | - "What kind of data does your app need to work with?" |
| 18 | - "What should your app be able to do? (e.g., search company info, manage tasks, send messages)" |
| 19 | 3. Based on their answer, **recommend the best approach** and explain *why* it's the right fit. The user shouldn't need to know the difference between Dataverse, SharePoint, or other connectors -- that's our job. |
| 20 | |
| 21 | ### Route to the Right Skill |
| 22 | |
| 23 | Map the user's goal to the appropriate skill: |
| 24 | |
| 25 | | User's goal | Best approach | Invoke | |
| 26 | |-------------|---------------|--------| |
| 27 | | Store and manage structured business data (custom tables, forms, CRUD) | Dataverse is the platform's native database | `/add-dataverse` | |
| 28 | | Track work items, bugs, builds, or pipelines | Azure DevOps connector | `/add-azuredevops` | |
| 29 | | Send or read Teams messages, post to channels | Teams connector | `/add-teams` | |
| 30 | | Read/write Excel spreadsheet data | Excel Online (Business) connector | `/add-excel` | |
| 31 | | Upload, download, or manage files | OneDrive for Business connector | `/add-onedrive` | |
| 32 | | Work with SharePoint lists or document libraries | SharePoint Online connector | `/add-sharepoint` | |
| 33 | | Send emails, read inbox, manage calendar events | Office 365 Outlook connector | `/add-office365` | |
| 34 | | Invoke an AI agent or copilot built in Copilot Studio | Copilot Studio connector | `/add-mcscopilot` | |
| 35 | | Something else or not sure | Generic connector (we'll figure it out) | `/add-connector` | |
| 36 | |
| 37 | **Important routing rules:** |
| 38 | - When the user wants to **perform actions** (send an email, post a message, create a file), use the specific connector for that action (e.g., `/add-office365` for sending email, `/add-teams` for posting messages). |
| 39 | |
| 40 | 4. If the user wants multiple capabilities, invoke each skill in sequence. |
| 41 | |
| 42 | ### When the User Isn't Sure |
| 43 | |
| 44 | If the user describes a vague goal (e.g., "I need data for my app"), guide them: |
| 45 | |
| 46 | 1. Ask what their app does and who uses it |
| 47 | 2. Ask what data they need to display or interact with |
| 48 | 3. Recommend the simplest approach that meets their needs |
| 49 | 4. Explain the recommendation in plain language (avoid jargon like "connector", "Dataverse", "tabular data source" unless the user uses those terms first) |