zrosenfield/m365-cli/m365-mail
Claude Code and agent skill by zrosenfield/m365-cli
- community
Checking that the SKILL.md file is still in the repository.
Microsoft 365 Mail: Read, send, reply to, and delete email messages; manage mail folders.
Install
npx vskill@latest install zrosenfield/m365-cli/m365-mailSKILL.md
m365-mail — Mail Operations
Prerequisites
Complete auth setup from m365-shared SKILL.md. Mail commands require delegated auth (device code login) with Mail permissions:
Required app permissions (delegated):
Mail.ReadWrite— read and manage messagesMail.Send— send messages
Command Reference
List messages
Well-known folder names (case-insensitive): inbox, sentitems, drafts, deleteditems, junkemail, archive, outbox
Output: array of Message objects with id, subject, from, toRecipients, body, receivedDateTime, isRead.
Get a message
Send a message
--to,--cc,--bccaccept comma-separated email addresses--htmlsetsbody.contentTypetoHTML; omitting it sends plain text- Message is saved to Sent Items
Reply to a message
Delete a message
Moves to Deleted Items (not permanently deleted).
List mail folders
Get a folder
Track mail changes (delta query)
Prefer this over polling `mail list --filter "isRead eq false"` for detecting new mail. Delta queries are efficient and stateful — each call returns only what changed since the last.
Flags:
| Flag | Default | Description | |||
|---|---|---|---|---|---|
| `--folder <name\ | id>` | inbox | Well-known folder name or raw folder ID | ||
--state-file <path> | $XDG_STATE_HOME/m365-cli/mail-delta-<folder>.link | Where the delta link is persisted | |||
| `--change-type <created\ | updated\ | deleted>` | (all) | Filter by change type (initial sync only) | |
--select <fields> | internetMessageId,from,subject,receivedDateTime,isRead | Fields to return; internetMessageId always appended | |||
--max-page-size <n> | 50 | Max messages per page | |||
--reset | — | Delete state file and exit | |||
--init-quiet | — | First run: drain all pages silently, just save the delta link | |||
| `--format ndjson\ | json` | ndjson | Output format (NDJSON by default; json gives standard { "data": [...] } envelope) |
Output format: NDJSON by default (one JSON object per line). Each object is the raw Graph Message. Deleted messages arrive with "@removed": {"reason": "deleted"} — pass them through, don't filter.
Required permissions (delegated): Mail.Read
State file location: $XDG_STATE_HOME/m365-cli/mail-delta-<folder>.link (falls back to ~/.local/state/m365-cli/...). Delete it or use --reset to force a full re-sync.
Common Patterns
Read unread messages from inbox
Send and verify delivery
Find and delete messages matching a subject
Reply to the latest message in inbox
API Resources
GET /me/mailFolders/{folder}/messages— list messagesGET /me/messages/{id}— get messagePOST /me/sendMail— send messagePOST /me/messages/{id}/reply— replyPOST /me/messages/{id}/replyAll— reply allDELETE /me/messages/{id}— delete messageGET /me/mailFolders— list foldersGET /me/mailFolders/{id}— get folder
Discovering Commands
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/m365-mail/SKILL.md
Popularity
- Repository stars
- 4
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/zrosenfield/m365-cli/m365-mail)