myskil
by @jizhidemu52
Monitor Outlook and other common webmail inboxes in a persistent Edge profile, process new messages as a detached local background task, capture complete mes...
clawhub install webmail-email-monitor-skillπ About This Skill
name: webmail-email-monitor description: | Monitor Outlook and other common webmail inboxes in a persistent Edge profile, process new messages as a detached local background task, capture complete message screenshots, download attachments to the desktop, and write structured Excel rows with deterministic Python logic. Use when Codex needs to start, stop, verify, or modify a Windows email monitoring workflow.
Webmail Email Monitor
Run this skill as a local background process on Windows.
Operating mode
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 startpowershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 statuspowershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 logs
if the user asks whether it is runningDo not do this by default:
Standard rule
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.
Fast return rule
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:
1. Run powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 start
2. Run powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 status
3. If status is running, return immediately
Do not block the reply on:
Python-first boundary
Keep these behaviors in Python scripts instead of prompt instructions:
Do not rewrite deterministic Python behavior as a natural-language checklist inside the skill.
Model boundary
Only use model judgment for work that cannot be expressed reliably in Python, such as:
If a behavior can be implemented with explicit rules, implement or update the Python script instead of expanding the prompt.
Required output behavior
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.
Start
powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 start
After the first start:
webmail-monitor shim
wingetReuse requirements
Keep this skill reusable across machines by following these rules:
SKILL.mdwebmail-monitorwebmail-monitor points to that machine's copied skill folder
Assume these host prerequisites for reuse:
skills/ directorywingetIf 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.
Stop
powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 stop
Status and logs
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
Default workflow
Follow this workflow when monitoring is requested:
1. Start the detached monitor.
2. Confirm monitoring from powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 status.
3. Ask the user to complete mailbox login in the opened Edge window if needed.
4. Leave the background process running after the chat turn ends.
5. Stop the monitor only when the user explicitly asks.
Response pattern
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.
Notes
scripts/.webmail-monitor start|stop|restart|status|logswebmail-monitor start should be treated as a fire-and-return action, not aprocessed.json says a mail was handled but the workbook does not containπ Tips & Best Practices
scripts/.webmail-monitor start|stop|restart|status|logswebmail-monitor start should be treated as a fire-and-return action, not aprocessed.json says a mail was handled but the workbook does not contain