# microsoft/skills-for-copilot-studio architecture

> Architecture diagram of the GitHub repository microsoft/skills-for-copilot-studio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/microsoft/skills-for-copilot-studio
- Repository: https://github.com/microsoft/skills-for-copilot-studio

## Overview

Skills for Copilot Studio is an editor/CLI plugin for authoring, synchronizing, testing, and troubleshooting standard Copilot Studio agents as YAML. Its main user workflow is to clone or pull agent files, author changes, validate or push them, then test a published agent and review results. The graph preserves the four documented sub-agents and the major authoring, management, test, and guidance capabilities. Script relationships use the shown source excerpts and SOURCE INDEX; unsampled skill internals are represented by their exact directories.

Main entry points: [`agents/copilot-studio-author.md`](https://github.com/microsoft/skills-for-copilot-studio/blob/main/agents/copilot-studio-author.md) (Author Agent), [`scripts/src/chat-with-agent.js`](https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/chat-with-agent.js) (Published-Agent Chat), [`scripts/src/shared-auth.js`](https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/shared-auth.js) (Shared Authentication), [`scripts/src/manage-agent.js`](https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/manage-agent.js) (Sync & Validation CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agents["Specialist Agents"]
  node_manage_agent["Manage Agent"]
  node_author_agent["Author Agent"]
  node_test_agent["Test Agent"]
  node_advisor_agent["Advisor Agent"]
end

subgraph group_author["Authoring Guidance"]
  node_author_skills["Authoring Skills"]
  node_templates["YAML Templates"]
  node_patterns["Design Patterns"]
  node_reference["Schemas &amp; Connectors"]
end

subgraph group_operations["Agent Operations"]
  node_manage_cli["Sync &amp; Validation CLI<br/>[manage-agent.js]"]
  node_chat_cli["Published-Agent Chat<br/>[chat-with-agent.js]"]
  node_directline["DirectLine Client<br/>[directline-chat.js]"]
  node_eval_cli["Evaluation API Client<br/>[eval-api.js]"]
  node_schema_lookup["Schema Lookup<br/>[schema-lookup.js]"]
  node_connector_lookup["Connector Lookup"]
end

subgraph group_runtime["CLI Runtime"]
  node_shared_auth["Shared Authentication<br/>[shared-auth.js]"]
  node_msal_cache[("Secure Token Cache<br/>[msal-cache.js]")]
  node_shared_utils["HTTP &amp; Chat Utilities<br/>[shared-utils.js]"]
end

node_user(("Plugin User"))
node_copilot_studio{{"Copilot Studio"}}
node_power_platform{{"Power Platform APIs"}}
node_directline_service{{"DirectLine Service"}}
node_cli_editor(("Claude / Copilot / VS Code"))

node_user -->|"requests sync"| node_manage_agent
node_user -->|"requests authoring"| node_author_agent
node_user -->|"requests testing"| node_test_agent
node_user -->|"requests guidance"| node_advisor_agent
node_cli_editor -->|"hosts plugin"| node_manage_agent
node_cli_editor -->|"hosts plugin"| node_author_agent
node_manage_agent -->|"invokes sync"| node_manage_cli
node_author_agent -->|"uses skills"| node_author_skills
node_author_agent -.->|"authors from"| node_templates
node_author_agent -.->|"consults"| node_patterns
node_author_agent -.->|"consults"| node_reference
node_test_agent -->|"tests agent"| node_chat_cli
node_test_agent -->|"runs evaluations"| node_eval_cli
node_advisor_agent -.->|"uses guidance"| node_patterns
node_manage_cli -->|"acquires tokens"| node_shared_auth
node_manage_cli -->|"syncs via LSP"| node_copilot_studio
node_manage_cli -->|"resolves environment"| node_power_platform
node_chat_cli -->|"acquires tokens"| node_shared_auth
node_chat_cli -->|"uses chat helpers"| node_shared_utils
node_chat_cli -->|"routes DirectLine mode"| node_directline
node_chat_cli -->|"detects auth mode"| node_power_platform
node_directline -->|"uses protocol helpers"| node_shared_utils
node_directline -->|"sends activities"| node_directline_service
node_eval_cli -->|"acquires tokens"| node_shared_auth
node_eval_cli -->|"calls evaluation API"| node_power_platform
node_schema_lookup -.->|"looks up schemas"| node_power_platform
node_connector_lookup -.->|"looks up connectors"| node_power_platform
node_shared_auth -->|"logs through"| node_shared_utils
node_shared_auth -->|"creates cache plugin"| node_msal_cache

click node_manage_agent "https://github.com/microsoft/skills-for-copilot-studio/blob/main/agents/copilot-studio-manage.md"
click node_author_agent "https://github.com/microsoft/skills-for-copilot-studio/blob/main/agents/copilot-studio-author.md"
click node_test_agent "https://github.com/microsoft/skills-for-copilot-studio/blob/main/agents/copilot-studio-test.md"
click node_advisor_agent "https://github.com/microsoft/skills-for-copilot-studio/blob/main/agents/copilot-studio-advisor.md"
click node_author_skills "https://github.com/microsoft/skills-for-copilot-studio/tree/main/skills"
click node_templates "https://github.com/microsoft/skills-for-copilot-studio/tree/main/templates"
click node_patterns "https://github.com/microsoft/skills-for-copilot-studio/tree/main/patterns"
click node_reference "https://github.com/microsoft/skills-for-copilot-studio/tree/main/reference"
click node_manage_cli "https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/manage-agent.js"
click node_chat_cli "https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/chat-with-agent.js"
click node_directline "https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/directline-chat.js"
click node_eval_cli "https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/eval-api.js"
click node_schema_lookup "https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/schema-lookup.js"
click node_connector_lookup "https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/connector-lookup.js"
click node_shared_auth "https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/shared-auth.js"
click node_msal_cache "https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/msal-cache.js"
click node_shared_utils "https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/shared-utils.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_manage_agent,node_author_agent,node_test_agent,node_advisor_agent,node_user toneBlue
class node_author_skills,node_templates,node_patterns,node_reference toneAmber
class node_manage_cli,node_chat_cli,node_directline,node_eval_cli,node_schema_lookup,node_connector_lookup,node_power_platform toneMint
class node_shared_auth,node_msal_cache,node_shared_utils toneRose
class node_copilot_studio,node_directline_service,node_cli_editor toneIndigo
```

## Components

### Specialist Agents

- [Manage Agent](https://github.com/microsoft/skills-for-copilot-studio/blob/main/agents/copilot-studio-manage.md): `agents/copilot-studio-manage.md`
- [Author Agent](https://github.com/microsoft/skills-for-copilot-studio/blob/main/agents/copilot-studio-author.md): `agents/copilot-studio-author.md`
- [Test Agent](https://github.com/microsoft/skills-for-copilot-studio/blob/main/agents/copilot-studio-test.md): `agents/copilot-studio-test.md`
- [Advisor Agent](https://github.com/microsoft/skills-for-copilot-studio/blob/main/agents/copilot-studio-advisor.md): `agents/copilot-studio-advisor.md`

### Authoring Guidance

- [Authoring Skills](https://github.com/microsoft/skills-for-copilot-studio/tree/main/skills): `skills`
- [YAML Templates](https://github.com/microsoft/skills-for-copilot-studio/tree/main/templates): `templates`
- [Design Patterns](https://github.com/microsoft/skills-for-copilot-studio/tree/main/patterns): `patterns`
- [Schemas & Connectors](https://github.com/microsoft/skills-for-copilot-studio/tree/main/reference): `reference`

### Agent Operations

- [Sync & Validation CLI](https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/manage-agent.js): `scripts/src/manage-agent.js`
- [Published-Agent Chat](https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/chat-with-agent.js): `scripts/src/chat-with-agent.js`
- [DirectLine Client](https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/directline-chat.js): `scripts/src/directline-chat.js`
- [Evaluation API Client](https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/eval-api.js): `scripts/src/eval-api.js`
- [Schema Lookup](https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/schema-lookup.js): `scripts/src/schema-lookup.js`
- [Connector Lookup](https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/connector-lookup.js): `scripts/src/connector-lookup.js`

### CLI Runtime

- [Shared Authentication](https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/shared-auth.js): `scripts/src/shared-auth.js`
- [Secure Token Cache](https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/msal-cache.js): `scripts/src/msal-cache.js`
- [HTTP & Chat Utilities](https://github.com/microsoft/skills-for-copilot-studio/blob/main/scripts/src/shared-utils.js): `scripts/src/shared-utils.js`

### Other components

- **Plugin User**
- **Copilot Studio**
- **Power Platform APIs**
- **DirectLine Service**
- **Claude / Copilot / VS Code**

## Connections

- Plugin User → Manage Agent: requests sync (evidence: `README.md`)
- Plugin User → Author Agent: requests authoring (evidence: `README.md`)
- Plugin User → Test Agent: requests testing (evidence: `README.md`)
- Plugin User → Advisor Agent: requests guidance (evidence: `README.md`)
- Claude / Copilot / VS Code → Manage Agent: hosts plugin (evidence: `README.md`)
- Claude / Copilot / VS Code → Author Agent: hosts plugin (evidence: `README.md`)
- Manage Agent → Sync & Validation CLI: invokes sync (evidence: `README.md`)
- Author Agent → Authoring Skills: uses skills (evidence: `README.md`)
- Author Agent → YAML Templates: authors from
- Author Agent → Design Patterns: consults
- Author Agent → Schemas & Connectors: consults
- Test Agent → Published-Agent Chat: tests agent (evidence: `README.md`)
- Test Agent → Evaluation API Client: runs evaluations (evidence: `README.md`)
- Advisor Agent → Design Patterns: uses guidance
- Sync & Validation CLI → Shared Authentication: acquires tokens (evidence: `scripts/src/manage-agent.js`)
- Sync & Validation CLI → Copilot Studio: syncs via LSP (evidence: `scripts/src/manage-agent.js`)
- Sync & Validation CLI → Power Platform APIs: resolves environment (evidence: `scripts/src/manage-agent.js`)
- Published-Agent Chat → Shared Authentication: acquires tokens (evidence: `scripts/src/chat-with-agent.js`)
- Published-Agent Chat → HTTP & Chat Utilities: uses chat helpers (evidence: `scripts/src/chat-with-agent.js`)
- Published-Agent Chat → DirectLine Client: routes DirectLine mode (evidence: `scripts/src/chat-with-agent.js`)
- Published-Agent Chat → Power Platform APIs: detects auth mode (evidence: `scripts/src/chat-with-agent.js`)
- DirectLine Client → HTTP & Chat Utilities: uses protocol helpers (evidence: `scripts/src/directline-chat.js`)
- DirectLine Client → DirectLine Service: sends activities
- Evaluation API Client → Shared Authentication: acquires tokens (evidence: `scripts/src/eval-api.js`)
- Evaluation API Client → Power Platform APIs: calls evaluation API (evidence: `scripts/src/eval-api.js`)
- Schema Lookup → Power Platform APIs: looks up schemas
- Connector Lookup → Power Platform APIs: looks up connectors
- Shared Authentication → HTTP & Chat Utilities: logs through (evidence: `scripts/src/shared-auth.js`)
- Shared Authentication → Secure Token Cache: creates cache plugin (evidence: `scripts/src/shared-auth.js`)
