选项
首页首页 Skill API开发 slack-to-teams

slack-to-teams

microsoft/skills microsoft/skills

将 Slack 机器人迁移到 Microsoft Teams,构建跨平台机器人,并使用包含 100 多个微专家文件的路由专家系统在 Block Kit 和自适应卡片之间进行转换。

...展开全部
35
更新时间 2026-09-19

Slack 到 Teams 专家系统

一个包含 100 多个微型专家文件的路由专家系统,用于将 Slack 机器人迁移到 Teams 并构建跨平台机器人。

父技能: 有关 ATK CLI 设置和路由,请参阅 ../SKILL.md。有关本地测试,请参阅 ../test-playground/test-playground.md 或 ../test-teams/test-teams.md。有关云部署,请参阅 ../provision-deploy/provision-deploy.md。有关故障排除,请参阅 ../troubleshoot/troubleshoot.md。

何时使用

  • 构建新的 Slack 机器人、Teams 机器人或双平台机器人
  • 为现有的 Slack 机器人添加 Teams 支持(反之亦然)
  • 在平台之间迁移机器人
  • 将机器人部署到 Azure 或 AWS
  • 为机器人配置 AI 模型提供商
  • 在 Block Kit 和自适应卡片之间转换 UI
  • 桥接平台间的身份、事件、文件或传输
  • 使 Teams 机器人项目与 Microsoft Agents Toolkit (m365agents.yml, env/, appPackage 占位符) 兼容

程序

第 1 步:确定项目类型

评估开发人员是拥有现有代码库还是从头开始。

  • 新项目 → 进入新项目流程
  • 现有项目 → 进入现有项目流程

新项目流程

1a:平台选择

询问开发人员支持哪些平台:

  • Slack + Teams(双平台)
  • 仅 Slack
  • 仅 Teams

1b:加载专家系统

  1. 阅读 experts/index.md — 根路由器。
  2. 执行该文件中定义的预任务访谈。
  3. 根据平台选择进行路由:
    • Slack + Teams → 阅读 experts/bridge/index.md。加载跨平台顾问。
    • 仅 Slack → 阅读 experts/slack/index.md。
    • 仅 Teams → 阅读 experts/teams/index.md。

1c:架构设置

  1. 阅读 cross-platform-architecture(即使是单平台——也为稍后添加第二个平台建立模式)。
  2. 让领域路由器和顾问接管。
  3. 在目标项目根目录中编写 PLAN.md,包含平台、功能、加载的专家。

1d:实施

遵循顾问或领域路由器的输出。按功能实施:

  1. 从优先级列表中选取下一个功能。
  2. 加载该功能指定的专家。
  3. 使用专家的模式和规则进行实施。
  4. 根据专家的陷阱部分进行验证。

现有项目流程

2a:分析项目

并行运行以下四个子分析:

