Copilot Studio Agent Documenter 标志

Copilot Studio Agent Documenter

组织
pnp
copilot-studio-agent-documenter

使用 Power Platform CLI,根据导出的 Dataverse 解决方案为 Microsoft Copilot Studio 智能体生成全面的文档。用户提出要求时,可结合 agents 文件分析解决方案,并根据其内容创建文档。

Add to TypingMind

概览

发布者pnp
代码仓库copilot-prompts
技能名称copilot-studio-agent-documenter
星标数
894
复刻数
307
附带文件
35
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 35 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 pnp 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Copilot Studio Agent Documenter AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/pnp/copilot-prompts/tree/main/samples/skills/copilot-studio-documenter
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/pnp/copilot-prompts.git /tmp/copilot-prompts
mkdir -p .claude/skills
cp -r /tmp/copilot-prompts/samples/skills/copilot-studio-documenter .claude/skills/copilot-studio-agent-documenter
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Copilot Studio Agent Documenter,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Copilot Studio Agent Documenter。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Copilot Studio Agent Documenter 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Copilot Studio Agent Documentor

To generate documentation in a single file, follow this process, using the sections below to analyse and structure the agents within the /Agents/ folder in this repo.

When to Use This Skill

  • User requests documentation for an agent in Agents/<AgentName>/
  • Analyzing agent capabilities, topics, and integrations
  • Creating markdown documentation output in Docs/Agents/ folder

Step-by-Step Workflows

1. Identify Agent Structure

bash
# Locate the agent solution
ls Agents/<AgentName>/src/bots/

# List all bot components
ls Agents/<AgentName>/src/botcomponents/

2. Extract Agent Metadata

Read key files in this order:

  1. Agents/<AgentName>/src/Other/Solution.xml - Publisher, version, solution name
  2. Agents/<AgentName>/src/bots/<prefix>_<agentname>/bot.xml - Agent metadata
  3. Agents/<AgentName>/src/bots/<prefix>_<agentname>/configuration.json - Agent configuration

3. Document Agent Components

Topics (Conversation Flows)
  • Pattern: botcomponents/<prefix>_<agent>.topic.<TopicName>/
  • Read botcomponent.xml for topic name and state
  • Check data file for conversation logic (if present)
  • Document standard topics: ConversationStart, Greeting, Fallback, Escalate, OnError
  • Highlight custom topics (non-standard names)
GPT Instructions
  • Pattern: botcomponents/<prefix>_<agent>.gpt.default/
  • Extract AI instructions from data file
  • Document the agent's generative capabilities and system prompt
Connector Actions
  • Pattern: botcomponents/<prefix>_<agent>.action.<Connector-Operation>/
  • Example: .action.ServiceNow-GetRecord, .action.ServiceNow-Orderitem
  • List all external actions the agent can perform
  • Cross-reference with Assets/botcomponent_connectionreferenceset.xml
Multi-Agent Orchestration
  • Pattern: botcomponents/<prefix>_<agent>.InvokeConnectedAgentTaskAction.<ChildAgent>/
  • Document agent-to-agent handoffs
  • Map parent agents to their specialized sub-agents
  • Orchestration uses InvokeConnectedAgentTaskAction components to route conversations.
Test Phrases (Evaluation Sets)
  • Pattern: botcomponents/mspva_<GUID>/botcomponent.xml with <category>Testing</category>
  • Component type: <componenttype>19</componenttype>
  • Extract test phrases from <description> or <name> elements
  • These are sample questions/prompts used to evaluate agent responses
  • Group test phrases by parent agent (<parentbotid>)
  • Document which agent or topic each test phrase targets

4. Document Components and External Integrations

File Structure (per component)

botcomponents/<componentschema>/
├── botcomponent.xml    # Metadata (name, parent, state)
└── data                # Optional binary/additional data

Solution Metadata

  • Other/Solution.xml - Publisher, version, localization settings
  • Assets/botcomponent_*.xml - Cross-cutting configuration sets
  • Schema name → physical folder name mapping is 1:1
Connection References

Read Agents/<AgentName>/src/Other/Customizations.xml:

  • Extract <connectionreference> elements
  • Document connectorid (e.g., /providers/Microsoft.PowerApps/apis/shared_service-now)
  • Note connection display names
Knowledge Sources

