Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add khalilbenaz/claude-skills-collection --skill email-agent-buildergit clone --depth 1 https://github.com/khalilbenaz/claude-skills-collectionWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/email-agent-builder)<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/email-agent-builder"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/email-agent-builder/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/email-agent-builder"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/email-agent-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00065 | $0.02532 |
| Opus 5 | $0.00032 | $0.01266 |
| Sonnet 5 | $0.00013 | $0.00506 |
| Haiku 4.5 | $0.00006 | $0.00253 |
Grade A, and why
email-agent-builder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 266 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Email Agent Builder
Critères de décision — Quelle source connecter ?
| Cas | Solution |
|---|---|
| Microsoft 365 / Exchange Online | Microsoft Graph API + OAuth2 (Delegated ou App-only) |
| Gmail / Google Workspace | Gmail API + OAuth2 (Service Account pour full-auto) |
| IMAP générique (hébergement, Outlook on-premise) | IMAP4 + STARTTLS, polling toutes les N secondes |
| Temps réel critique (SLA < 30 s) | Graph webhooks (changeNotifications) ou Gmail push (Pub/Sub) |
| Volume > 10 000 emails/jour | Kafka topic + consumer group pour paralléliser |
Workflow en étapes
1. Connexion et authentification
# Microsoft Graph — App-only (sans interaction utilisateur)
from msal import ConfidentialClientApplication
app = ConfidentialClientApplication(
client_id=CLIENT_ID,
client_credential=CLIENT_SECRET,
authority=f"https://login.microsoftonline.com/{TENANT_ID}"
)
token = app.acquire_token_for_client(scopes=["https://graph.microsoft.com/.default"])
# Stocker token["access_token"] dans un vault (Azure Key Vault, HashiCorp Vault)
# Ne jamais logger ce token, ne jamais le committer
# Gmail — Service Account
from google.oauth2 import service_account
from googleapiclient.discovery import build
creds = service_account.Credentials.from_service_account_file(
"sa.json",
scopes=["https://www.googleapis.com/auth/gmail.modify"]
).with_subject("[email protected]")
service = build("gmail", "v1", credentials=creds)
Checklist connexion :
- Refresh token stocké en vault, jamais en
.envcommitté - Scopes minimaux (lecture seule si l'agent ne répond pas)
- Webhook/subscription renouvelé avant expiration (Graph : 60 min max)
2. Parser et normaliser les emails
import email
from email import policy
def parse_raw(raw_bytes: bytes) -> dict:
msg = email.message_from_bytes(raw_bytes, policy=policy.default)
body_plain = ""
body_html = ""
attachments = []
for part in msg.walk():
ct = part.get_content_type()
if ct == "text/plain" and not body_plain:
body_plain = part.get_content()
elif ct == "text/html" and not body_html:
body_html = part.get_content()
elif part.get_filename():
attachments.append({
"filename": part.get_filename(),
"content_type": ct,
"size": len(part.get_payload(decode=True) or b""),
})
return {
"message_id": msg["Message-ID"],
"from": msg["From"],
"to": msg.get_all("To", []),
"subject": msg["Subject"],
"date": msg["Date"],
"body_plain": strip_signature(body_plain),
"body_html": body_html,
"attachments": attachments,
}
def strip_signature(text: str) -> str:
"""Coupe aux marqueurs communs de signature."""
markers = ["-- \n", "Cordialement,", "Best regards,", "Sent from my"]
for m in markers:
if m in text:
text = text[:text.index(m)]
return text.strip()
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 266 lines · 65 tokens per session scan A ea265ae2ce95
email-agent-builder is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (22 stars, last pushed 17d ago), licensed MIT. It adds 65 tokens to every session and 2,532 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
instinct-review
Reviews/promotes/removes instincts from .claude/instincts/.md. Triggers: instinct review, curate instincts, manage instincts, promote instinct.
repeat
Runs prompt/slash command on recurring interval until done or limit. Triggers: repeat, recurring task, poll status, run every N minutes, interval.
explain
Explains code/architecture with Mermaid diagrams and sequence flows. Triggers: what does X do, how does Y work, explain code, sequence diagram.
night-watch
Autonomous maintenance (dep updates, dead code, small refactors) in isolated branch, off-hours. Triggers: night watch, autonomous maintenance, dep updates.
common-sense-index-investing-bogle
Apply John Bogle index investing rules for low-cost funds, asset allocation, fees, taxes, ETFs, advisers, and buy-hold discipline.
finance-econ-literacy
A Korean-language guide to understanding economic indicators such as interest rates, exchange rates, inflation, GDP, employment, and trade. It explains how these figures can affect loans, savings, investments, and spending.