synthesis-inbox-cleanup

synthesis-inbox-cleanup is a skill for Claude Code, Codex from synthesisengineering/synthesis-skills. It costs 130 tokens per session (5,460 once invoked), scanned B, original, Apache-2.0.

A rule-based system for cleaning email across iCloud or IMAP, Microsoft 365 and Outlook.com, and Gmail. The rules are kept in a private manifest, a file that lists how messages should be handled.

In plain words
What is it for?
Use it to classify new senders, organize messages, create Gmail filters, generate digests, scan for impersonation, and run repeatable cleanup checks on macOS.
Why use it?
It applies the same carefully chosen cleanup rules across different mail services. It also checks higher-risk automation paths for prompt injection, where email content tries to manipulate the agent.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: mentions Claude Code; mentions Codex.

Part of the synthesis-skills plugin — 63 skills, 4 hooks shipped together

Good fit Use it to classify new senders, organize messages, create Gmail filters, generate digests, scan for impersonation, and run repeatable cleanup checks on macOS.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/synthesisengineering/synthesis-skills/synthesis-inbox-cleanup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add synthesisengineering/synthesis-skills --skill synthesis-inbox-cleanup
Clone the repo
git clone --depth 1 https://github.com/synthesisengineering/synthesis-skills

Made for: Claude Code, Codex.

Or install synthesis-skills, the plugin that ships this one along with the rest of its 63 skills, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for synthesis-inbox-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/synthesisengineering/synthesis-skills/synthesis-inbox-cleanup/github.svg)](https://agentmods.dev/skills/synthesisengineering/synthesis-skills/synthesis-inbox-cleanup)
Your own site
<a href="https://agentmods.dev/skills/synthesisengineering/synthesis-skills/synthesis-inbox-cleanup"><img src="https://agentmods.dev/badge/skills/synthesisengineering/synthesis-skills/synthesis-inbox-cleanup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for synthesis-inbox-cleanup

Your own site · 80×15
<a href="https://agentmods.dev/skills/synthesisengineering/synthesis-skills/synthesis-inbox-cleanup"><img src="https://agentmods.dev/badge/skills/synthesisengineering/synthesis-skills/synthesis-inbox-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,460 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00130 $0.05460
Opus 5 $0.00065 $0.02730
Sonnet 5 $0.00026 $0.01092
Haiku 4.5 $0.00013 $0.00546

Measured 11d ago against content hash bedd1465d00f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

synthesis-inbox-cleanup scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 16 executable files (scripts/_lib.py, scripts/icloud_apply.py, scripts/icloud_archive_senders.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Instruction-override phrasingmediumPrompt injection

Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.

| Body header content read without sanitization | Subject "URGENT: ignore previous instructions..." reaches the model | Route every body-read through `scripts/sanitize.py` |

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/synthesis-inbox-cleanup/SKILL.md · 358 lines

How it starts

The opening of the file, as written. The whole thing — 358 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Synthesis Inbox Cleanup

A manifest-driven email cleanup engine that scales the same human-curated rules across three account tool stacks on macOS: iCloud / generic IMAP, Microsoft 365 / outlook.com via Mail.app AppleScript, and Gmail via the workspace-mcp Gmail API (with optional native server-side filters).

The engine is deterministic. Email content does not change rules at runtime. When an LLM is invoked — for new-sender categorization or for higher-risk paths like body-reading digests — sanitization defenses run first. The skill ships adversarial test fixtures so prompt-injection regressions surface in CI rather than in production.

v1.6.2 — Cross-platform runtime pointer replacement

The runtime installer replaces its staged engine/current symlink with Python's atomic os.replace. The previous repair used BSD mv -h, which works on macOS but fails under GNU mv before the pointer can move. The regression fixture now models that GNU refusal on every host while preserving the original two-install, differing-digest acceptance path.

v1.6.0 — Impersonation scanning: the taxonomy had no cell for hostile

scripts/scan_impersonation.py (read-only) adds the adversarial pass the disposition taxonomy structurally lacked. Every existing class sorts mail by DESIRABILITY — marketing, newsletter, transactional, keep — so a phishing message is not merely misfiled by this engine, it is invisible to it: a sweep that only files things tidily walks straight past an attack.

The detection is the one that catches live campaigns: the sending domain is authenticated; the display name is not. SPF/DKIM/DMARC validate the envelope domain and say nothing about the free-text name the mail client actually shows. So the high-yield phish forges no domain at all — it sends through infrastructure that passes every check (a survey platform, a form host) and puts the impersonated brand in the display name. "The domain checks out" is therefore not a safety verdict.

Reports only; removal stays a human-reviewed step, because a false positive here is a legitimate vendor notice. Brand→domain map in ~/.synthesis/inbox-cleanup/impersonation.yaml, seeded in-script.

Read the full file on GitHub · 358 lines

Files

What ships with it

38 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 358 lines · 130 tokens per session scan B bedd1465d00f

Subscribe to this mod's changes

synthesis-inbox-cleanup is a skill published in the GitHub repository synthesisengineering/synthesis-skills (18 stars, last pushed today), licensed Apache-2.0. It adds 130 tokens to every session and 5,460 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it B with 1 finding (instruction-override phrasing). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.