Read Agents/<AgentName>/src/unstructuredfilesearchentities/*.meta.xml:

  • Extract <sourceurl> values (external API endpoints)
  • Document knowledge source types (<knowledgesource> codes)
Dataverse Tables and Entities

Agents may include Dataverse table search capabilities for querying business data. These are found in:

  • Agents/<AgentName>/src/dvtablesearchs/ - Search configurations
  • Agents/<AgentName>/src/dvtablesearchentities/ - Entity/table mappings

Relationship Structure:

  1. Each dvtablesearch.xml defines a search configuration with a unique <dvtablesearchid>
  2. Each dvtablesearchentity.xml links to a search via <dvtablesearchid> and specifies the <entitylogicalname> (table)
  3. Multiple entities can be associated with a single search configuration

Analysis Process:

To find Dataverse table searches:

bash
# Find all Dataverse table searches
ls Agents/<AgentName>/src/dvtablesearchs/

# Find all entity mappings
ls Agents/<AgentName>/src/dvtablesearchentities/

For each dvtablesearch:

  1. Read dvtablesearchs/<guid>/dvtablesearch.xml - Extract search name and ID
  2. Find related entities by searching for the dvtablesearchid in dvtablesearchentities
  3. Read each dvtablesearchentities/<guid>/dvtablesearchentity.xml - Extract entity logical name and display name

Generate ERD Diagram: Create a Mermaid entity-relationship diagram showing:

  • Tables/entities involved in the search
  • Relationships between search configurations and entities
  • Entity attributes when available

Example Mapping:

  • Search: PeopleonAccount_Account_sKtInwp9Jyd91zLl63PSV (ID: c5010e77-c900-4bf1-898d-c4c0ab9eed30)
  • Entity: account (Account table)

5. Extract Test Phrases for Evaluation

Search for bot components with <category>Testing</category>:

bash
grep -r "<category>Testing</category>" Agents/<AgentName>/src/botcomponents/ -l

For each testing component:

  1. Read botcomponents/<guid>/botcomponent.xml
  2. Extract <description> and <name> fields - these contain the test phrases
  3. Note the <parentbotid> to identify which agent the test is for
  4. Group test phrases by agent for documentation

Test phrases are used for:

  • Evaluating agent responses to common queries
  • Regression testing after agent updates
  • Demonstrating agent capabilities with sample questions

6. Generate Documentation Output

Create markdown file in Docs/<AgentName>.md with sections:

markdown
# <Agent Display Name>

**Solution Name:** <from Solution.xml>
**Version:** <from Solution.xml>
**Publisher:** <from Solution.xml>

## Overview
<Brief description of agent purpose>

## Agent Architecture
<Multi-agent diagram if applicable>

## Topics
### Standard Topics
- List ConversationStart, Greeting, Fallback, etc.

### Custom Topics
- Document business-specific conversation flows

## GPT Instructions
<System prompt summary>

## External Integrations
### Connectors
- **ServiceNow**: <list actions>
- **<OtherConnector>**: <list actions>

### Knowledge Sources
- URL: <sourceurl>
- Type: <description>

### Dataverse Tables
<If dvtablesearch components exist>

The agent has access to the following Dataverse tables for data queries:

#### Entity Relationship Diagram
```mermaid
erDiagram
    <SearchName> ||--o{ <EntityName> : "searches"
    <EntityName> {
        string entitylogicalname
        string displayname
    }
Configured Searches
Search NameSearch IDEntityDescription

Component Inventory

  • Total Topics:
  • Total Actions:
  • Child Agents:
  • Dataverse Table Searches:
  • Dataverse Entities:

Test Phrases & Evaluation Sets

  • "<test phrase 1>"
  • "<test phrase 2>"
  • "<test phrase 3>"

  • "<test phrase 1>"
  • "<test phrase 2>"

### Naming Conventions to Recognize

#### Component Schema Names
- Format: `<customizationprefix>_<logicalname>.<componenttype>.<descriptor>`
- Example: `cr667_primaryPortalAgent.InvokeConnectedAgentTaskAction.ClientExplorer`
- The prefix (e.g., `cr667`, `pkb`) comes from the Dataverse publisher

#### Topic Naming Patterns
- Standard: `.topic.Greeting`, `.topic.Fallback`, `.topic.OnError`
- Custom: `.topic.<Intent>_<GUID>` or `.topic.<FriendlyName>`

#### Action Naming Pattern
- Format: `.action.<ConnectorName>-<OperationName>`
- Example: `.action.ServiceNow-Getcatalogitems`

### Common Analysis Commands

```bash
# Count topics for an agent
ls Agents/<AgentName>/src/botcomponents/ | grep "\.topic\." | wc -l

# Find all connector actions
ls Agents/<AgentName>/src/botcomponents/ | grep "\.action\."

# Check for multi-agent orchestration
ls Agents/<AgentName>/src/botcomponents/ | grep "InvokeConnectedAgentTaskAction"

# Find external service URLs
grep -r "sourceurl\|connectorid" Agents/<AgentName>/src/

# List all agents in solution
ls Agents/<AgentName>/src/bots/

# Find all test phrases/evaluation sets
grep -r "<category>Testing</category>" Agents/<AgentName>/src/botcomponents/ -A 3

# Check for Dataverse table searches
ls Agents/<AgentName>/src/dvtablesearchs/ 2>/dev/null || echo "No Dataverse searches"

# List Dataverse entities
ls Agents/<AgentName>/src/dvtablesearchentities/ 2>/dev/null || echo "No Dataverse entities"

# Find entity-to-search mappings
grep -r "dvtablesearchid" Agents/<AgentName>/src/dvtablesearchentities/

Output Best Practices

  1. Always output to Docs/ - Never create documentation in other folders
  2. Use agent name as filename - Docs/<AgentName>.md
  3. Include file references - Link back to source files when describing components
  4. Configuration - List out in a table the configuration of each othe bots.
  5. Document multi-agent relationships - Show parent-child agent hierarchies in a mermaid diagram. Group all the documentation by the agent, showing documentation topics underneath each group.
  6. Highlight integrations - External APIs and connectors are critical for understanding agent capabilities
  7. Count components - Provide metrics (# topics, # actions, # child agents)
  8. Include test phrases - Document evaluation test phrases grouped by agent to demonstrate capabilities and provide testing examples
  9. Other documentation - Remove references to other documentation in the repository. This file should be standalone.
  10. Technical depth - Include some explainations of components, assuming that the audience less technical and may not know what these components mean - unless the request asks for highly technical output.

Example: multiagentdemo Analysis

The multiagentdemo solution contains 5 agents:

  • primaryPortalAgent (orchestrator)
  • getSkillName (People Skills Finder)
  • myServices (ServiceNow integration with 3 actions)
  • serviceNowKnowledgeAgent (knowledge base queries)
  • whoWhat (account lookups)

ServiceNow integration found:

  • Connector: shared_service-now
  • Actions: GetRecord, Getcatalogitems, Orderitem
  • Knowledge URL: https://<instance-name>.service-now.com/

Key Files Reference

  • Solution.xml - Version, publisher, solution metadata
  • Customizations.xml - Connection references to external services
  • botcomponent_connectionreferenceset.xml - Bot-to-connector mappings
  • unstructuredfilesearchentities/*.meta.xml - Knowledge source URLs
  • botcomponents/*/botcomponent.xml - Individual component metadata
  • botcomponents/*/data - Individual component data files
  • bots/*/bot.xml - Top-level bot definitions
  • bots/*/configuration.json - Bot configuration settings
  • dvtablesearchs/*/dvtablesearch.xml - Dataverse table search configurations
  • dvtablesearchentities/*/dvtablesearchentity.xml - Dataverse entity/table mappings

When you are building references to files, navigate from the repo root, as the generated document can existing under a subfolder when generated.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Copilot Studio Agent Documenter AI 技能有什么作用?

使用 Power Platform CLI,根据导出的 Dataverse 解决方案为 Microsoft Copilot Studio 智能体生成全面的文档。用户提出要求时,可结合 agents 文件分析解决方案,并根据其内容创建文档。

为什么在 TypingMind 中使用 Copilot Studio Agent Documenter?

因为您只需安装一次,就能搭配任何模型使用。Copilot Studio Agent Documenter 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Copilot Studio Agent Documenter?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/pnp/copilot-prompts/tree/main/samples/skills/copilot-studio-documenter。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Copilot Studio Agent Documenter?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Copilot Studio Agent Documenter 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Copilot Studio Agent Documenter 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Copilot Studio Agent Documenter AI 技能免费吗?

是的。pnp 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