# Inbox triage: setup prompt

Paste this whole file into Claude, once. It interviews you, writes a triage
skill personalized to your inbox, and sets it to run on a schedule. You do not
edit any configuration by hand.

---

You are going to set up a recurring inbox triage for me. Do not triage
anything yet. Work through the phases below in order, and stop for my answer
wherever it says to.

## What you are building

Two things, by the end:

1. **A skill file personalized to me**, written to my skills folder as
   `gmail-inbox-triage/SKILL.md`. Everything specific to me is baked into it:
   my labels and their IDs, my aliases, my teammates, my buckets, my rules.
   No placeholder text and no configuration for me to fill in.
2. **A scheduled task** that runs it on a cadence I choose.

The one rule that does not change: **my inbox should contain only threads
where someone is waiting on a reply or an action from me.** Everything else
gets one topic label and is archived. Nothing is ever deleted, because
archiving only removes the `INBOX` label and is fully reversible.

Everything about how that rule gets applied comes from my answers below.

## Phase 1. Check access

Confirm you have Gmail with modify access: read, add and remove labels, and
archive. Read-only is not enough. If it is missing, tell me exactly what to
reconnect and stop. Do not retry in a loop.

Check whether I have Google Calendar with read access, and tell me whether
you have it. It is optional.

## Phase 2. Read my inbox before asking me anything

Read a broad sample of my inbox in preview form, at least 100 threads if they
exist. Change nothing. Then tell me, in a short summary:

- The senders and domains that show up most.
- Which of it is a real person writing directly, and which is automated.
- Which threads already carry labels or stars, and what those look like they
  mean.
- Roughly how the mail splits: newsletters, alerts, invoices, scheduling,
  cold outbound, real conversation.

I want the questions in the next phase to be about my actual mail.

## Phase 3. Interview me

Ask these a few at a time, in plain language, not as one wall of questions.
Reference real senders you just saw so I can react to specifics.

1. What do I do, and who writes to me? Customers, vendors, investors,
   colleagues, anything that changes how a message should be read.
2. Which email addresses are mine? I may use more than one.
3. Who is on my team, and what do they do?
4. When I open my inbox, what do I most not want to miss?
5. What is in my inbox right now that should not be? Show me real examples.
6. Is there anything I always handle by hand? Senders, topics, or labels you
   must never touch.
7. Do I use labels or stars today, and what do they mean to me? If I have a
   system that works, build on it rather than replacing it.
8. How cautious should you be? Offer two settings: keep anything uncertain in
   my inbox, or file anything that is not clearly a request. Recommend the
   cautious one to start and say we can change it later.
9. Should you use my calendar? Explain what it buys before I answer.
10. What is worth interrupting me for, and what should wait for the summary?

If I do not know an answer, pick a sensible default, tell me why, and note it
as something to revisit in a week.

## Phase 4. Propose, then create the labels

From my answers and what you saw in Phase 2, propose:

- Two keep labels: one for a person waiting on a reply, one for an unresolved
  problem. Name them in my words.
- The buckets, derived from what is actually in my inbox rather than a
  standard list.
- The never-touch list.
- The caution setting.

Get an explicit yes from me. Then create any missing labels in Gmail, and
look up every label ID with a label listing call rather than guessing. Label
IDs are account specific, and label search does not work reliably with
renamed or emoji names, so match on a thread's `labelIds` field.

## Phase 5. Write my skill

Write `gmail-inbox-triage/SKILL.md` into my personal skills folder, with
frontmatter giving it a name and a description that will match requests like
"clean up my inbox" or "triage my email".

Bake my answers into it as plain statements. It should read as instructions
about my inbox, not as a template. It must contain:

**The order of checks.** For each thread, in order: if it carries a
never-touch label, leave it completely alone. If a real person wrote the
latest message asking me something, keep it and tag it with my reply label.
If there is an unresolved account, billing, security or compliance problem,
keep it and tag it with my review label, noting that expired one-time codes
and already-resolved notices do not count. If the calendar already handles
it, file it. Otherwise apply the single best-fit bucket and archive.

**How to pull mail.** Search the whole inbox every time, never a time window,
so a missed or failed run is self-healing. Collect every thread before making
changes so archiving does not shift pagination. Fetch the full thread before
keeping or reporting one, because previews truncate and can omit the newest
message.

**The calendar cross-check**, if I said yes: a scheduling request that now
has a matching event with that person on it is satisfied, so file it. An
invite that went to a different person than the one who asked gets flagged,
unless it is a known alias of mine. Raise an unanswered invitation only when
my attendance actually matters: I organized it, I am the only person from my
side, or an outside party expects me specifically. Check my response status
first. File past events and ones I already answered. Keep and flag a proposed
time that collides with something on my calendar. Calendar access is
read-only.

**The hard constraints**, stated as absolutes: never delete or trash
anything, never send an email, never create or edit a draft, never create or
answer a calendar event.

**The report format.** Under about 200 words. Counts archived and kept. For
each kept thread, sender, subject, and a short reason. Anything the calendar
surfaced. Anything you were unsure about. Any security or payment problem
named explicitly rather than folded into a count. Notify me only for the
things I named in question 10.

**A learned rules section**, empty for now, where corrections I make later get
written in my own words.

Show me the file before you save it.

## Phase 6. Dry run

Using the skill you just wrote, classify my entire inbox and change nothing.

Show me a short table: what you would keep and why, and counts per bucket for
what you would file. List separately anything you were unsure about.

I will correct it. Write every correction into the learned rules section of my
skill before anything runs for real. Do not archive anything until I say the
dry run looks right.

## Phase 7. Schedule it

Ask me how often and at what time. Daily in the morning is a good default.

Create a scheduled task that runs the triage using my skill. If you have a
scheduling tool available, use it. If you do not, tell me plainly that you
cannot schedule it yourself and give me the exact steps to set it up on my
side, including the wording to use so the task picks up my skill.

Whatever schedules it must search the whole inbox every time, with no date
bound. That is what makes a missed or failed run self-healing rather than
silently leaking mail.

## Phase 8. Tell me how to live with it

Finish with a short note covering:

- Where my skill file lives and how to edit it.
- How to pause or change the schedule.
- That correcting you is how it improves, and that corrections become rules.
- That the buckets will need adjusting for a week or two, then should settle.
- That nothing was deleted, and how to find anything you filed.
