Agent skill

Inbox Cleanup

by vellum-ai in vellum-ai/vellum-assistant

Run a high-recall, multi-pass email inbox cleanup. An agent skill from vellum-ai/vellum-assistant.

MITAuto-check passedProductivity & Automation

Install Inbox Cleanup

skills CLI
$ npx skills add vellum-ai/vellum-assistant --skill inbox-cleanup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vellum-ai/vellum-assistant inbox-cleanup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vellum-ai/vellum-assistant.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/inbox-cleanup .claude/skills/inbox-cleanup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
inbox-cleanup
GitHub stars
1.4k
Token cost
~3.9k tokens
SKILL.md length
1,793 words
Files
2 (incl. assets)
Skills in repo
108
Repo updated
First seen
Licence
MIT

At a glance

Run a high-recall, multi-pass email inbox cleanup. An agent skill from vellum-ai/vellum-assistant.

  • Works in 6 steps: Preference Capture → Urgency Triage (do this before any… → The Query Pipeline → …
  • Tasks that involve Email management
  • SKILL.md covers Phase 1: Preference Capture, Phase 2: Urgency Triage (do…, Phase 3: The Query Pipeline and Phase 4: Cold Outreach…, plus 5 more sections
  • Calls bun

What it does

Inbox Cleanup is an agent skill from vellum-ai/vellum-assistant. Run a high-recall, multi-pass email inbox cleanup. Pattern-based subject queries catch 25x more archivable email than sender scans alone. Includes urgency triage, classification signals, and post-cleanup filter setup.

Its SKILL.md is about 3.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including assets. Compatibility notes: Designed for Vellum personal assistants

It sits in Productivity & Automation, covering Email management. It works with Gmail. The repository describes itself as: An AI Assistant that’s easy to setup, does your work 24/7, knows your preferences and gets better over time. The licence is MIT.

When your agent uses it

  • Tasks that involve Email management

Example prompts

  • “/inbox-cleanup”

Requirements

  • Compatibility (from SKILL.md): Designed for Vellum personal assistants

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Preference Capture
  2. Urgency Triage (do this before any archiving)
  3. The Query Pipeline
  4. Cold Outreach Classification
  5. Post-Cleanup
  6. Permanent Filter Setup

What it can do on your machine

Read from SKILL.md and the folder at commit 33cc983. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bun

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Vellum personal assistants

    From compatibility in the SKILL.md frontmatter.

Context cost

Inbox Cleanup loads about 3.9k tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 1,793 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~3.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vellum-ai/vellum-assistant at commit 33cc983, republished under its MIT licence (© vellum-ai). 1,793 words, ~3,856 tokens.

Download SKILL.mdSave it as .claude/skills/inbox-cleanup/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
inbox-cleanup
description
Run a high-recall, multi-pass email inbox cleanup. Pattern-based subject queries catch 25x more archivable email than sender scans alone. Includes urgency triage, classification signals, and post-cleanup filter setup.
compatibility
Designed for Vellum personal assistants
metadata.icon
assets/icon.svg
metadata.emoji
📭

Inbox Cleanup Skill

A playbook for large-scale email inbox cleanup. The core insight: sender-based scans are low-recall. Subject/body pattern queries catch 25x more archivable email. This skill is a multi-pass pipeline built around that insight.

Works with any connected email provider. Adapt query syntax to whatever the provider supports — the strategy (what to search for, how to decide what to archive) is universal.

Gmail is a required integration. It's declared via includes: ["gmail"] in the frontmatter so it loads synchronously on activation, not lazily after the preferences form. Load/confirm the Gmail integration the moment this skill activates — before Phase 1 — so a missing or unauthorized connection surfaces up front rather than mid-cleanup.


Phase 1: Preference Capture

Do this before touching anything. Ask the user:

1. Aggressiveness level

  • Conservative — newsletters with unsubscribe headers + obvious spam only
  • Standard — above + cold outreach heuristics (subject patterns, unknown senders)
  • Aggressive — above + anything from senders with no prior thread history

2. Age threshold Archive everything older than X days? Common choices: 30 / 60 / 90 days. Or no age filter.

First-run scope: On first invocation, scope to last 30 days or top 3 noise patterns, whichever surfaces faster. Show result, offer to expand. Prove the approach on a fast, visible slice before draining the whole backlog.

3. VIP senders to protect Ask: "Are there any senders that might look like cold outreach but you actually care about? Think: specific individuals at investors, advisors, your lawyer, accountant, recruiters you're actively working with."

Build an explicit keep list. Do not archive anything matching it, ever, regardless of aggressiveness.

4. Categories to confirm before archiving These need a sample + explicit approval before bulk action:

  • Financial/billing alerts
  • Legal/contracts
  • Account suspension notices
  • Government/regulatory

Phase 2: Urgency Triage (do this before any archiving)

Scan the inbox first for high-stakes items that should be surfaced, not archived. Look for:

SignalWhy it matters
"past due", "overdue", "final notice", "balance due"Outstanding invoice — financial consequence
"will be suspended", "account suspension", "service interruption"Service shutoff — operational consequence
"collections", "case #", "recovery" in sender domainCollections agency — credit/legal consequence
"signature required", "agreement", "DocuSign pending"Legal action needed
Government TLDs (.gov), "IRS", "state of", "department of"Regulatory — can't be skipped

Surface these to the user before running the cleanup. They're easy to miss buried in a big inbox.


Phase 3: The Query Pipeline

Run these passes in order. Each pass should paginate to exhaustion (keep fetching while more results exist). After each pass, show the user a count + 5 sample subjects before archiving anything.

Pass 1: Age-based bulk (biggest catch)

Search for all inbox messages older than the user's age threshold (e.g. 30 days). Typically 50–80% of the archivable backlog. Always show a sample before bulk archiving.

Note on result caps: Some providers cap query results (e.g. ~5,000). If a query returns exactly at the cap, archive that batch and re-run the same query — the next batch will surface. Repeat until it returns fewer than the cap.

Pass 2: Personalized cold outreach (subject patterns)

Ask the user for their first name and company name, then search for subject lines containing patterns like:

  • [FirstName] -, [FirstName],, for [FirstName], hi [FirstName], hey [FirstName], [FirstName] |
  • [CompanyName] -, [CompanyName]?, for [CompanyName], re: [CompanyName], [CompanyName] AI

These are the highest-recall patterns for cold outreach and partnership spam. A startup founder's inbox will see the biggest wins here.

Pass 3: Generic cold outreach phrases

Search for subject lines containing:

  • "quick question", "quick note", "checking in"
  • "following up", "just following up", "circling back"
  • "would love to connect", "15 minutes", "quick call"
  • "intro call", "reaching out", "came across your"
  • "are you the right person", "happy to hop on"
Pass 4: No-reply & newsletters

Search for:

  • Messages from noreply/no-reply/donotreply sender addresses
  • Subject lines containing "unsubscribe", "newsletter", "weekly digest", "monthly digest"
Pass 5: Calendar noise

Search for subject lines containing:

  • "accepted:", "declined:", "tentative:"
  • "has accepted", "has declined", "invitation:"

Calendar response confirmations are pure noise. Safe to bulk archive without review.

Pass 6: Transactional/receipts

Search for subject lines containing:

  • "your order", "order confirmation", "your receipt"
  • "shipment", "has shipped", "delivered"

Cross-check against urgency triage first — filter out any "past due" or "final notice" items before archiving this batch.

Pass 7: Sketchy TLDs

Search for messages from sender domains ending in .shop, .biz, .xyz, .info, .club, .online.

Disproportionately spam. Safe to bulk archive.

Pass 8: High-volume repeat senders

After the above passes, run a sender frequency count on what remains. Any sender with 3+ emails not on the keep list is a candidate for bulk archive. Show grouped list to user for approval.


Phase 4: Cold Outreach Classification

For emails not caught by pattern queries, use LLM-based classification in Standard/Aggressive mode. Flag as cold outreach if 3+ signals are present:

  • Sender domain not in user's contact/thread history
  • No prior reply from user to this sender
  • Subject contains user's name + company together (personalization ≠ trust)
  • Body contains: "came across your company", "I help companies like", "reaching out because", "15 minutes", "quick call", "are you the right person"
  • Sender domain is a known outreach tool: apollo.io, outreach.io, lemlist.com, instantly.ai, salesloft.com
  • Email is not a reply (no Re: prefix, no quoted text from user in body)

Dry-Run Defaults

Every bulk archive previews before it executes — regardless of batch size or trust stage. Run the pipeline with --dry-run on all archive calls, then render a ui_show table preview the user commits or refines from. Never archive in bulk straight from a query.

The preview table must show:

  1. Total emails matching — the full count this bulk archive would touch
  2. Top-10 sender breakdown — senders by volume, so the user spots anything they care about
  3. 10–20 sample subjects — a representative spread, not just the first few
  4. Categories flagged for confirm-before-archive — the Phase 1 categories (financial/billing, legal/contracts, account suspension, government/regulatory) that matched, called out for explicit approval

Surface "things worth flagging before you confirm" inside the preview, not after. If the dry-run catches claim documents, failed-payment notices, or any urgency-triage signal (Phase 2), call them out in the preview so the user sees them while deciding — never let a flag-worthy item get archived first and surfaced afterward.

After rendering the preview:

  1. Ask the user to confirm or refine: "This would archive X,XXX emails across Y passes. Commit, or refine the scope?"
  2. If confirmed, commit via bun run scripts/gmail-commit.ts commit --run-id "<run-id>"
  3. If rejected, cancel via bun run scripts/gmail-commit.ts cancel --run-id "<run-id>"

Larger batches (e.g. >1,000 operations) and lower trust stages (stage 0 flag-only) warrant extra scrutiny in the preview, but the preview itself is always required before any bulk archive — including small batches and high trust stages. Direct archives are still logged for audit/reversal.


Show full SKILL.md (696 more words)Show less

Error Recovery & Resume

Archive operations are logged to an operation log for resumability. If a pass fails mid-run (rate limit, daily quota, OAuth expiry, crash):

  1. Check for interrupted runs before starting a new cleanup: bun run scripts/gmail-runs.ts list. If a recent run shows status: "interrupted", offer to resume it.
  2. Resume: bun run scripts/gmail-archive.ts archive --resume "<run-id>". This skips already-committed chunks and retries pending ones.
  3. Daily quota (403): The archive script detects daily quota exhaustion and writes an interrupted log entry with a resume hint. Do not retry until after midnight PT — offer to resume the run later.
  4. Rate limit (429): Handled automatically with exponential backoff (up to 5 retries for batch operations). No user intervention needed.

All archive outputs now include a run_id. Pass --run-id to group multiple passes under one run, and --phase to label the pipeline phase (e.g. --phase "noise_archive").


Phase 5: Post-Cleanup

  1. Report totals — how many archived per pass, which categories, and the run_id for each pass
  2. Update blocklist — remember which senders/domains were archived; use for faster future passes
  3. Surface any urgents found — if financial/legal/suspension items surfaced during the pass, present them now with recommended actions
  4. Mention reversal — remind the user: "If any of these archives were wrong, I can reverse specific threads: bun run scripts/gmail-reverse.ts --run-id <id> --thread <message-id>"

Phase 6: Permanent Filter Setup

After cleanup, propose Gmail filters so the same categories don't re-accumulate. This bridges cleanup (drain backlog once) and inbox-management (keep inbox clean on schedule).

Note: Filter creation capabilities vary by provider. The gmail-auto-filters.ts script handles Gmail. If the provider doesn't support programmatic filter creation, give the user manual instructions instead.

Filters are permanent behavior changes. Unlike a one-time archive, a filter silently skips the inbox for every future matching email. A wrong filter means the user misses emails they were expecting — with no indication anything happened. Always confirm with the user before creating filters.

Which patterns are safe as permanent filters

One-time bulk archiving and permanent auto-archiving are different risk levels. The auto-filter script only derives candidates from patterns marked "Yes" below:

PatternSafe as permanent filter?Notes
noreply / no-reply / donotreply sendersYesAutomated senders, never personal
Calendar responses (accepted/declined in subject)YesPure noise
Specific spam domains identified during cleanupYesDomain-level, not pattern-level
Sketchy TLDs (.shop, .biz, .xyz, .info)YesHigh spam signal, low false positive risk
Known newsletter senders confirmed during cleanupYesUser just explicitly confirmed unwanted
Generic phrases ("quick question", "checking in")RiskyReal colleagues use these — don't filter
Name/company subject patterns ("for [Name]", "[Company] -")NoToo broad — will catch real emails
Age-basedNoNot generally supported as a filter condition
Running auto-filter generation

After the cleanup pipeline completes (Phase 5 post-cleanup report), invoke:

bash
# Preview: show what filters would be created (no confirmation prompt)
bun run scripts/gmail-auto-filters.ts preview --run-id "<cleanup-run-id>"

# Generate: show plan, confirm with user, then create
bun run scripts/gmail-auto-filters.ts generate --run-id "<cleanup-run-id>"

If --run-id is omitted, the script finds the most recent completed cleanup run automatically.

The script:

  1. Reads the cleanup run's op-log to extract archived patterns
  2. Derives filter candidates from safe categories only
  3. Fetches existing Gmail filters and skips duplicates
  4. Shows the user a confirmation dialog listing every filter that will be created, its criteria, and its label — the user must explicitly approve before any filter is created
  5. Creates one filter per logical category with an auto/* label (e.g. auto/no-reply, auto/calendar, auto/newsletter, auto/sketchy-tld)
  6. Logs all filter creations to the op-log for audit and reversal
Label strategy

Every auto-filter applies an auto/* label instead of silently archiving. This gives the user an audit trail — search label:auto/calendar to see what was caught. Labels are created automatically if they don't exist.

After filter creation

Tell the user:

  • How many filters were created and what each covers
  • How to find auto-archived emails (search by label, e.g. label:auto/no-reply)
  • How to remove a filter: bun run scripts/gmail-manage.ts filters --action delete --filter-id "<id>"

Reference: Proven Catch Rates

From a single cleanup session on a startup founder's inbox (April 2026):

PassApprox. catch
Older than 30 days~7,200
Name-personalized subject patterns~35,000
Company-name subject patterns~50,000
Sketchy TLDs (.shop/.biz/.xyz)~3,741
Newsletters/digests~1,014
Calendar responses~142
Generic cold outreach phrases~23
Completed DocuSigns~34

Total: ~90,000+ emails in one session. The name/company pattern passes alone accounted for ~85k. This is why patterns dominate sender scans.

© vellum-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (assets) in skills/inbox-cleanup of vellum-ai/vellum-assistant.

  • SKILL.md
  • assets/icon.svg

Open the folder on GitHubat commit 33cc983

Compare with similar skills

Inbox Cleanup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Inbox Cleanup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Inbox Cleanup this skillvellum-ai/vellum-assistant1.4k—~3.9kAutomated safety check: PassMIT
Career-Ops Gmail Lead Plugincareer-ops-hq/career-ops74k—~233Automated safety check: NotesMIT
Gmailteam-attention/plugins-for-claude-natives827—~967Automated safety check: PassMIT
Connect Apps with ComposioComposioHQ/awesome-claude-skills77k3 repos~557Automated safety check: PassNone
Gmail Emailopen-gitagent/gitagent714—~235Automated safety check: NotesMIT
Google Workspaceyc-software/qm15k—~1.8kAutomated safety check: PassMIT

Similar skills

  • Career-Ops Gmail Lead Plugin

    career-ops-hq/career-ops

    Pulls job leads from a Gmail label into the career-ops pipeline, extracting job URLs from DMARC-passing emails and de-duplicating against existing leads.

    74k GitHub stars~233 tokensUpdated today
    Productivity & AutomationAuto-check: notes
  • Gmail

    team-attention/plugins-for-claude-natives

    This skill should be used when the user asks to "check email", "read emails", "send email", "reply to email", "search inbox", or manages Gmail.

    827 GitHub stars~967 tokensUpdated 5 mo ago
    Productivity & AutomationAuto-check passed
  • Connect Apps with Composio

    ComposioHQ/awesome-claude-skills

    Connects an agent to 1000+ external apps through the Composio Tool Router plugin, so it can actually send emails, create issues and post messages instead of only drafting them.

    77k GitHub starsUsed in 3 repos~557 tokens
    Productivity & AutomationAuto-check passed
  • Gmail Email

    open-gitagent/gitagent

    Send emails via Gmail SMTP using App Password authentication.

    714 GitHub stars~235 tokensUpdated 2 days ago
    Productivity & AutomationAuto-check: notes
  • Google Workspace

    yc-software/qm

    Read and act on the user's Gmail, Google Calendar, and Google Tasks through per-user OAuth.

    15k GitHub stars~1.8k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Gmcli

    badlogic/pi-skills

    Gmail CLI for searching emails, reading threads, sending messages, managing drafts, and handling labels/attachments.

    2.6k GitHub stars~470 tokensUpdated 4 mo ago
    Productivity & AutomationAuto-check passed

More from vellum-ai/vellum-assistant

All 108 skills in this repo
  • Vellum GitHub App Setup

    vellum-ai/vellum-assistant

    Create and configure a GitHub App so the assistant can push commits, open PRs, and comment under its own bot identity.

    1.4k GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed
  • Discord App Setup

    vellum-ai/vellum-assistant

    Connect a Discord bot to the assistant via the Discord Gateway with guided application creation and intent configuration

    1.4k GitHub stars~4.2k tokensUpdated yesterday
    Auto-check passed
  • Sentry App Setup

    vellum-ai/vellum-assistant

    Create and configure a Sentry internal integration so the assistant can manage issues, alerts, and releases under its own identity

    1.4k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Memory Corpus Ingest

    vellum-ai/vellum-assistant

    Ingest a large dataset into memory as a skimmed map. An agent skill from vellum-ai/vellum-assistant.

    1.4k GitHub stars~3k tokensUpdated yesterday
    Auto-check: notes
  • Plugin Builder

    vellum-ai/vellum-assistant

    A skill your agent uses when the user wants to build, scaffold, ship, or edit a Vellum plugin that bundles multiple surfaces (hooks, tools, skills, and more) into one installable package.

    1.4k GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed
  • Slack App Setup

    vellum-ai/vellum-assistant

    Connect a Slack app to the Vellum Assistant via Socket Mode.

    1.4k GitHub stars~2.5k tokensUpdated yesterday
    Auto-check: warnings

Works with

Questions about Inbox Cleanup

What does Inbox Cleanup do?

Run a high-recall, multi-pass email inbox cleanup. An agent skill from vellum-ai/vellum-assistant. Inbox Cleanup is an agent skill from vellum-ai/vellum-assistant. Run a high-recall, multi-pass email inbox cleanup.

When should I use Inbox Cleanup?

Inbox Cleanup fits situations like: tasks that involve Email management.

How do I install Inbox Cleanup in Claude Code?

Run `npx skills add vellum-ai/vellum-assistant --skill inbox-cleanup -a claude-code`. Or copy the skill folder (skills/inbox-cleanup in vellum-ai/vellum-assistant) into .claude/skills/inbox-cleanup in your project. Claude Code loads it when a task matches its description.

How do I install Inbox Cleanup in Codex?

Run `npx skills add vellum-ai/vellum-assistant --skill inbox-cleanup -a codex`. Or copy the skill folder (skills/inbox-cleanup in vellum-ai/vellum-assistant) into .agents/skills/inbox-cleanup in your project. Codex loads it when a task matches its description.

Can I use Inbox Cleanup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vellum-ai/vellum-assistant --skill inbox-cleanup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/inbox-cleanup, .gemini/skills/inbox-cleanup, .github/skills/inbox-cleanup and .opencode/skills/inbox-cleanup in your project.

What does Inbox Cleanup need to run?

Going by SKILL.md and its folder, Inbox Cleanup needs the command-line tools its instructions call (bun). Compatibility (from SKILL.md): Designed for Vellum personal assistants.

Does Inbox Cleanup access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Inbox Cleanup safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Inbox Cleanup use?

Inbox Cleanup is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Inbox Cleanup use?

About 3.9k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Inbox Cleanup?

Skills that share tags, products or a category with Inbox Cleanup: Career-Ops Gmail Lead Plugin (career-ops-hq/career-ops, 74k stars), Gmail (team-attention/plugins-for-claude-natives, 827 stars), Connect Apps with Composio (ComposioHQ/awesome-claude-skills, 77k stars) and Gmail Email (open-gitagent/gitagent, 714 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Inbox Cleanup?

vellum-ai (a GitHub organization) maintains it in vellum-ai/vellum-assistant, which has 1,408 GitHub stars. The repository holds 108 skills in this directory. The repository was last updated on October 9, 2026.

Source: vellum-ai/vellum-assistant on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.