Install
openclaw skills install qqmail-organizerAgent-facing QQ Mail inbox management over IMAP/SMTP for OpenClaw, Hermes, and other autonomous agents. Use when an agent must read, search, reply to, classify, organize, archive, mark read/unread, or safely clean up a QQ Mail inbox while preserving explicit dry-run/approval boundaries. Especially useful for agentic inbox triage, non-mutating cleanup plans, rule-based organization, newsletter/marketing/GitHub notification sorting, and avoiding accidental destructive email operations.
openclaw skills install qqmail-organizerUse this skill as an execution protocol for agents, not as a human walkthrough. The agent should operate the bundled scripts, summarize results, preserve safety boundaries, and avoid exposing credentials or unnecessary private email content.
Core behavior:
--json for parent-agent orchestration when using plan-organize or auto-organize.plan-organize and default auto-organize as safe read-only planning.--apply, archive without --dry-run, mark-* without --dry-run, send without --dry-run, reply without --dry-run, and delete as mutations.Credentials are read only from environment variables:
QQMAIL_USER: QQ email address.QQMAIL_AUTH_CODE: QQ Mail IMAP/SMTP authorization code, not the account password.Never print, persist, or place QQMAIL_AUTH_CODE in prompts, reports, cron jobs, memory, commits, or rule files.
python3 scripts/qqmail.py plan-organize --limit 50 --json
python3 scripts/qqmail.py auto-organize --limit 100 --json
python3 scripts/qqmail.py auto-organize --limit 100 --apply
For a specific requested move, mark, send, or reply, run a narrow command. Use --dry-run first for bulk move/mark/delete operations.
For permanent deletion, do not infer intent. Ask or require explicit wording such as "delete permanently".
When reporting to a user or parent agent:
--json output instead of scraping human-readable text.Read and inspect:
python3 scripts/qqmail.py folders
python3 scripts/qqmail.py inbox --limit 20
python3 scripts/qqmail.py inbox --unread --limit 20
python3 scripts/qqmail.py read --index 1
python3 scripts/qqmail.py search --from "sender@example.com"
python3 scripts/qqmail.py search --subject "keyword" --since "2026-06-01"
Send and reply:
python3 scripts/qqmail.py send --to "recipient@example.com" --subject "Hello" --body "Message" --dry-run
python3 scripts/qqmail.py send --to "recipient@example.com" --subject "Hello" --body "Message"
python3 scripts/qqmail.py reply --index 1 --body "Reply text" --dry-run
python3 scripts/qqmail.py reply --index 1 --body "Reply text"
Organize safely:
python3 scripts/qqmail.py plan-organize --limit 50 --json
python3 scripts/qqmail.py auto-organize --limit 100 --json
python3 scripts/qqmail.py mkdir "GitHub"
python3 scripts/qqmail.py archive --from "notifications@github.com" --target "GitHub" --dry-run
python3 scripts/qqmail.py mark-read --index 1 --dry-run
python3 scripts/qqmail.py mark-unread --from "sender@example.com" --dry-run
Delete is available but should be used only after explicit user confirmation:
python3 scripts/qqmail.py delete --index 1 --dry-run
python3 scripts/qqmail.py delete --index 1 --confirm-delete DELETE
Rule-based organization uses rules.agent.json by default. This default policy intentionally contains no rules, so packaged skill behavior never archives, marks, or moves mail based on public sample preferences. Agents should generate or select an explicit --rules /path/to/rules.json only after the user has approved the mailbox policy.
Use rules.schema.json as the machine-readable contract for generated policy files. The script also validates rules before planning or applying them.
Rules support matching by sender, subject, or inferred category, and actions such as:
archive: copy to a target folder, then remove from source.mark-read: add the Seen flag.mark-unread: remove the Seen flag.review: classify only, do not mutate.For personalized cleanup, write a private rules file outside the public skill repo and call:
python3 scripts/qqmail.py validate-rules --rules /path/to/rules.json --json
python3 scripts/qqmail.py auto-organize --rules /path/to/rules.json --limit 100 --json
python3 scripts/qqmail.py auto-organize --rules /path/to/rules.json --limit 100 --apply --json
Only run the --apply command after the user approves the exact action set from the dry-run JSON.
plan-organize before any mutation.--dry-run for manual archive, delete, and mark operations before applying.auto-organize is dry-run unless --apply is present.send --dry-run and reply --dry-run before externally visible messages unless the user already approved the exact content.delete refuses to run without --confirm-delete DELETE; still require explicit user approval first.delete unless the user explicitly asks for permanent deletion.