Run this skill as a local background process on Windows.
Treat supported webmail monitoring as a detached automation task, not as an
in-turn browser session.
Do this by default:
powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 startopened Edge windows
powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 status or powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 logs
if the user asks whether it is running
Do not do this by default:
Prefer Python over prompt logic whenever the work can be expressed
deterministically.
Use prompt text for orchestration, brief user communication, and the small set
of judgments that truly require semantic interpretation.
Move the rest into scripts.
When the user asks to start or enable monitoring, do not keep the current chat
turn open waiting for mailbox login, message opening, attachment processing, or
Excel writes.
Use this exact success path:
powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 startpowershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 statusrunning, return immediatelyDo not block the reply on:
Keep these behaviors in Python scripts instead of prompt instructions:
field rules
naming
writing
explicit conditionals
Do not rewrite deterministic Python behavior as a natural-language checklist
inside the skill.
Only use model judgment for work that cannot be expressed reliably in Python,
such as:
are insufficient
enough
If a behavior can be implemented with explicit rules, implement or update the
Python script instead of expanding the prompt.
Make the monitor produce these local artifacts:
outlook_email_monitor.xlsxoutlook_email_monitor_shotsruntime/monitor.logMake the workbook row structure match the existing business table in this
column order:
Capture the full visible message content whenever possible. If the page cannot
produce a full-page screenshot, capture the most complete fallback screenshot
available and keep processing.
Download visible attachments whenever they are present and record their names
or related notes in the workbook.
Read supported attachment content with Python after download and feed that
content into the same deterministic field-extraction rules before writing the
Excel row. If a file type cannot be read reliably, still download it, record
its filename, and keep processing.
Only treat an email as fully processed after the Excel write succeeds. If the
processed-state marker exists but the workbook row is missing, the monitor must
rewrite the row instead of skipping it.
Support the same workflow across Outlook and other common webmail providers.
Prefer built-in support for Outlook, Gmail, QQ Mail, 163 Mail, 126 Mail, and
Yahoo Mail, then fall back to generic browser-mail selectors when possible.
Use Gmail as the default monitored provider unless the user explicitly asks to
switch to a different mailbox.
powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 start
After the first start:
tab
and refreshes the local webmail-monitor shim
to install them automatically with winget
Keep this skill reusable across machines by following these rules:
SKILL.mdwebmail-monitor webmail-monitor points to that machine's copied skill folder
Assume these host prerequisites for reuse:
attachments
skills/ directory installation through winget
If a prerequisite is missing, report the missing requirement directly instead of
pretending monitoring started successfully.
OpenClaw should rely on the bootstrap-capable CLI script so first-run dependency
installation can happen automatically on a new machine.
Bootstrap responsibilities on a new machine:
webmail-monitor command shimIf automatic host installation is blocked because winget is unavailable or
restricted, fail with explicit manual install URLs instead of pretending the
machine is ready.
powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 stop
powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 bootstrap
powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 doctor
powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 status
powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 logs
webmail-monitor status
webmail-monitor logs
Follow this workflow when monitoring is requested:
powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 status.After starting the monitor, respond with a short status update that includes:
logs command, not the start flowAfter stopping the monitor, confirm that the background process has been
stopped.
OpenClaw agent turn ends.
profile and later runs should reuse that session.
monitor script over adding more prompt prose.
scripts/.webmail-monitor start|stop|restart|status|logsover direct script paths.
webmail-monitor start should be treated as a fire-and-return action, not along-running foreground task inside the chat turn.
processed.json says a mail was handled but the workbook does not containthe corresponding row, treat that as recoverable state drift and rewrite the
row.
共 1 个版本