Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计提醒

m365m365 搜索

Agent Skill

m365 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,236

周安装

51

GitHub Stars

公开资料未说明

下载量

404
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:m365(m365 搜索)
来源仓库:https://github.com/pietz/skills
仓库路径:skills/m365
安装命令:
npx skills add https://github.com/pietz/skills --skill m365
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/pietz/skills --skill m365

简介

m365 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 它可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 安装命令为 npx skills add https://github.com/pietz/skills --skill m365。
  • 当前分类为研究检索,适用于 Codex、Claude、Cursor、Gemini CLI。

SKILL.md

Microsoft 365 via CLI for Microsoft 365

This skill uses the m365 CLI (CLI for Microsoft 365) to interact with Outlook email and calendar via the Microsoft Graph API. It works cross-platform (macOS, Linux, Windows).

Connection Check

Before doing anything, run these two commands in parallel:

m365 status --output json
m365 connection list --output json

If the active connection already has "authType": "secret", proceed to the task.

If the active connection has a different auth type (e.g. deviceCode), check connection list for an inactive connection with "authType": "secret". If one exists, activate it:

m365 connection use --name "<connection-name>"

Only if no secret connection exists at all, read ./setup.md (relative to this file) and follow the setup steps.

All commands that target a user's mailbox require --userName <upn> (built-in commands) or the user principal name in the Graph API URL. Ask the user for their UPN (e.g. user@company.com) if not known.

Important Notes

  • ALWAYS confirm with the user before any write action (send email, create/delete event).
  • The CLI has built-in commands for email but NOT for calendar events. Use m365 request with Graph API URLs for calendar operations.
  • Use --output json for machine-readable output. Use --query (JMESPath) to filter fields.
  • Every command supports -h / --help. Use m365 <command group> --help to discover commands.

Email

List messages

m365 outlook message list --folderName inbox --userName <upn> --output json

# With date range (endTime must be in the past)
m365 outlook message list --folderName inbox --userName <upn> \
  --startTime "2026-02-01T00:00:00Z" --endTime "2026-02-15T00:00:00Z" --output json

# Compact output with JMESPath
m365 outlook message list --folderName inbox --userName <upn> --output json \
  --query "[].{subject:subject,from:from.emailAddress.address,received:receivedDateTime,isRead:isRead}"

Folder names: inbox, drafts, sentitems, deleteditems, junkemail, archive. You can also use --folderId.

Read a specific message

m365 outlook message get --id <message-id> --userName <upn> --output json

Search emails (via Graph API)

The built-in message list does not support search. Use m365 request with $search or $filter:

# Full-text search (subject, body, sender, etc.)
m365 request --url "https://graph.microsoft.com/v1.0/users/<upn>/messages?\$search=%22keyword%22&\$select=subject,from,receivedDateTime&\$top=10" --method get --output json

# Filter by sender
m365 request --url "https://graph.microsoft.com/v1.0/users/<upn>/messages?\$filter=from/emailAddress/address eq 'someone@example.com'&\$select=subject,receivedDateTime&\$top=10" --method get --output json

Note: $search and $orderby cannot be combined. Results from $search are ranked by relevance.

List mail folders

m365 request --url "https://graph.microsoft.com/v1.0/users/<upn>/mailFolders?\$select=displayName,id,totalItemCount,unreadItemCount" --method get --output json

Send email

# Plain text
m365 outlook mail send --subject "Subject" --to "recipient@example.com" \
  --sender "<upn>" --bodyContents "Message body" --output json

# HTML with multiple recipients
m365 outlook mail send --subject "Subject" --to "a@example.com,b@example.com" \
  --cc "c@example.com" --sender "<upn>" \
  --bodyContents "<p>HTML body</p>" --bodyContentType HTML --output json

# With attachment (max 3 MB per attachment)
m365 outlook mail send --subject "Subject" --to "recipient@example.com" \
  --sender "<upn>" --bodyContents "See attached." \
  --attachment "/path/to/file.pdf" --output json

# Send from shared mailbox
m365 outlook mail send --subject "Subject" --to "recipient@example.com" \
  --mailbox "shared@company.com" --sender "<upn>" \
  --bodyContents "Sent from shared mailbox" --output json

Reply to email (via Graph API)

