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-language-detectgit clone https://github.com/VivekKarmarkar/claude-code-os.gitcp claude-code-os/SKILL.MD ~/.claude/skills/vivekkarmarkar-claude-code-os-skills-email-language-detect/SKILL.md---
name: email-language-detect
description: Detect the language of an incoming email and instruct replies to match. Called internally by the email and email-reply-all skills to ensure language-appropriate responses.
triggers:
- email language detect
- detect language
- match language
- language detect
---
# Email Language Detect — Auto-Match Reply Language
This skill detects the language of incoming email text and returns a language code + reply instruction. It's called INSIDE the email and email-reply-all skills, not directly by the user.
## How It Works
When composing a reply, run the detect script on the incoming email body:
```bash
python3 ~/.claude/skills/email-language-detect/scripts/detect.py "incoming email text here"
```
### Output
Returns a JSON object:
```json
{
"detected_language": "mr",
"language_name": "Marathi",
"confidence": "high",
"instruction": "Reply in Marathi. Use Romanized Marathi (Latin script) since the sender wrote in Romanized Marathi. Match the sender's register — if they're casual, be casual. If they use slang, you can use slang."
}
```
### Supported Languages
The script detects and provides reply instructions for:
- **en** — English (default, no special instruction)
- **hi** — Hindi (Romanized or Devanagari, matches sender's script)
- **mr** — Marathi (Romanized or Devanagari, matches sender's script)
- **mixed** — Hinglish/code-switching (reply in the same mixed style)
- **ta** — Tamil
- **te** — Telugu
- **bn** — Bengali
- **gu** — Gujarati
- **pa** — Punjabi
- **es** — Spanish
- **fr** — French
- **de** — German
- **pt** — Portuguese
- **ja** — Japanese
- **zh** — Chinese
- **ko** — Korean
- **ar** — Arabic
For unrecognized languages, defaults to English with a note.
## Integration with Email Skills
When the email or email-reply-all skill is composing a reply:
1. Get the incoming email body text
2. Run `detect.py` on it
3. Read the `instruction` field
4. Follow that instruction when composing the reply
5. Update thread-tracker with the detected language:
```bash
python3 ~/.claude/skills/thread-tracker/scripts/tracker.py set-language <thread-id> <detected_language>
```
## Script Logic
The detection uses keyword matching with weighted scoring — no external dependencies needed. It checks for:
- Script detection (Devanagari, Tamil, Telugu, etc.)
- Common words/particles in each language
- Romanized Indian language markers (postpositions, verb endings)
- Code-switching patterns (English mixed with Hindi/Marathi)