AnthonyGedeon04

Spam Agent — AI skill for Claude Code

AI community

AI-powered Gmail spam agent built with Python and LangChain.

How to install Spam Agent

This entry records only its repository, not the path inside it, so there is no exact command to give. Open AnthonyGedeon04/spam-agent and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Spam Agent does

AI-powered Gmail spam agent built with Python and LangChain. Sender rules plus Claude classify each email as keep, job alert, newsletter/promo, cold pitch or phishing, then label and archive junk through the Gmail API. Dry-run by default, never deletes mail, and runs on a schedule.

Alternatives in AI

  • Bot On Anything — A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) i 4.2k ★
  • Pingcrm — Personal Networking CRM — AI-powered, open-source, self-hostable 115 ★
  • Modular Context Obsidian Plugin — Modular Context Karpathy LLM Knowledge Base + Gmail & G-Cal — multi-account MCP server for Claude Code, encryp 96 ★

README

Gmail spam agent (LangChain + Claude)

![Python](https://img.shields.io/badge/Python-3.10%2B-3776AB?logo=python&logoColor=white) ![LangChain](https://img.shields.io/badge/LangChain-1.x-1C3C3C?logo=langchain&logoColor=white) ![Claude](https://img.shields.io/badge/Claude-Haiku%204.5-D97757?logo=anthropic&logoColor=white) ![Gmail API](https://img.shields.io/badge/Gmail%20API-v1-EA4335?logo=gmail&logoColor=white) ![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS-lightgrey) ![Tests](https://img.shields.io/badge/tests-pytest-0A9EDC?logo=pytest&logoColor=white)

This program reads your new Gmail inbox mail, decides what each email is, and tidies it up:

What the email is What happens to it
Something you want (people, recruiters, receipts, codes, tickets) Nothing, it stays in your inbox
Job alert Gets the jobs/internships label and stays in your inbox
Newsletter or promo Gets the spam-agent/promo label and is archived
Cold sales pitch Gets the spam-agent/cold-pitch label and is archived
Phishing Gets the spam-agent/phishing label and is archived

Nothing is ever deleted. Archived mail is still in Gmail under its label.

Follow the steps below in order. You only do steps 1 to 6 once.


Step 1. Make the folder on your computer

Create a folder called `spam-agent` somewhere easy to find, for example in your Documents folder. Download every file from this project's `spam-agent` folder into it, keeping the same sub-folders.

When you are done, the folder must look exactly like this:

spam-agent/
├── README.md              (this guide)
├── requirements.txt       (list of Python libraries to install)
├── .env.example           (template for your API key)
├── .gitignore
├── spam_agent/            (the program itself)
│   ├── __init__.py
│   ├── classifier.py      (the LangChain + Claude part)
│   ├── config.py          (sender lists and settings you can edit)
│   ├── gmail.py           (talks t