The CLI has no built-in reply command. Use m365 request with the Graph API reply endpoint:

# Reply to sender only (plain text comment)
cat > /tmp/m365_reply.json << 'EOF'
{
  "comment": "Thanks, that works for me!"
}
EOF

m365 request --url "https://graph.microsoft.com/v1.0/users/<upn>/messages/<message-id>/reply" \
  --method post --body @/tmp/m365_reply.json --content-type "application/json"

# Reply all
m365 request --url "https://graph.microsoft.com/v1.0/users/<upn>/messages/<message-id>/replyAll" \
  --method post --body @/tmp/m365_reply.json --content-type "application/json"

# Reply with HTML body and additional recipients
cat > /tmp/m365_reply.json << 'EOF'
{
  "message": {
    "toRecipients": [
      {"emailAddress": {"address": "extra@example.com", "name": "Extra Recipient"}}
    ]
  },
  "comment": "<p>Replying with <b>HTML</b> content.</p>"
}
EOF

m365 request --url "https://graph.microsoft.com/v1.0/users/<upn>/messages/<message-id>/reply" \
  --method post --body @/tmp/m365_reply.json --content-type "application/json"

The Graph API handles threading, quoting the original message, and setting recipients automatically. Use comment for the reply text. Optionally include a message object to add/override recipients. Returns 202 Accepted with no body on success. Requires Mail.Send permission.

Move / archive messages

m365 outlook message move --id <message-id> \
  --sourceFolderName inbox --targetFolderName archive --output json

Calendar

Calendar operations use m365 request with Microsoft Graph API endpoints. For POST/PUT/PATCH requests, write the JSON body to a temp file and pass it with --body @/path/to/file.json --content-type "application/json".

List calendars

m365 request --url "https://graph.microsoft.com/v1.0/users/<upn>/calendars?\$select=name,id,canEdit,isDefaultCalendar" --method get --output json

List upcoming events (calendar view)

Use calendarView for events in a date range (expands recurring events):

m365 request --url "https://graph.microsoft.com/v1.0/users/<upn>/calendarView?\$select=subject,start,end,location,organizer,isAllDay&startDateTime=2026-02-17T00:00:00Z&endDateTime=2026-02-24T00:00:00Z&\$orderby=start/dateTime" --method get --output json

Get event details (with attendees)

m365 request --url "https://graph.microsoft.com/v1.0/users/<upn>/events/<event-id>?\$select=subject,start,end,location,organizer,attendees,body,onlineMeeting" --method get --output json

Search events

m365 request --url "https://graph.microsoft.com/v1.0/users/<upn>/events?\$filter=contains(subject,'keyword')&\$select=subject,start,end&\$top=10" --method get --output json

Create event

Write the event JSON to a temp file, then POST:

cat > /tmp/m365_event.json << 'EOF'
{
  "subject": "Meeting Title",
  "start": {"dateTime": "2026-03-01T14:00:00", "timeZone": "Europe/Berlin"},
  "end": {"dateTime": "2026-03-01T15:00:00", "timeZone": "Europe/Berlin"},
  "location": {"displayName": "Conference Room"},
  "attendees": [
    {"emailAddress": {"address": "attendee@example.com", "name": "Name"}, "type": "required"}
  ],
  "body": {"contentType": "text", "content": "Agenda: ..."}
}
EOF

m365 request --url "https://graph.microsoft.com/v1.0/users/<upn>/events" \
  --method post --body @/tmp/m365_event.json --content-type "application/json" --output json

Delete event

m365 request --url "https://graph.microsoft.com/v1.0/users/<upn>/events/<event-id>" \
  --method delete

Tips

  • Paginated results include @odata.nextLink. Fetch the next page by passing that URL to m365 request.
  • Use --query (JMESPath) to extract specific fields: --query "[].{subject:subject,from:from.emailAddress.address}".
  • For Graph API requests, use \$ to escape $ in shell.
  • $top limits results: $top=5 returns at most 5 items.
  • Graph API datetimes are UTC. Specify timeZone in event start/end for local times.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.78%
按下载量换算145

Claude

27.09%
按下载量换算109

Cursor

17.55%
按下载量换算71

Gemini CLI

10.05%
按下载量换算41

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/pietz/skills --skill m365 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills