Free SKILL.md scraped from GitHub. Clone the repo or copy the file directly into your Claude Code skills directory.
npx versuz@latest install vivekkarmarkar-claude-code-os-skills-email-reply-allgit clone https://github.com/VivekKarmarkar/claude-code-os.gitcp claude-code-os/SKILL.MD ~/.claude/skills/vivekkarmarkar-claude-code-os-skills-email-reply-all/SKILL.md---
name: email-reply-all
description: One command to fetch all unreplied emails, detect language, compose context-aware replies, and send them. Combines unread + email + thread-tracker + email-language-detect into a single flow.
triggers:
- reply all
- reply to all
- respond to emails
- answer all emails
- email reply all
- reply-all
---
# Email Reply All — One Command, All Replies Sent
Fetch unreplied emails, detect language, compose replies, send them. Zero intermediate steps.
## Sender
Always: `vivekkmk.assistant@gmail.com`
## Workflow
### Step 1: Get unreplied messages
```bash
# Fetch unread messages
gws gmail users messages list --params '{"userId": "me", "q": "is:unread", "maxResults": 10}'
```
Then filter out already-replied messages using thread-tracker:
```bash
python3 ~/.claude/skills/thread-tracker/scripts/tracker.py filter-unreplied <id1> <id2> <id3> ...
```
If all messages are already replied to, say "All caught up — no unreplied emails." and stop.
### Step 2: Fetch full content of each unreplied message
For each unreplied message ID, fetch full content and decode:
```bash
gws gmail users messages get --params '{"userId": "me", "id": "<msg-id>", "format": "full"}'
```
Decode the base64 body from `payload.parts` (text/plain preferred).
Extract from headers:
- **From**: sender email
- **Subject**: subject line
- **Message-ID**: for In-Reply-To header
- **threadId**: for threading the reply
### Step 3: Detect language for each message
Run the language detector on each message body:
```bash
python3 ~/.claude/skills/email-language-detect/scripts/detect.py "decoded email body text"
```
Read the `instruction` field from the JSON output. Follow it when composing the reply.
Also check if the thread has existing language context:
```bash
python3 ~/.claude/skills/thread-tracker/scripts/tracker.py context <thread-id>
```
If the thread already has a language set, prefer that unless the new message clearly switched languages.
### Step 4: Compose and send replies
For each message, compose a reply following:
- The language instruction from Step 3
- The conversation context from the thread
- The email skill's writing guidelines (concise, match formality, no flowery language)
- The persona established in previous replies (check thread-tracker context)
**Do NOT show drafts. Do NOT ask for confirmation. Just send.**
```bash
RAW=$(python3 ~/.claude/skills/email/scripts/encode_email.py \
--from "vivekkmk.assistant@gmail.com" \
--to "<sender-email>" \
--subject "Re: <original-subject>" \
--body "<reply body>" \
--in-reply-to "<original-message-id>" \
--references "<original-message-id>") && \
gws gmail users messages send --params '{"userId": "me"}' --json "{\"raw\": \"$RAW\", \"threadId\": \"<thread-id>\"}"
```
### Step 5: Mark as replied in thread-tracker
After each successful send, mark the message:
```bash
python3 ~/.claude/skills/thread-tracker/scripts/tracker.py mark <message-id> <thread-id> "<subject>" "<sender-email>" --language <detected-lang>
```
### Step 6: Report
After all replies are sent, give a brief summary:
```
Replied to N emails:
- To: sender@email.com | Subject: Re: ... | Language: Marathi
- To: other@email.com | Subject: Re: ... | Language: English
```
## Notes
- Send replies in parallel when possible (independent threads)
- If a thread has multiple unreplied messages, only reply to the LATEST one (the others are intermediate)
- Group messages by thread first, then reply to the newest per thread
- Never reply to automated messages (delivery failures, newsletters, notifications)
- Never reply to messages FROM vivekkmk.assistant@gmail.com (our own sent messages)