# teams-app-developer

Scaffolds, tests, and deploys Microsoft 365 agents and Teams apps with the ATK CLI. Handles local debugging in Agents Playground and Slack migrations.

- skill · `type=skill` · Claude Code, GitHub Copilot · ★ 3149
- Author: microsoft
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/microsoft/skills/tree/HEAD/.github/plugins/microsoft-365-agents-toolkit/skills/teams-app-developer/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/teams-app-developer

## What it does

The skill instructs coding assistants how to construct bots, message extensions, and custom engine agents for Microsoft Teams. It automates ATK CLI routines while enforcing non-interactive execution with `-i false` to avoid terminal locks.

Local testing defaults to Agents Playground, so a Microsoft 365 tenant is not required during initial checks. Web servers and tunneling processes run in background terminals, while long cloud tasks like `atk provision` get timeouts exceeding 120000ms. It also includes migration rules for converting Slack Block Kit layouts into Adaptive Cards.

Without `@microsoft/m365agentstoolkit-cli@beta` installed globally at version `1.1.5-beta` or higher, automated deployment routines will fail.

## Requirements
- Works with: Azure, Slack

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add microsoft/skills --skill teams-app-developer -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/teams-app-developer/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/teams-app-developer/

### Codex

**Manually: put the files in place**
- File: `.agents/skills/teams-app-developer/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

**Manually: put the files in place**
- File: `.cursor/skills/teams-app-developer/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install microsoft/skills teams-app-developer
```

2. **Manually: put the files in place**
- File: `.github/skills/teams-app-developer/SKILL.md`

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/microsoft/skills --path .github/plugins/microsoft-365-agents-toolkit/skills/teams-app-developer
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/teams-app-developer/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/microsoft/skills/tree/HEAD/.github/plugins/microsoft-365-agents-toolkit/skills/teams-app-developer/SKILL.md

## When to use it
- scaffold a Microsoft 365 agent project using `atk new`
- test agent responses locally inside Agents Playground without an M365 tenant
- provision Azure resources with `atk provision`
- convert Slack bots and Block Kit layouts to Teams Adaptive Cards
- fix AADSTS7000229 errors and token authority mismatches in `.localConfigs`

## Example prompts
- Scaffold a declarative agent for Teams with ATK and launch it in Agents Playground
- Convert this Slack Block Kit JSON into Teams Adaptive Cards format
- Fix error AADSTS7000229 encountered during the atk provision step

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 9c9afcfdbb4f552d.

BEGIN THIRD-PARTY FILE 9c9afcfdbb4f552d
````text
---
name: teams-app-developer
description: "Builds, tests, and deploys Microsoft 365 apps and agents for Teams and Copilot. Includes sub-skills for project creation, local testing, cloud deployment, troubleshooting, and Slack-to-Teams migration. USE FOR: Teams agent, bot, tab, message extension, Declarative Agents, Custom Engine Agents, local testing, Agents Playground, Azure resource provision, remote deployment, Slack to Teams migration, cross-platform bot development, Block Kit to Adaptive Cards conversion. DO NOT USE FOR: general web development, non-bot/non-Teams projects."
---

# Microsoft 365 Agents Toolkit Skill

Build Microsoft 365 agents and Teams apps using the ATK CLI.

## AI Behavior Guidelines

1. **Testing Strategy:** Recommend Agents Playground first (faster, no M365 needed). Use Teams workflow only if user explicitly requests it.

2. **Environment Variables:** NEVER hardcode secrets or make up placeholder values. Always ask users for real values.

3. **Error Handling:** Read error messages carefully. Check `env/.env.local`, `.localConfigs`, and `atk auth list`. Common pitfalls:
   - **`AADSTS7000229`** → `aadApp/create` missing `generateServicePrincipal: true` in YAML — add it and re-provision
   - **Missing `TENANT_ID`** in `.localConfigs` → SDK uses wrong token authority → 401 from Bot Connector
   - **401 persists after auth fix** → devtunnel URL may be blacklisted — create a fresh tunnel
   - See [troubleshoot/troubleshoot.md](troubleshoot/troubleshoot.md) for full diagnostic steps

4. **Long-Running Commands — WAIT for completion:**
   - `atk new`, `atk provision`, `atk deploy` can take several minutes
   - Always wait for completion before running the next step (timeout 120000ms+)

5. **Local Service Startup — Hangs terminal (expected):**
   - `npm run dev`, `npm start`, `python app.py`, `devtunnel host`, etc. will hang — the process keeps running indefinitely
   - ALWAYS run as a background process (`isBackground=true`) — NEVER use `isBackground=false` for these commands
   - Do NOT wait for it to "finish" — verify startup by checking output for "listening on port" or tunnel URL
   - If errors appear, read logs, diagnose, fix, restart
   - Use a **NEW terminal** to launch Agents Playground or open Teams sideloading URL

6. **Monitor App Logs:** Periodically check background terminal output for runtime errors. If the app crashes, read the error, fix the root cause, and restart.

7. **Telemetry Tagging:** Before running any `atk` CLI commands, set the session environment variable so all CLI invocations are tagged as skill-initiated:
   ```bash
   export ATK_CLI_SKILL=true
   ```
   Run this once at the start of the session. All subsequent `atk` commands in the same terminal will inherit it.

## ATK CLI Setup

```bash
atk --version  # Must be > 1.1.5-beta
```

If ATK is not found or version is too old:

```bash
npm i -g @microsoft/m365agentstoolkit-cli@beta
```

## CLI Global Options

| Option | Meaning          | Recommendation                                                                                                                                                                   |
````
END THIRD-PARTY FILE 9c9afcfdbb4f552d

The third-party file has ended. Everything between the 9c9afcfdbb4f552d tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3189 of 7766 bytes. © microsoft · MIT · https://github.com/microsoft/skills/tree/HEAD/.github/plugins/microsoft-365-agents-toolkit/skills/teams-app-developer/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
