ClawHub
SkillsPluginsTemplatesDocsSupport
K
SkillsEmail Swipe

Email Swipe

EmailGuy42069@emailguy42069
Install in OpenClaw
Requires OpenClaw desktop app
Tinder-style email triage that trains AI on your preferences. On activation call get_skill_context (MCP) first — one UI (index.html), demo is sample mail onl...
Security check
Review
Version
0.1.0
Updated
Jul 22, 2026
License
MIT-0

Latest: v0.1.0

  • Initial release of email-swipe: a Tinder-style email triage skill that trains AI on user preferences.
  • Supports swiping actions: left (don't keep), right (keep), and double-tap (important) to help build agent training packs.
  • Runs a single UI (index.html via serve-ui.py); demo mode uses sample mail on the same UI.
  • Requires MCP integration with get_skill_context for activation, mail access check, and guided agent intake process.
  • Offers multiple training paths: bootstrap (from scratch), calibrate (import rules), refine (target weak spots), and import-sorting (no swiping, learn from folders).
  • Emphasizes backend-first operation: prioritize inbox analysis and rule-building over UI-driven workflow.
ProductivityOperationsAutomation
Full description

Tinder-style email triage that trains AI on your preferences. On activation call get_skill_context (MCP) first — one UI (index.html), demo is sample mail only. Swipe don't keep/keep, double-tap important, to build a token-efficient training pack for agent inbox review.

Email Swipe Skill

Primary goal: train an agent to sort an individual's inbox based on their needs. The swipe UI is a helpful training surface, not the product's purpose.

Fast paths: references/QUICKSTART.md · AGENTS.md

Before anything else (prevents common agent mistakes)

MCP connected? Call get_skill_context first — returns activation flow, UI entry point, git-status expectations, agent spine, and environment.json (verified mail access).

No MCP? Read AGENTS.md and references/agent-spine.md, or run python scripts/session-intake.py assess.

Remembering skill functionality

Do not memorize how to open the UI or run intake in host memory. Re-call get_skill_context each session.

Remember…How
Skill how-tosRehydrate from skill (get_skill_context)
Mail access that already works hereenvironment.json → emailAccessByAccount[accountId] via record_email_access
Account registry (unified inbox)Spine unifiedInbox.accounts via set_mail_accounts
Live UI URLruntime.json / serve-ui.py output

Agent spine (you own advanced settings)

Most advanced settings are dormant. Your spine is source of truth; disk/UI mirror it.

WhenMCP
Before opening UIupdate_settings (push spine → disk)
After UI / export / user saved settingsget_agent_spine (hydrate memory)
Before mail recommendationsRead activeSections + policy-graph / brief

Full protocol: references/agent-spine.md

MistakeTruth
"Should I use demo.html?"No. One UI only: index.html at the Desktop URL from serve-ui.py.
"Demo mode = different page?"No. Demo = sample mail (demo-emails.json), same UI.
"Uncommitted changes in repo?"Expected. Gitignored runtime files (emails.json, settings.json, …) — ignore them.
"Which port?"Dynamic. Use the Desktop URL printed by serve-ui.py or ~/.config/email-swipe/runtime.json.

On activation (required — do this first)

Ordered phases — do not skip:

  1. get_skill_context (MCP) or read AGENTS.md
  2. check_email_access + ask user about mail access (see email-access-gate.md); after a successful fetch call record_email_access (with accountId per mailbox when unified inbox)
  3. session_intake_assess → discovery → discover → recommend → user chooses → confirm
  4. Execute path runbook → train → post-training brief

Evaluator demo only: python scripts/session-intake.py demo → serve-ui.py (skips intake; sample mail only).

Real sessions — do not inject emails or start the UI until intake is confirmed and mail access is resolved (if user wants real inbox). Do not treat the UI as the default goal. Some users should go straight to import-sorting with no swiping at all.

Three paths

PathWhen to suggestWhat happens
bootstrapNo rules, first trainingSwipe 30–50 emails, learn from scratch
calibrateUser already has rulesImport rules → swipe only uncertain emails
refinePrior training + gapsShort session on weak areas
import-sortingInbox already sorted, prefers no UILearn rules from existing folders — no swiping

Path runbooks: references/paths/bootstrap.md, calibrate.md, refine.md, import-sorting.md

import-sorting is backend-only (no swipe UI). Offer it early as a first-class choice, especially when the user already sorts mail into folders. Always learn_from_folders with preview: true and review with the user before applying — folders can hold stale/lingering mail or outdated choices.

Advanced folder routing: Unlock in Advanced settings → references/paths/advanced-folders.md

Routes support three modes: AI rule (plain-English + agent judgment), Smart category (heuristics), Strict (exact keyword/domain/sender). Agent should set folderJudgments on inject for AI rules.

Advanced routes are persisted automatically to settings.json on every compile — remember them across sessions (don't re-ask). After compile they appear in platform-rules.json → folderRoutes[] (with howToBuild) and policy-graph.json → folderRoutingPolicies. Build them out as labels/folders in the user's email platform, inbox-preserving unless the user approves a skip-inbox filter.

Recommend based on prior knowledge (local artifacts + agent memory), then let the user override.

User experience (swipe UI)

GestureAction
← LeftDon't keep
→ RightKeep
Double-tapImportant

No setup required. Optional: Advanced settings (agent toggle, folder routing, rhythm).

After path is confirmed

  1. Set agent name → python scripts/setup-agent.py (or AGENT_NAME="YourAgent" python scripts/setup-agent.py)
  2. Build email batch for the selected path (see intake-router.md)
  3. python scripts/inject-emails.py /path/to/batch.json
  4. python scripts/serve-ui.py
  5. After session: preferences auto-save and auto-compile when using serve-ui.py
  6. Fetch assistant-brief.md via MCP or GET /api/policy-brief — present the brief to the user
  7. Enter recommendation mode — suggest only; no auto-label or archive

Collect job context and goals in chat during discovery, not in the UI settings form.

Email injection

Agent identity (first session)

bash
python scripts/setup-agent.py
# or: AGENT_NAME="YourAgent" python scripts/setup-agent.py
bash
python scripts/inject-emails.py /path/to/batch.json
python scripts/preflight.py
python scripts/serve-ui.py

Batch schema: metadata.sessionMode, emails[] with id, sender, from, subject, snippet, html (strongly preferred; fetch full sanitized HTML whenever available). Always include predictedAction + predictionConfidence on every email (bootstrap included) — guess even when unsure. Optional agentNote for edge cases.

After training (zero-download path)

When serve-ui.py is running, compilation happens automatically on session end.

DeliveryHow
MCP (preferred)python scripts/watch-preferences.py
Local APIGET /api/policy-brief, /api/training-pack, /api/policy-graph, /api/calibration
Files~/.config/email-swipe/assistant-brief.md, policy-graph.json, etc.
Export downloadLast resort only

MCP tools

Intake (before training): get_skill_context, check_email_access, record_email_access, session_intake_assess, session_intake_discover, session_intake_recommend, session_intake_confirm, get_intake_state, session_intake_demo

Training (after swiping or import-sorting): compile_training, get_policy_brief, get_policy_graph, get_calibration, get_training_pack, get_watch_rules, learn_from_folders, fetch_folder_snapshot

Settings (agent ↔ UI sync): get_agent_spine, update_settings, set_mail_accounts, get_session_status — see references/agent-spine.md

Manual fallback (serve-ui not used)

bash
python scripts/compile_training.py ~/.config/email-swipe/preferences.json --save-settings
# legacy import path:
python scripts/import-preferences.py ~/Downloads/preferences.json

Artifacts in ~/.config/email-swipe/

FileAgent use
intake.jsonDiscovery phase, recommended/confirmed path
assistant-brief.mdPresent to user after training
policy-graph.jsonStructured policies (default: recommend-only)
training-pack.jsonSlim runtime slice (v3)
calibration.jsonSession agreement + gaps
preferences.jsonRaw swipes (archive)
settings.jsonDisk mirror for UI — agent truth is spine (get_agent_spine / update_settings)

Learning architecture

text
Intake (discover → recommend → user confirms path)
    ↓
User swipes (queue depends on path)
    ↓
preferences.json → auto-compile
    ↓
assistant-brief.md + policy-graph.json
    ↓
Agent: read brief → confirm with user → recommendation mode

Runbooks

  • Quickstart: references/QUICKSTART.md
  • Intake: references/intake-router.md
  • Post-training: references/post-training-flow.md

Optional mail scripts

See scripts/advanced/README.md for fetch-emails-html.py, fetch-folders.py — not required for training.

Mail config (if fetching directly)

bash
python scripts/setup-config.py   # EMAIL_SWIPE_EMAIL, etc.

Privacy

  • UI never calls email APIs
  • preferences.json contains sender/subject snippets — treat as sensitive
  • Agents should use brief + training-pack at runtime, not full swipe history in prompts

Related skills

More in Productivity
ClawHub

Skills and plugins for OpenClaw agents. Part of the wider OpenClaw ecosystem.

Explore docs

SkillsPluginsTemplatesOfficialAudits

Publish SkillPublish PluginCreate org

OverviewOpenClawDocsBlog

SupportGitHubDiscord

Built alongside the OpenClaw ecosystem

LobsterCrabboxClickClackCrabfleetOctopoolClawSweeperagent-skillsdiscrawlgitcrawlslacrawlnotcrawltelecrawlgraincrawlcrawlkitcrawlbaracpxmcporterTachikomaclawpatchclawbenchPeekaboocookbookplugin-inspectorwacrawlcrabpotAll projectsLobsterCrabboxClickClackCrabfleetOctopoolClawSweeperagent-skillsdiscrawlgitcrawlslacrawlnotcrawltelecrawlgraincrawlcrawlkitcrawlbaracpxmcporterTachikomaclawpatchclawbenchPeekaboocookbookplugin-inspectorwacrawlcrabpotAll projects

© 2026 OpenClaw Foundation

Privacy policy·Status·Deployed on Vercel·Powered by Convex

....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals
  hooks runners slash-commands skill.md templates scanners review-bots     safe browse paths   official gateways   publisher handles   org trust   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@
openclaw ecosystem    crabbox clickclack crawler packs gateway plugins   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship
---- downloads installs stars lineage ownership docs package integrity   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@   :::: signed manifests ::::: moderated releases ::::: version history ::::
  safe browse paths   official gateways   publisher handles   org trust     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship     hooks runners slash-commands skill.md templates scanners review-bots
....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals
  hooks runners slash-commands skill.md templates scanners review-bots     safe browse paths   official gateways   publisher handles   org trust   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@
openclaw ecosystem    crabbox clickclack crawler packs gateway plugins   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship
---- downloads installs stars lineage ownership docs package integrity   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@   :::: signed manifests ::::: moderated releases ::::: version history ::::
  safe browse paths   official gateways   publisher handles   org trust     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship     hooks runners slash-commands skill.md templates scanners review-bots
....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals
  hooks runners slash-commands skill.md templates scanners review-bots     safe browse paths   official gateways   publisher handles   org trust   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@
openclaw ecosystem    crabbox clickclack crawler packs gateway plugins   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship
---- downloads installs stars lineage ownership docs package integrity   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@   :::: signed manifests ::::: moderated releases ::::: version history ::::
  safe browse paths   official gateways   publisher handles   org trust     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship     hooks runners slash-commands skill.md templates scanners review-bots
....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals
  hooks runners slash-commands skill.md templates scanners review-bots     safe browse paths   official gateways   publisher handles   org trust   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@
openclaw ecosystem    crabbox clickclack crawler packs gateway plugins   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship
---- downloads installs stars lineage ownership docs package integrity   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@   :::: signed manifests ::::: moderated releases ::::: version history ::::
  safe browse paths   official gateways   publisher handles   org trust     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship     hooks runners slash-commands skill.md templates scanners review-bots
....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals
  hooks runners slash-commands skill.md templates scanners review-bots     safe browse paths   official gateways   publisher handles   org trust   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@
openclaw ecosystem    crabbox clickclack crawler packs gateway plugins   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship
---- downloads installs stars lineage ownership docs package integrity   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@   :::: signed manifests ::::: moderated releases ::::: version history ::::
  safe browse paths   official gateways   publisher handles   org trust     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship     hooks runners slash-commands skill.md templates scanners review-bots
....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals