email-receipt-scanning

email-receipt-scanning is a skill for Claude Code from peerjakobsen/smartspender. It costs 26 tokens per session (1,747 once invoked), scanned A, original, MIT.

A set of rules for finding receipt and invoice emails in Gmail, including Danish sender patterns and PDF attachments.

In plain words
What is it for?
It helps scan Gmail for recent receipts and invoices, identify their content types, and download attached PDFs. Gmail access tools must be configured.
Why use it?
It removes the need to design searches and decide how to recognize or deduplicate email-based receipts yourself.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the smartspender plugin — 13 skills, 19 commands shipped together

Good fit It helps scan Gmail for recent receipts and invoices, identify their content types, and download attached PDFs. Gmail access tools must be configured.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/peerjakobsen/smartspender/email-receipt-scanning
Install

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.

Any agent
npx skills add peerjakobsen/smartspender --skill email-receipt-scanning
Clone the repo
git clone --depth 1 https://github.com/peerjakobsen/smartspender

Made for: Claude Code.

Or install smartspender, the plugin that ships this one along with the rest of its 13 skills, 19 commands.

Wrote 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.

agentmods badge for email-receipt-scanning

README.md
[![agentmods](https://agentmods.dev/badge/skills/peerjakobsen/smartspender/email-receipt-scanning/github.svg)](https://agentmods.dev/skills/peerjakobsen/smartspender/email-receipt-scanning)
Your own site
<a href="https://agentmods.dev/skills/peerjakobsen/smartspender/email-receipt-scanning"><img src="https://agentmods.dev/badge/skills/peerjakobsen/smartspender/email-receipt-scanning/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.

agentmods 80×15 button for email-receipt-scanning

Your own site · 80×15
<a href="https://agentmods.dev/skills/peerjakobsen/smartspender/email-receipt-scanning"><img src="https://agentmods.dev/badge/skills/peerjakobsen/smartspender/email-receipt-scanning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,747 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.01747
Opus 5.5 $0.00010 $0.00699
Sonnet 5.5 $0.00005 $0.00349
Haiku 4.5 $0.00003 $0.00175

Measured 3mo ago against content hash bb2947107332, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

email-receipt-scanning 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 3mo 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.

skills/email-receipt-scanning/SKILL.md · 175 lines

How it starts

The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Email Receipt Scanning

Purpose

Provides Gmail search queries, Danish sender patterns, email content type detection, and deduplication rules for scanning a user's inbox for receipts and invoices. Used by the /smartspender:receipt email command.

Prerequisites

This skill requires the Gmail MCP server to be configured in the user's environment. The following MCP tools are needed:

  • gmail_search or equivalent — search emails by query
  • gmail_get_message or equivalent — read email content and metadata
  • gmail_get_attachment or equivalent — download PDF attachments

If Gmail MCP is not available, commands using this skill should fail gracefully with a clear message.

Gmail Search Queries

Primary Search Query

Search for receipt and invoice emails using this combined query:

subject:(faktura OR kvittering OR receipt OR invoice OR ordre OR order OR betaling) has:attachment after:{YYYY/MM/DD}

Where {YYYY/MM/DD} is either:

  • The last_email_scan timestamp from settings.csv (incremental scan)
  • A calculated date based on the days argument (e.g., 30 days back)
  • Default: 90 days back if no previous scan and no argument

Supplementary Queries

If the primary query returns few results, also try:

from:(*faktura* OR *invoice* OR *noreply* OR *no-reply*) has:attachment after:{YYYY/MM/DD}
subject:(ordrebekraeftelse OR orderbekraeftelse OR betalingsbekraeftelse) after:{YYYY/MM/DD}

Query Notes

  • has:attachment ensures only emails with files are returned (most invoices are PDF attachments)
  • Danish keywords (faktura, kvittering, betaling) catch Danish vendor emails
  • English keywords (receipt, invoice, order) catch international vendors
  • Date filter prevents re-scanning old emails

Danish Sender Patterns

Map known email sender domains to vendor IDs for faster vendor detection:

Sender Pattern Vendor ID Vendor Name Type
*@tdc.dk tdc TDC Telecom
*@tdcnet.dk tdc TDC Telecom
*@telenor.dk telenor Telenor Telecom
*@telia.dk telia Telia Telecom
*@orsted.dk orsted Oersted Electricity
*@hofor.dk hofor HOFOR Water
*@norlys.dk norlys Norlys Electricity
*@ewii.dk ewii EWII Utility
*@dinenergi.dk dinenergi Din Energi Electricity
*@netflix.com netflix Netflix Streaming
*@spotify.com spotify Spotify Streaming
*@amazon.com amazon Amazon Online order
*@amazon.de amazon Amazon Online order
*@zalando.dk zalando Zalando Online order
*@ikea.com ikea IKEA Online order
*@wolt.com wolt Wolt Delivery
*@nemlig.com nemlig Nemlig Delivery

Read the full file on GitHub · 175 lines

Changes

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.

  1. 3mo ago First seen · 175 lines · 26 tokens per session scan A bb2947107332

Subscribe to this mod's changes

email-receipt-scanning is a skill published in the GitHub repository peerjakobsen/smartspender (5 stars, last pushed 10mo ago), licensed MIT. It adds 26 tokens to every session and 1,747 once invoked, about $0.0001 per session on Opus 5.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-31.

Related

email-receipt-scanning compared with skills from other repositories

email-receipt-scanning next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
email-receipt-scanningpeerjakobsen/smartspenderSkill510mo agoMITA26Claude Code
sheet-music-publisherbitwize-music-studio/claude-ai-music-skillsSkill7296d agoCC0-1.0A36Claude Code
visual-explainerNikiforovAll/claude-code-rulesSkill1441mo agoApache-2.0A84Claude Code
reflect-solutionNikiforovAll/claude-code-rulesSkill1441mo agoApache-2.0A0Claude Code
reading-deduction-certkazukinagata/shinkokuSkill3732mo agoMITA63Claude Code
reading-receiptkazukinagata/shinkokuSkill3732mo agoMITA64Claude Code
finance-assistantgooglarz/finance-assistantSkill56todayMITB117Claude Code, Codex