Gmail → Linear Exports
Fetch emails via the Gmail MCP, produce a privacy-safe digest with prioritized action points, confirm the target Linear team, then create one anonymized Linear issue per email/action point.
Prerequisites
- Gmail MCP connected and authenticated (
mcp__claude_ai_Gmail__*). - Linear MCP connected and authenticated (
mcp__linear__*). This project's.mcp.jsonalready defines thelinearserver; if its tools aren't loaded, tell the user to run/mcp→ authenticate in an interactive session and stop. - Both are remote OAuth servers — a non-interactive session cannot run the login flow.
Input
$ARGUMENTS (all optional) may narrow the scan:
- A date or range (default: today in the user's local timezone; use
currentDatefrom context if present). - A Gmail filter to append (e.g.
is:unread,label:...,category:primary). - A target Linear team name (skips the team question in Step 5).
Default with no arguments: today's inbox → the Testpawelhuryn-style default team after confirming.
Steps
1. Scan Gmail
Call mcp__claude_ai_Gmail__search_threads with:
query:after:YYYY/MM/DD before:YYYY/MM/DD in:inbox(upper bound is the day after the target day; append any$ARGUMENTSfilter).pageSize:50.
Only keep messages whose date falls in the target window. A returned thread may include older messages (e.g. an old SENT message in a reply thread) — ignore those for counting/export.
2. Read what needs action
For each thread that looks like it needs a decision or action, call mcp__claude_ai_Gmail__get_thread with messageFormat: FULL_CONTENT to read the real body (snippets truncate and hide the ask). Skip full fetches for obvious noise (newsletters, automated notifications) — snippet is enough to classify.
3. Anonymize (hard rule)
Never echo — in the summary or in Linear — any of:
- Sender/recipient names or email addresses.
- Company, product, or platform names that identify a party.
- Verbatim subject lines, or names appearing inside snippets/bodies.
Refer to parties generically: "a vendor's security team", "a cold outreach", "a paid-collaboration pitch". Describe subjects by topic, not literal text. Keep the actionable substance (what's being asked, the next step) — strip only the identifying details.
4. Summarize for the user first
Present a tight anonymized digest before writing anything to Linear:
- One short line per email/action point.
- Flag which items have a genuine next action vs. which are decline/ignore.
5. Confirm the Linear target
Call mcp__linear__list_teams.
- If
$ARGUMENTSnamed a team, use it. - If exactly one team exists, use it.
- If multiple exist and none was specified, ask the user which team (a cheap, non-obvious choice) before creating anything.
6. Export to Linear
Create one issue per email/action point with mcp__linear__save_issue:
team: the confirmed team.title: short, action-oriented, anonymized (e.g. "Resubmit security vulnerability report via bug-bounty platform").description: start withSource: inbox action point (anonymized)., then 1–2 sentences of anonymized context, then aNext step:line. Use literal newlines, not\n.priorityby urgency:1Urgent — time-critical, tied to a deadline today/tomorrow.2High — a real response is expected and matters.3Medium — a genuine next action, not time-critical.4Low — decline / archive / FYI, no action really required.
- Leave
stateat default (Backlog) unless the user asked otherwise.
Send independent save_issue calls in parallel in one message.
7. Report back
Show a compact table: issue identifier (linked to its url), priority, title. Note how many have a real next action. Offer to set states/due dates or move issues if wanted.
Notes
- Skip self-sent / automated mail for export unless it carries a real action.
- Re-runs: this creates fresh issues each run; if the user re-scans the same day, ask before duplicating, or mention that duplicates will be created.
- Keep the whole chat response tight — this skill's value is a clean digest plus a clean set of issues, not a wall of text.