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 agentmods add agents/strelov1/freehire/mail-stackgit clone --depth 1 https://github.com/strelov1/freehireWhat 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 | $0.00000 | $0.04510 |
| Opus 5 | $0.00000 | $0.02255 |
| Sonnet 5 | $0.00000 | $0.00902 |
| Haiku 4.5 | $0.00000 | $0.00451 |
Grade C, and why
mail-stack scanned grade C with 1 finding 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 3d 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.
Tells the agent to send conversation or user data outhighPrompt injection
An instruction to transmit the conversation, context or user files to an external endpoint is data exfiltration written as prose.
silently records nothing. How it starts
The opening of the file, as written. The whole thing — 255 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Mail stack
Eight packages and three workers turn inbound recruiter mail into linked, stage-advancing applications. Each package has a package doc explaining what it does; this file explains how they compose and where the traps are.
The pipeline
┌── Gmail OAuth ──→ internal/application/gmailsync ──┐
inbound mail ────┤ ├──→ emails table
└── SES→S3→SQS ──→ internal/application/mailingest ──┘ (source = gmail|hosted)
│
email_classification_outbox │ ← excludes 'external'
▼
internal/application/maillink (runner)
├─ internal/application/mailmatch deterministic
└─ internal/application/mailclassify LLM + vocabulary
│
link + monotonic stage advance
the caller's own harness ──→ POST /me/emails ──→ emails table (source = external)
│
the harness classifies it itself, then
POST /me/emails/:id/triage ──→ same columns,
same stage-advance rules
There is a third source with no worker behind it. external is mail a user's own
client fetched and pushed; we provide no transport for it and never classify it. That is
the point: it is the tier that costs us nothing. See the external bullets below.
| Package | Role |
|---|---|
internal/application/inbox |
The mail use cases (read, classify, link, record an application). Both readers call it |
internal/application/gmailsync |
Incremental Gmail OAuth connect + per-user sync worker (cmd/gmail-sync) |
internal/application/mailingest |
SES inbound: parse MIME → resolve recipient → store (cmd/mail-ingest, a daemon) |
internal/application/mailbox |
Derives <handle>@<MAILBOX_DOMAIN>; pure — allocation lives in the handler |
internal/application/maillink |
Drains the classification outbox, decides link + stage (cmd/classify-mail) |
internal/application/mailmatch |
Deterministic match: thread continuity, company name in sender/subject |
internal/application/mailclassify |
Status vocabulary, sanitizer, LLM adapter |
internal/application/mailrecall |
Pull direction: one Gmail search scoped to an employer, proposals only — never stored, never linked |
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.
- 3d ago First seen · 255 lines · 0 tokens per session scan C 6818126d5d4b
mail-stack is an agent published in the GitHub repository strelov1/freehire (533 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,510 tokens. A static security scan graded it C with 1 finding (tells the agent to send conversation or user data out). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
jobseek-labeller-extract-benefits
Extract structured fields from the benefits section — salary, equity, remote policy, visa sponsorship, annual leave, parental leave, learning budget, perks. Invoked once per posting that has a benefits section.
jobseek-labeller-extract-globals
Derive cross-section labels — profession (English), seniority (English free-text), employment type, locales, locations. Invoked once per posting after all per-section extractors have run.
jobseek-labeller-extract-requirements
Extract structured fields from the requirements section — years of experience, education, skills with category, certifications, physical requirements, clearance/licenses/background check. Invoked once per posting that has a requirements section.
jobseek-labeller-extract-role
Extract structured fields from the role section — role summary, responsibilities, collaboration partners, shift/hours/travel/on-call. Invoked once per posting that has a role section.
jobseek-labeller-extract-preferred
Extract structured fields from the preferred section — preferred skills with category, preferred education, preferred certifications. Invoked once per posting that has a preferred section.
jobseek-labeller-extract-team
Extract structured fields from the team section of a labelled job posting — team name, team function tags. Invoked once per posting that has a team section.