Install any skill in seconds. Free to start, no credit card required.
Get Started Free →This skill should be used when the user asks to "read my emails", "send an email", "compose email", "check my calendar", "get calendar events", "create a meeting", "schedule an event", "add calendar event", "search emails", "list mail folders", "show unread messages", "what meetings do I have", "fetch emails from Microsoft", "access Outlook", or mentions Microsoft Graph, Office 365 email, or Outlook calendar integration.
.claude/skills/aiskillstore-microsoft-graph-api/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 20% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 59% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 104% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 52% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 2% | 0% |
Access Microsoft 365 emails and calendar through TypeScript scripts executed via Bun.
This skill provides access to Microsoft Graph API for:
All scripts return JSON and handle authentication automatically.
All scripts output JSON with a consistent structure:
json{"status": "success", "data": [...]}
json{ "status": "auth_required", "userCode": "ABC123", "verificationUri": "https://microsoft.com/devicelogin", "expiresAt": "2024-01-15T10:30:00.000Z", "message": "To sign in, use a web browser..." }
When you receive auth_required, display to the user:
To access your email, please authenticate:
1. Go to: https://microsoft.com/devicelogin
2. Enter code: ABC123
Let me know when you've completed authentication.Then retry the same command - the script will automatically complete authentication.
json{ "status": "auth_pending", "userCode": "ABC123", "verificationUri": "https://microsoft.com/devicelogin", "expiresAt": "...", "message": "..." }
User has been shown the code but hasn't completed login yet. Remind them to complete authentication.
json{"status": "error", "error": "Error description"}
All scripts are located at ${CLAUDE_PLUGIN_ROOT}/skills/microsoft-graph/scripts/.
bashbun run ${CLAUDE_PLUGIN_ROOT}/skills/microsoft-graph/scripts/emails.ts list bun run emails.ts list --folder "Sent Items" --top 5 bun run emails.ts list --profile work
bashbun run emails.ts read --id AAMkAG...
Get the ID from the list command output.
bashbun run emails.ts search --query "from:boss@company.com" bun run emails.ts search --query "subject:quarterly report" bun run emails.ts search --query "hasAttachments:true"
bashbun run emails.ts folders
bash# Simple email bun run emails.ts send --to "user@example.com" --subject "Hello" --body "Hi there!" # Multiple recipients with CC bun run emails.ts send --to "a@example.com,b@example.com" --cc "c@example.com" --subject "Team Update" --body "Here's the update..." # HTML email bun run emails.ts send --to "user@example.com" --subject "Report" --body "<h1>Monthly Report</h1><p>Details...</p>" --html # With BCC bun run emails.ts send --to "team@example.com" --bcc "manager@example.com" --subject "Announcement" --body "..."
bashbun run ${CLAUDE_PLUGIN_ROOT}/skills/microsoft-graph/scripts/calendar.ts list bun run calendar.ts today bun run calendar.ts week bun run calendar.ts list --start tomorrow --end +7d
bashbun run calendar.ts view --id AAMkAG...
bashbun run calendar.ts search --query "team standup"
today, tomorrow, +7d, +1m, +1y2024-01-15 or 2024-01-15T14:00:00bash# Basic event (1 hour default duration) bun run calendar.ts create --subject "Team Meeting" --start "2024-01-15T14:00:00" # Event with end time bun run calendar.ts create --subject "Workshop" --start "2024-01-15T09:00:00" --end "2024-01-15T12:00:00" # Event with location and description bun run calendar.ts create --subject "Lunch" --start "2024-01-15T12:00:00" --location "Cafe" --body "Team lunch" # Event with attendees bun run calendar.ts create --subject "1:1" --start tomorrow --end +1d --attendees "colleague@example.com" # Multiple attendees bun run calendar.ts create --subject "Review" --start "2024-01-15T10:00:00" --attendees "a@ex.com,b@ex.com,c@ex.com" # All-day event bun run calendar.ts create --subject "Holiday" --start "2024-12-25" --all-day # Using relative dates bun run calendar.ts create --subject "Follow-up" --start tomorrow --end +1d
Store multiple accounts using profiles:
bash# Use work profile bun run emails.ts list --profile work bun run calendar.ts today --profile work # Use personal profile bun run emails.ts list --profile personal
For explicit auth management (listing/deleting profiles):
bash# List all profiles bun run ${CLAUDE_PLUGIN_ROOT}/skills/microsoft-graph/scripts/auth.ts --list # Delete a profile bun run auth.ts --delete --profile old-account # Authenticate with custom Azure AD app bun run auth.ts --client-id your-app-id --tenant-id your-tenant-id
| Token Type | Lifetime | Handling | |------------|----------|----------| | Access Token | ~1 hour | Automatically refreshed | | Refresh Token | ~90 days | When expired, scripts return auth_required |
Users only need to re-authenticate when the refresh token expires (~90 days).
Credentials are stored at ~/.config/api-skills/credentials.json.
| Script | Purpose | |--------|---------| | emails.ts | Email list, read, search, send, and folder operations | | calendar.ts | Calendar view, search, and create operations | | auth.ts | Manual credential management (list, delete profiles) |
For detailed API reference, see:
references/graph-api.md - Microsoft Graph API endpoints and parameters| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-08 | fail→fail | 16,336 | 16,139 | -1% | 1 | 1 | 0% | 427 | 2,009 | +370% | 0 | 0 | — |
case-01 | fail→fail | 6,179 | 18,830 | +205% | 1 | 1 | 0% | 983 | 2,132 | +117% | 0 | 0 | — |
case-02 | fail→fail | 5,299 | 8,701 | +64% | 1 | 1 | 0% | 980 | 2,211 | +126% | 0 | 0 | — |
case-03 | fail→fail | 14,159 | 6,041 | -57% | 1 | 1 | 0% | 1,253 | 1,892 | +51% | 0 | 0 | — |
case-04 | fail→pass | 14,542 | 2,999 | -79% | 1 | 1 | 0% | 1,765 | 2,113 | +20% | 0 | 0 | — |
case-05 | fail→pass | 12,784 | 15,054 | +18% | 1 | 1 | 0% | 1,254 | 1,992 | +59% | 0 | 0 | — |
case-06 | fail→pass | 11,004 | 7,692 | -30% | 1 | 1 | 0% | 979 | 1,996 | +104% | 0 | 0 | — |
case-07 | fail→pass | 13,351 | 2,053 | -85% | 1 | 1 | 0% | 1,269 | 1,925 | +52% | 0 | 0 | — |
case-14 | fail→fail | 16,890 | 11,277 | -33% | 1 | 1 | 0% | 1,334 | 1,999 | +50% | 0 | 0 | — |
case-09 | fail→pass | 12,465 | 3,516 | -72% | 1 | 1 | 0% | 2,173 | 2,211 | +2% | 0 | 0 | — |
case-10 | fail→fail | 11,973 | 19,255 | +61% | 1 | 1 | 0% | 1,140 | 1,970 | +73% | 0 | 0 | — |
case-11 | fail→fail | 17,907 | 9,912 | -45% | 1 | 1 | 0% | 2,139 | 1,871 | -13% | 0 | 0 | — |
case-12 | fail→fail | 11,024 | 14,970 | +36% | 1 | 1 | 0% | 882 | 1,914 | +117% | 0 | 0 | — |
case-13 | pass→pass | 5,840 | 2,776 | -52% | 1 | 1 | 0% | 1,026 | 2,073 | +102% | 0 | 0 | — |
case-15 | fail→pass | 16,219 | 6,913 | -57% | 1 | 1 | 0% | 1,848 | 1,908 | +3% | 0 | 0 | — |
case-16 | fail→pass | 15,112 | 5,178 | -66% | 1 | 1 | 0% | 1,586 | 1,889 | +19% | 0 | 0 | — |
case-17 | fail→fail | 15,196 | 8,932 | -41% | 1 | 1 | 0% | 2,079 | 2,163 | +4% | 0 | 0 | — |
case-18 | fail→pass | 7,271 | 9,035 | +24% | 1 | 1 | 0% | 1,192 | 2,367 | +99% | 0 | 0 | — |
case-19 | pass→pass | 10,211 | 10,216 | +0% | 1 | 1 | 0% | 1,674 | 2,557 | +53% | 0 | 0 | — |
case-20 | fail→pass | 17,038 | 9,988 | -41% | 1 | 1 | 0% | 2,251 | 2,424 | +8% | 0 | 0 | — |
case-21 | fail→pass | 29,604 | 10,200 | -66% | 1 | 1 | 0% | 2,518 | 3,457 | +37% | 0 | 0 | — |
case-22 | pass→pass | 14,577 | 11,629 | -20% | 1 | 1 | 0% | 2,556 | 2,721 | +6% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 14 counted toward the lift figure. The other 8 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +45 percentage points is the difference between those two pass rates over the 14 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.