检测语言 — 扫描 package.json+tsconfig.json(TypeScript)、pom.xml/build.gradle(Java)、*.csproj/*.sln(C#)、go.mod(Go)、requirements.txt/pyproject.toml(Python)、Gemfile(Ruby)、Cargo.toml(Rust)。

检测当前平台 — 扫描依赖项以查找 SDK 指标:

  • Slack:@slack/bolt、@slack/web-api、slack_bolt、app.message、app.command、ack()
  • Teams:@microsoft/teams-ai、botbuilder、TeamsActivityHandler、app.turn、自适应卡片

检测功能 — 扫描斜杠命令、Block Kit/自适应卡片、操作处理程序、OAuth、文件上传/下载、调度、线程、AI/LLM 调用、主动消息。

检测架构 — 扫描 Web 框架(Express、Fastify 等)、托管目标(Azure、AWS、Docker)、云提供商、架构模式(单机器人、双机器人、单体)。

2b:语言门控

将检测到的语言分类为 SDK 层级:

层级语言指导
**1:完整 SDK**TypeScript / JavaScript提供完整的专家系统
**2:适配**Python两个 SDK 均存在 — 适配 TS 模式。加载 bolt-python、teams-python、python-cross-platform
**3:拆分 SDK**Java, C#一个平台有 SDK,另一个需要 REST。加载 bolt-java 或 teams-dotnet + rest-only
**4:无 SDK**Go, Ruby, Rust两者均仅使用 REST。加载 rest-only

2c:专家覆盖范围差距分析

  1. 阅读 experts/analyzer.md。
  2. 执行分析器工作流:扫描清单、依赖项、源文件。
  3. 将检测到的技术与现有专家进行交叉引用。
  4. 展示差距分析 — 已覆盖与未覆盖的技术。

2d:构建缺失的专家(如果需要)

  1. 阅读 experts/builder.md。
  2. 对于每个差距:分析项目使用情况 → 读取包源 → 起草专家 → 验证 → 集成到路由中。
  3. 使用 experts/_expert-ts.md 作为模板。

2e:加载专家系统

  1. 阅读 experts/index.md — 根路由器。
  2. 执行预任务访谈,使用 2a 中的分析结果进行预填充。
  3. 根据检测到的平台和任务意图进行路由:
    • 有 Slack,想要 Teams → 桥接领域
    • 有 Teams,想要 Slack → 桥接领域
    • 两者都有 → 按任务路由(桥接优化、部署、模型等)
    • 两者都没有 → 询问要针对哪些平台
  4. 如果进行桥接,加载 cross-platform-advisor。将分析结果输入到第 1 阶段。

2f:架构和实施

  1. 阅读 cross-platform-architecture。
  2. 编写包含分析结果、路由决策和功能迁移顺序的 PLAN.md。
  3. 使用顾问的优先级列表按功能实施。

Agents Toolkit 兼容性

有关与 ATK 兼容的项目结构(m365agents.yml、env/ 文件、appPackage),请参阅父技能:

  • 父级 SKILL.md — ATK CLI 设置、子技能路由、工作流链
  • manifest-and-yaml.md — 项目文件、YAML 配置、环境变量、.localConfigs 流程
  • commands.md — 打包、验证、共享、协作、环境管理
  • templates.md — 所有支持语言的模板

有关 Teams 清单架构和打包,请参阅 runtime.manifest-ts。

错误恢复

如果专家系统未能涵盖某个主题:

  1. 阅读 experts/fallback.md。
  2. 第 1 阶段:重新扫描所有领域路由器以查找遗漏的专家。
  3. 第 2 阶段:通过 Web 搜索查找剩余的知识差距。
  4. 考虑使用 experts/builder.md 创建新专家。

专家领域

领域索引描述
Slackexperts/slack/index.mdBolt 框架、事件、OAuth、命令、UI、CLI
Teamsexperts/teams/index.mdTeams AI SDK、自适应卡片、Graph、MCP、A2A、部署
桥接experts/bridge/index.md27 个跨平台转换专家(核心差异点)
部署experts/deploy/index.mdAzure 和 AWS 部署演练
模型experts/models/index.mdAI 模型提供商(OpenAI、Anthropic、Bedrock 等)
转换experts/convert/index.md转换为 TypeScript 的语言转换
安全experts/security/index.md输入验证、密钥管理

平台比较文档

用于并排平台比较的参考指南:

  • UI 组件 — Block Kit 与自适应卡片
  • 消息传递与命令
  • 身份与认证
  • 交互式响应
  • 文件与链接
  • 中间件与处理程序
  • 基础设施
  • 高级功能
  • 功能差距
  • 工作流场景 — Teams 机器人的消息原生工作流模式(触发器、状态、逻辑、AI、可见性)
在 GitHub 上查看
---
name: slack-to-teams
description: Migrate Slack bots to Microsoft Teams, build dual-platform bots, and convert between Block Kit and Adaptive Cards using a routed expert system with 100+ micro-expert files.
---

# Slack to Teams Expert System

A routed expert system with 100+ micro-expert files for migrating Slack bots to Teams and building cross-platform bots.

> **Parent skill:** For ATK CLI setup and routing, see [../SKILL.md](../SKILL.md). For local testing, see [../test-playground/test-playground.md](../test-playground/test-playground.md) or [../test-teams/test-teams.md](../test-teams/test-teams.md). For cloud deploy, see [../provision-deploy/provision-deploy.md](../provision-deploy/provision-deploy.md). For troubleshooting, see [../troubleshoot/troubleshoot.md](../troubleshoot/troubleshoot.md).

## When to Use

- Building a new Slack bot, Teams bot, or dual-platform bot
- Adding Teams support to an existing Slack bot (or vice versa)
- Migrating a bot between platforms
- Deploying a bot to Azure or AWS
- Configuring AI model providers for a bot
- Converting UI between Block Kit and Adaptive Cards
- Bridging identity, events, files, or transport between platforms
- Making a Teams bot project compatible with Microsoft Agents Toolkit (m365agents.yml, env/, appPackage placeholders)

## Procedure

### Step 1: Determine project type

Assess whether the developer has an existing codebase or is starting fresh.

- **New project** → go to [New Project Flow](#new-project-flow)
- **Existing project** → go to [Existing Project Flow](#existing-project-flow)

---

### New Project Flow

#### 1a: Platform selection

Ask the developer which platform(s) to support:
- Slack + Teams (dual-platform)
- Slack only
- Teams only

#### 1b: Load the expert system

1. Read [experts/index.md](../experts/index.md) — the root router.
2. Execute the **pre-task interview** defined in that file.
3. Route based on platform choice:
   - **Slack + Teams** → Read [experts/bridge/index.md](../experts/bridge/index.md). Load [cross-platform-advisor](../experts/bridge/cross-platform-advisor-ts.md).
   - **Slack only** → Read [experts/slack/index.md](../experts/slack/index.md).
   - **Teams only** → Read [experts/teams/index.md](../experts/teams/index.md).

#### 1c: Architecture setup

1. Read [cross-platform-architecture](../experts/bridge/cross-platform-architecture-ts.md) (even for single-platform — establishes patterns for adding a second platform later).
2. Let the domain router and advisor take over.
3. Write a `PLAN.md` in the target project root with platform, features, experts loaded.

#### 1d: Implementation

Follow the advisor's or domain router's output. Implement feature by feature:
1. Pick the next feature from the prioritized list.
2. Load the expert(s) specified for that feature.
3. Implement using the expert's patterns and rules.
4. Verify against the expert's pitfalls section.

---

### Existing Project Flow

#### 2a: Analyze the project

Run these four sub-analyses **in parallel**:

**Detect language** — Scan for `package.json`+`tsconfig.json` (TypeScript), `pom.xml`/`build.gradle` (Java), `*.csproj`/`*.sln` (C#), `go.mod` (Go), `requirements.txt`/`pyproject.toml` (Python), `Gemfile` (Ruby), `Cargo.toml` (Rust).

**Detect current platform** — Scan dependencies for SDK indicators:
- Slack: `@slack/bolt`, `@slack/web-api`, `slack_bolt`, `app.message`, `app.command`, `ack()`
- Teams: `@microsoft/teams-ai`, `botbuilder`, `TeamsActivityHandler`, `app.turn`, Adaptive Cards

**Detect features** — Scan for slash commands, Block Kit/Adaptive Cards, action handlers, OAuth, file upload/download, scheduling, threading, AI/LLM calls, proactive messages.

**Detect architecture** — Scan for web framework (Express, Fastify, etc.), hosting target (Azure, AWS, Docker), cloud provider, architecture pattern (single bot, dual-bot, monolith).

#### 2b: Language gate

Classify the detected language into SDK tiers:

| Tier | Languages | Guidance |
|---|---|---|
| **1: Full SDK** | TypeScript / JavaScript | Full expert system available |
| **2: Adapt** | Python | Both SDKs exist — adapt TS patterns. Load [bolt-python](../experts/slack/bolt-python.md), [teams-python](../experts/teams/teams-python.md), [python-cross-platform](../experts/bridge/python-cross-platform.md) |
| **3: Split SDK** | Java, C# | One platform has SDK, other needs REST. Load [bolt-java](../experts/slack/bolt-java.md) or [teams-dotnet](../experts/teams/teams-dotnet.md) + [rest-only](../experts/bridge/rest-only-integration-ts.md) |
| **4: No SDK** | Go, Ruby, Rust | REST-only for both. Load [rest-only](../experts/bridge/rest-only-integration-ts.md) |

#### 2c: Expert coverage gap analysis

1. Read [experts/analyzer.md](../experts/analyzer.md).
2. Execute the analyzer workflow: scan manifests, dependencies, source files.
3. Cross-reference detected tech against existing experts.
4. Present gap analysis — covered vs uncovered technologies.

#### 2d: Build missing experts (if needed)

1. Read [experts/builder.md](../experts/builder.md).
2. For each gap: analyze project usage → read package source → draft expert → validate → wire into routing.
3. Use [experts/_expert-ts.md](../experts/_expert-ts.md) as the template.

#### 2e: Load the expert system

1. Read [experts/index.md](../experts/index.md) — the root router.
2. Execute the pre-task interview, pre-filling with analysis results from 2a.
3. Route based on detected platform and task intent:
   - Has Slack, wants Teams → **Bridge** domain
   - Has Teams, wants Slack → **Bridge** domain
   - Has both → Route by task (bridge refinement, deploy, models, etc.)
   - Has neither → Ask which platform(s) to target
4. Load [cross-platform-advisor](../experts/bridge/cross-platform-advisor-ts.md) if bridging. Feed analysis results into Phase 1.

#### 2f: Architecture and implementation

1. Read [cross-platform-architecture](../experts/bridge/cross-platform-architecture-ts.md).
2. Write a `PLAN.md` with analysis results, routing decisions, and feature migration order.
3. Implement feature by feature using the advisor's prioritized list.

## Agents Toolkit Compatibility

For ATK-compatible project structure (m365agents.yml, env/ files, appPackage), see the parent skill:
- **[Parent SKILL.md](../SKILL.md)** — ATK CLI setup, sub-skill routing, workflow chains
- **[manifest-and-yaml.md](../toolkit/manifest-and-yaml.md)** — Project files, YAML config, env vars, .localConfigs flow
- **[commands.md](../toolkit/commands.md)** — Package, validate, share, collaborate, environment management
- **[templates.md](../toolkit/templates.md)** — All templates with language support

For Teams manifest schema and packaging, see [runtime.manifest-ts](../experts/teams/runtime.manifest-ts.md).

## Error Recovery

If the expert system fails to cover a topic:
1. Read [experts/fallback.md](../experts/fallback.md).
2. Phase 1: Re-scan all domain routers for missed experts.
3. Phase 2: Web-search for remaining knowledge gaps.
4. Consider creating a new expert using [experts/builder.md](../experts/builder.md).

## Expert Domains

| Domain | Index | Description |
|---|---|---|
| Slack | [experts/slack/index.md](../experts/slack/index.md) | Bolt framework, events, OAuth, commands, UI, CLI |
| Teams | [experts/teams/index.md](../experts/teams/index.md) | Teams AI SDK, Adaptive Cards, Graph, MCP, A2A, deploy |
| Bridge | [experts/bridge/index.md](../experts/bridge/index.md) | 27 cross-platform conversion experts (the core differentiator) |
| Deploy | [experts/deploy/index.md](../experts/deploy/index.md) | Azure & AWS deployment walkthroughs |
| Models | [experts/models/index.md](../experts/models/index.md) | AI model providers (OpenAI, Anthropic, Bedrock, etc.) |
| Convert | [experts/convert/index.md](../experts/convert/index.md) | Language conversion to TypeScript |
| Security | [experts/security/index.md](../experts/security/index.md) | Input validation, secrets management |

## Platform Comparison Docs

Reference guides for side-by-side platform comparison:

- [UI Components](../docs/ui-components.md) — Block Kit vs Adaptive Cards
- [Messaging & Commands](../docs/messaging-and-commands.md)
- [Identity & Auth](../docs/identity-and-auth.md)
- [Interactive Responses](../docs/interactive-responses.md)
- [Files & Links](../docs/files-and-links.md)
- [Middleware & Handlers](../docs/middleware-and-handlers.md)
- [Infrastructure](../docs/infrastructure.md)
- [Advanced Features](../docs/advanced-features.md)
- [Feature Gaps](../docs/feature-gaps.md)
- [Workflow Scenarios](../docs/workflows.md) — Message-native workflow patterns (triggers, state, logic, AI, visibility) for Teams bots

所有文件

1 个文件

安装 slack-to-teams

将技能文件下载并解压至 .claude/skills/ 目录。

下载ZIP

克隆仓库并复制技能文件到您的项目中。

git clone https://github.com/microsoft/skills/tree/main/.github/plugins/microsoft-365-agents-toolkit/skills/teams-app-developer/slack-to-teams # Copy SKILL.md to your .claude/skills/ directory

复制 复制
快速设置: 将技能文件夹复制到 .claude/skills/ 目录。Claude 将自动检测并使用该技能。

相关技能

agentwallet
更新时间 2026-07-07
brightdata-cli
更新时间 2026-06-29
humanize
更新时间 2026-07-07
korean-stock-search
更新时间 2026-07-08
OR