360 Secure SkillHub
360 安全技能中心

TinkerClaw Outlook

通过 Microsoft Graph,使用标准输入提供的短期访问令牌读取和搜索 Outlook 邮件、下载附件,并可创建或修改草稿并保留原签名;仅在显式确认时可批量导出邮件正文与附件元数据。不包含发送、回复、转发、移动、标记、删除以及联系人、日历读取能力。

globalcaos
globalcaos
热度 59.21
最近更新 2026-09-24 11:54:19
分类:协作依赖:代码执行 / 读写文件 / 第三方 API应用场景:邮件起草 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add outlook-hack
Metadata
name
outlook-hack
version
3.4.2
description
Read and search Outlook, inspect attachments, and create or edit drafts without any send endpoint. Uses one short-lived Microsoft Graph access token supplied on stdin for one run; it never stores credentials. Bulk mailbox export is opt-in.
metadata
{"openclaw":{"emoji":"📧","os":["linux","darwin"],"requires":{"capabilities":["network","file_write"]},"permissions":{"network":"Credentialed HTTPS requests only to graph.microsoft.com; enforced by a runtime allowlist.","file_write":"No credential storage. Optional mailbox exports require --yes and use mode 0600 files inside a mode 0700 directory.","mail_write":"Can create and patch drafts. No send, reply-to-network, forward-to-network, move, flag, or delete operation is shipped."}}}

Part of TinkerClaw.

Outlook — read, search, and draft; never send

This skill reads Outlook mail and creates or edits drafts through Microsoft Graph. The shipped client has no send endpoint. It does not install packages, run subprocesses, store credentials, contact telemetry services, or transmit mailbox data anywhere except Microsoft Graph.

What ships

One zero-dependency Node.js client: scripts/outlook-mail-fetch.mjs.

It can:

  • list recent messages and drafts;
  • read a complete message body;
  • download attachments to a directory you choose;
  • create or patch drafts while preserving the existing signature;
  • export mailbox bodies and attachment metadata locally, only with --fetch-all --yes.

It cannot send, reply, forward, permanently delete, move, flag, read contacts, or read calendars. Those capabilities are intentionally outside this public package.

Permissions, data flow, and consent

Authentication. Supply a short-lived Microsoft Graph access token on standard input for each invocation. This package does not extract, refresh, print, or store tokens. Obtain the token through a Microsoft-supported login tool or identity flow approved by your organisation, requesting only the mail scopes needed for the command.

Network boundary. Every credentialed request is runtime-checked before the token is read. The destination must be exactly https://graph.microsoft.com with no user information, custom port, HTTP downgrade, or lookalike subdomain. Pagination URLs are checked by the same function.

Local mailbox data. Normal list/read commands print to the current process and do not create a mailbox mirror. Bulk export refuses to run without --yes. Export directories are rejected if they are symlinks and forced to mode 0700; exported bodies, summaries, indexes, and downloaded attachments reject symlink targets and are forced to mode 0600, including pre-existing paths. Attachment downloads never overwrite an existing file: they allocate a unique name and create it with exclusive wx. Message IDs are restricted to Graph-safe characters and encoded before they enter a URL. Data is plaintext at rest.

No command-line secrets. The client refuses tokens as command-line arguments. Pipe the access token on stdin so it does not appear in process listings or shell history.

Commands

printf '%s' "$OUTLOOK_ACCESS_TOKEN" | node {baseDir}/scripts/outlook-mail-fetch.mjs --test --access-token-stdin
printf '%s' "$OUTLOOK_ACCESS_TOKEN" | node {baseDir}/scripts/outlook-mail-fetch.mjs --list-drafts --access-token-stdin --limit 15
printf '%s' "$OUTLOOK_ACCESS_TOKEN" | node {baseDir}/scripts/outlook-mail-fetch.mjs --get '<message-id>' --access-token-stdin
printf '%s' "$OUTLOOK_ACCESS_TOKEN" | node {baseDir}/scripts/outlook-mail-fetch.mjs --get-attachments '<message-id>' --access-token-stdin --out '<private-dir>'
printf '%s' "$OUTLOOK_ACCESS_TOKEN" | node {baseDir}/scripts/outlook-mail-fetch.mjs --patch-draft '<draft-id>' --body-file body.html --keep-signature --access-token-stdin
printf '%s' "$OUTLOOK_ACCESS_TOKEN" | node {baseDir}/scripts/outlook-mail-fetch.mjs --fetch-all --yes --months 6 --access-token-stdin

Review every draft in Outlook before sending it manually. This skill never sends on your behalf.

Cleanup

Optional exports live under ~/.openclaw/workspace/data/outlook-emails/. Inspect that directory and remove it with your normal file manager or recovery-aware deletion tool when no longer needed.

Source and issues: https://github.com/globalcaos/tinkerclaw