ms-teams-setup
Skill509 starsChanged 3 months agoMITView on GitHub
Connect Microsoft Teams for cross-channel context awareness. Use when the user says 'connect Teams', 'hook up Microsoft'. Not for Google email/calendar; use `google-workspace-setup`.
In this repository153 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .claude/plugins/compound-engineering/CLAUDE.mdCLAUDE.md
- .cursor/rules/search-routing.mdcCursor rule
- anthropic-algorithmic-artSkill
- anthropic-brand-guidelinesSkill
- anthropic-doc-coauthoringSkill
- anthropic-docxSkill
- anthropic-frontend-designSkill
- anthropic-internal-commsSkill
- anthropic-mcp-builderSkill
- anthropic-pptxSkill
- anthropic-slack-gif-creatorSkill
- anthropic-theme-factorySkill
- anthropic-webapp-testingSkill
- anthropic-web-artifacts-builderSkill
- anthropic-xlsxSkill
- atlassian-setupSkill
- backup-nowSkill
- backup-restoreSkill
- backup-setupSkill
- calendar-setupSkill
- commitmentsSkill
- create-mcpSkill
- daily-planSkill
- daily-reviewSkill
- decision-logSkill
- delegate-checkSkill
- dex-backlogSkill
- dex-doctorSkill
- dex-improveSkill
- dex-obsidian-setupSkill
- dex-rollbackSkill
- dex-updateSkill
- dex-whats-newSkill
- diff-profileSkill
- enable-semantic-searchSkill
- getting-startedSkill
- goal-backlogSkill
- google-workspace-setupSkill
- granola-setupSkill
- identity-snapshotSkill
- industry-truthsSkill
- initiative-kickoffSkill
- integrate-mcpSkill
- journalSkill
- manage-capabilitiesSkill
- meeting-closeoutSkill
- meeting-prepSkill
- pipedrive-setupSkill
- pipeline-syncSkill
- process-meetingsSkill
- product-briefSkill
- project-healthSkill
- prompt-improverSkill
- relationship-radarSkill
- reviewSkill
- save-insightSkill
- scrapeSkill
- skill-scoreSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 13 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 41
Only YOUR tenant messages are accessible (scoped to your account)
- Distinctive: line 58
If healthy and responding, skip to Step 5 (Configure Channels)
- Distinctive: line 59
If the tool is not available or errors, continue to Step 2
- Very specific: line 82
Check the user's MCP configuration.
- Very specific: line 93
Add to the user's .mcp.json (use the /dex-add-mcp skill or manual edit):
- Very specific: line 129
Run the Teams MCP auth command (e.g., teams_authenticate())
- Distinctive: line 181
If they say "show me what's available":
- Very specific: line 182
Run teams_list_channels() or equivalent
- Distinctive: line 189
Run a quick test to confirm everything works:
- Distinctive: line 204
If either fails, troubleshoot before proceeding.
- Very specific: line 208
Write to System/integrations/config.yaml -- update the teams section:
- Very specific: line 223
If the file already exists, only update the teams: section.
- Very specific: line 227
Check if Slack is also enabled in config.yaml.
- Distinctive: line 239
When both Slack AND Teams are enabled:
- Distinctive: line 242
No duplication -- each source is labeled
- Distinctive: line 243
If the same person appears in both Slack and Teams, context is merged with source labels
- Distinctive: line 277
If refresh fails, you'll need to sign in again
- Distinctive: line 289
Ask your IT team to approve these in Entra ID > Enterprise Applications.
- Distinctive: line 303
Ensure your account has a Teams license (not just Outlook).
- Very specific: line 310
If the user runs /ms-teams-setup when already configured:
- Very specific: line 312
Check current status with teams_health_check()
- Distinctive: line 322
If user wants to disconnect:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- Generated from `.claude/skills/ms-teams-setup/SKILL.md` by `scripts/generate-agents-skills.py`. Do not edit. -->Teams Setup
Connect your Microsoft Teams workspace to Dex so your daily plans, meeting prep, and people pages get richer context from Teams conversations.
What This Enables
Once connected, Dex can:
- Meeting Prep: See recent Teams conversations with attendees before your meeting
- Daily Plan: Surface unread chats and mentions that need your attention
- Person Context: Know what you last discussed with someone in Teams
Privacy
- Dex reads Teams messages on demand -- nothing is stored permanently
- Messages are fetched, summarized, and discarded after the session
- Only YOUR tenant messages are accessible (scoped to your account)
- The OAuth token stays local on your machine and is gitignored
When to Run
- User types
/ms-teams-setup - User asks about connecting Teams
- User wants Teams context in daily plans or meeting prep
- During
/integrate-mcpif Teams is mentioned
Setup Flow
Step 1: Check if Already Connected
- Try calling
teams_health_check()from the Teams MCP server - If healthy and responding, skip to Step 5 (Configure Channels)
- If the tool is not available or errors, continue to Step 2
Step 2: Explain What We're Setting Up
Say:
**Let's connect Microsoft Teams to Dex.**
This uses an OAuth 2.0 flow through Microsoft Entra ID (Azure AD) to securely
access your Teams messages and channels.
**What you'll need:**
- Your Microsoft 365 / Teams account credentials
- About 5 minutes (may need admin consent depending on your org)
**Ready to go?**Wait for confirmation.
Step 3: Add the Teams MCP Server
Check the user's MCP configuration. If teams-mcp is not listed:
- Explain what we're adding:
I need to add the Teams connector to your Dex configuration.
This adds a bridge that lets Dex read your Teams messages and channels
through the Microsoft Graph API using OAuth 2.0.- Add to the user's
.mcp.json(use the/dex-add-mcpskill or manual edit):
{
"teams-mcp": {
"command": "npx",
"args": ["-y", "teams-mcp"],
"env": {
"TEAMS_TENANT_ID": "<tenant-id>",
"TEAMS_CLIENT_ID": "<client-id>"
}
}
}- Tell the user the MCP server needs to restart for changes to take effect.
Step 4: Authenticate via OAuth 2.0
- Guide the user through the OAuth flow:
**Microsoft Entra ID Authentication**
You'll need to authorize Dex to read your Teams data. This opens a browser
window where you sign in with your Microsoft account.
**Steps:**
1. I'll start the auth flow -- a browser window will open
2. Sign in with your Microsoft 365 account
3. Grant the requested permissions (read messages, channels, presence)
4. The token will be saved locally on your machine
**Starting now...**- Run the Teams MCP auth command (e.g.,
teams_authenticate()) - Verify with
teams_health_check()
If health check succeeds:
Connected! I can see your Teams tenant.If it fails -- admin consent required:
Hmm, your organization requires admin consent for this app.
**Options:**
1. **Ask your IT admin** to approve the app in Entra ID (Azure AD)
- App permissions needed: Chat.Read, ChannelMessage.Read, User.Read, Presence.Read
2. **Use a personal account** if this is for personal Teams
3. **Skip for now** and come back after admin approval
Which would you prefer?If it fails -- other error:
That didn't work. A few things to check:
1. **Are you signed into the right Microsoft account?**
2. **Is your organization using Microsoft 365?** (Teams needs an M365 license)
3. **Try signing out of all Microsoft accounts** in your browser, then retry
Want to retry?Retry up to 2 times, then offer to skip and come back later.
Step 5: Configure Channels
Once connected, ask:
**Which Teams channels matter most for your work?**
I'll prioritize these when building your daily digest and meeting prep.
Some common choices:
- Your 1:1 chats (always included automatically)
- Team channels (e.g., General, your department)
- Project-specific channels
- Customer or deal channels
**Which channels should I watch?** (Just list names, or say "show me what's available")If they say "show me what's available":
- Run
teams_list_channels()or equivalent - Show the list and let them pick
Save their choices for the config file.
Step 6: Test the Connection
Run a quick test to confirm everything works:
teams_list_chats(limit=3)-- verify chats loadteams_search_messages(query="test", count=1)-- verify search works
Show a brief summary:
**Quick test results:**
- Chats: Found [N] recent conversations
- Search: Working
Everything looks good!If either fails, troubleshoot before proceeding.
Step 7: Save Configuration
Write to System/integrations/config.yaml -- update the teams section:
teams:
enabled: true
configured_at: YYYY-MM-DD
priority_channels:
- channel-name-1
- channel-name-2
features:
teams_digest: true
meeting_prep: true
person_enrichment: trueIf the file already exists, only update the teams: section. Preserve other integration configs.
Step 8: Coexistence Check (Slack + Teams)
Check if Slack is also enabled in config.yaml. If so:
**Both Slack and Teams are now connected!**
Here's how they work together:
- **Daily Plan** shows both digests, clearly labeled: "**Slack:**" and "**Teams:**"
- **Meeting Prep** searches both for attendee context
- No duplication -- each source is labeled and deduplicated where the same person appears in both
- You can disable either one anytime without affecting the otherWhen both Slack AND Teams are enabled:
/daily-planshows both digests side by side/meeting-prepchecks both for attendee context- No duplication -- each source is labeled
- If the same person appears in both Slack and Teams, context is merged with source labels
Step 9: Capability Cascade (Confirm)
**Teams is connected!**
Here's what just changed:
### Enhanced
- **`/daily-plan`** -- Now includes a Teams digest with unread chats and mentions
- **`/meeting-prep`** -- Searches Teams for recent threads with attendees
### New Superpowers
- **Teams Digest** -- Appears automatically in your daily plans
- **Teams Person Context** -- People pages include latest Teams conversations
### How It Works
- **Reading:** Teams context appears automatically in your plans and prep
- **Privacy:** Messages are fetched on demand, summarized, then discarded. Nothing stored permanently.
You can adjust settings anytime by running `/ms-teams-setup` again.Troubleshooting
Token Expired
OAuth tokens expire periodically (typically every 60-90 minutes, with a refresh token lasting longer). If you see auth errors:
- Run
/ms-teams-setup - The OAuth flow will refresh your token automatically
- If refresh fails, you'll need to sign in again
This is normal -- Microsoft OAuth tokens have shorter lifespans than some other services.
Admin Consent Required
Your Microsoft 365 admin may need to approve the app. Common permissions needed:
Chat.Read-- Read your chat messagesChannelMessage.Read.All-- Read channel messagesUser.Read-- Read your profilePresence.Read-- Read presence status
Ask your IT team to approve these in Entra ID > Enterprise Applications.
"Teams MCP not found"
The server might not be in your configuration. Re-run /ms-teams-setup and it will detect and fix this.
Rate Limiting
Microsoft Graph API has throttling limits. If you see 429 errors, wait a few minutes and retry. This rarely happens during normal use.
No Messages Found
A few possibilities:
- Your tenant may restrict API access. Check with your IT/admin team.
- Ensure your account has a Teams license (not just Outlook).
- Try
teams_search_messages(query="hello", count=1)as a basic test.
Reconfiguration
If the user runs /ms-teams-setup when already configured:
- Check current status with
teams_health_check() - Show current config from
System/integrations/config.yaml - Offer options:
- Update priority channels
- Toggle features (digest, meeting prep, person enrichment)
- Re-authenticate (if token expired)
- Disconnect Teams
Disconnect Flow
If user wants to disconnect:
- Update
System/integrations/config.yaml:teams: enabled: false - Confirm: "Teams is disconnected. Your daily plans and meeting prep will no longer include Teams context. Run
/ms-teams-setupanytime to reconnect."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

