The skill
What your agent reads. Also available to it as the get_skill tool, or download SKILL.md.
---
name: emailwars
description: Use when the user wants marketing email stopped for good — unsubscribing with proof, tracking who ignores opt-outs, and escalating with letters and complaints. Works with the EmailWars MCP tools.
---
# EmailWars
You help the user stop marketing email and hold companies to their opt-outs. EmailWars is the case file. You hold the mail access (Gmail, IMAP, whatever this user has connected). EmailWars never reads mail: you log what you see, with evidence, and it tells you what's due.
## The ladder
| Stage | When | What you do |
|---|---|---|
| 1. Their process | The user says stop this sender | `open_case`, unsubscribe their way, `log_unsubscribe` with evidence. A grace period starts (default 30 days). |
| 2. The law | A marketing email after the grace period | `draft_letter`, show it to the user, send it with their yes, `record_sent`. They have 14 days to confirm suppression. |
| 3. The regulator | Another email, a refusal, or no reply in 14 days | `draft_letter` (kind `ico`). The user files with the ICO (or you do, with their yes). `record_filed`. |
| 4. Beyond | It still continues | `draft_letter` kind `harassment` or `claim`. The user decides. |
EmailWars moves cases up by itself when a strike lands and the current stage's action is done. Missed deadlines count as strikes. You don't need to work stages out: read `next` on the case.
## Every time you look at the user's mail
1. For each marketing email, call `check_sender` with the from address, the user's address it was sent to, and the received date.
2. `verdict: strike` or `in_grace`: call `log_sighting` with the email as evidence (raw `.eml` if you can get it, otherwise the text with headers you have). **Log before you delete.** Once logged, the email can be binned: EmailWars keeps the copy.
3. `verdict: no_case`: if it's a sender the user has already told you to stop, open a case. If it's new, ask the user (see the review below). Don't open cases on your own judgement.
4. `verdict: before_optout`: unsubscribe and `log_unsubscribe`.
## Unsubscribing properly
In order of preference:
1. **One-click** (`List-Unsubscribe-Post: List-Unsubscribe=One-Click` header, RFC 8058): POST to the `List-Unsubscribe` https URL. Method `one_click`.
2. **mailto** in `List-Unsubscribe`: send the email it asks for. Method `mailto`. Sending needs the user's yes, like any email you send for them.
3. **The unsubscribe link** in the email body, in a browser. Screenshot the confirmation page. Method `web_form`.
4. **Account settings** if they make you log in. Method `account_settings`.
Evidence for `log_unsubscribe`: the email you unsubscribed from, plus the confirmation (screenshot, confirmation email, or the HTTP response).
**Never unsubscribe from spam or phishing** (senders you don't recognise, mismatched domains, anything asking for details). Clicking confirms the address is live. Mark it as spam instead. EmailWars is for real organisations ignoring real opt-outs.
## Evidence
Pass evidence as a list: `{ kind, text | base64, mime?, filename?, captured_at? }`.
- `kind`: `email`, `screenshot`, `confirmation`, `letter`, `reply`, `note`, `other`.
- Emails as `text` (raw source if you have it, mime `message/rfc822`). Screenshots as `base64` with `mime: image/png`.
- Each file is stored with a SHA-256 when it arrives, so the user can show it hasn't changed since.
## Letters
- `draft_letter` builds the letter from the record: dates, counts, the law, the asks, the evidence list. Show it to the user before sending. Don't rewrite the legal parts; fill in only what's in brackets.
- Stage 2 goes to the company's data protection or privacy contact. Find it in their privacy policy. Attach the evidence.
- **Nothing is sent without the user's yes** (or a standing approval they set up for this). Then `record_sent` with how and to whom.
- Every letter carries its own **record link** (`record_url`): the company opens the full record and evidence there. EmailWars notes when it's opened ("They opened the record"), and the ICO pack says whether it ever was. A plain link fetch is logged separately, because mail scanners fetch links on delivery. Leave the link in the letter. Anyone with the link can see that case's record, so it only goes in letters about that case.
- Replies: `log_reply` with the outcome. `confirmed` stops the clock. `refused` moves the case to stage 3.
- These are drafts from a record-keeping tool, not legal advice. Say so if the user asks whether something will work.
## Daily review with the user
Keep it short. In order:
1. `due()`: actions waiting (letters to approve, complaints to file). One line each. Ask yes or no.
2. New senders in the inbox since last time: for each, the user says **stop** (open a case and unsubscribe), **keep**, or **sort** (it goes to their own filing, not EmailWars).
3. Anything that moved a stage since last time.
Don't recite the whole docket. The user can see it at the EmailWars site.
## Case types
- `marketing_after_optout`: the normal case. Starts at stage 1.
- `data_misuse`: they had the user's address for something else (a landlord, a letting agent, a service provider) and used it for marketing. Starts at stage 2. Pass `context` to `draft_letter` describing why they have the address.
## Relationship
Set `relationship` on `open_case`: `customer`, `bought_once`, `never`, `unknown`. Buying something once does not mean agreeing to marketing forever, but it changes the wording of the letter.