Use when extracting Microsoft Teams chat messages - navigates Teams, captures clipboard, parses to JSON, and persists with deterministic new message detection
View on GitHubnathanvale/side-quest-marketplace
teams-scrape
February 4, 2026
Select agents to install to:
npx add-skill https://github.com/nathanvale/side-quest-marketplace/blob/main/plugins/teams-scrape/skills/teams-scrape/SKILL.md -a claude-code --skill teams-scrapeInstallation paths:
.claude/skills/teams-scrape/# Teams Chat Scraper
Extract chat messages from Microsoft Teams desktop app using `macos-automator` MCP tools and persist with deterministic new message detection.
## When to Use
Invoke this skill when you need to:
- Extract chat history from a Teams DM or channel
- Capture meeting chat content
- Get structured JSON from Teams messages
- Parse reactions, replies, and attachments
- **Track new messages** since last scrape (deterministic by message ID)
## Prerequisites
1. **Microsoft Teams desktop app** must be running
2. **Accessibility permissions** granted to the terminal/Claude Code
3. **macos-automator MCP** available (provides `execute_script` tool)
## Architecture
This skill uses a **two-phase approach**:
1. **AppleScript navigation** (via macos-automator MCP) - navigates Teams and captures clipboard
2. **TypeScript CLI** - parses clipboard, deduplicates by ID, persists atomically
The CLI handles parsing/storage/diffing, while AppleScript handles UI automation.
## Persistence & New Message Detection
Scrape results are saved to `~/.config/teams-scrape/` for tracking changes between runs.
### Storage Location
```
~/.config/teams-scrape/
├── ben-laughlin.json # Kebab-case filename from target name
├── jay-pancholi.json
└── engineering-standup.json
```
### File Schema
```typescript
interface StoredChat {
target: string; // Original target name
targetSlug: string; // Kebab-case filename
lastScrapedAt: string; // ISO 8601 timestamp of last scrape
messageCount: number; // Total messages stored
messages: TeamsMessage[]; // All captured messages (sorted by timestamp)
}
interface TeamsMessage {
id: string; // Stable hash ID for deduplication
author: string;
timestamp: string; // ISO 8601
content: string;
replyTo?: { author: string; preview: string };
reactions?: { emoji: string; count: number; name: string }[];
attachments?: { type: "gif" | "image" | "file" | "url" | "loop"; name?: s