Initial commit: Hermes Agent Skills collection

This commit is contained in:
Debian
2026-07-12 19:02:59 +00:00
commit e9cc106625
789 changed files with 233126 additions and 0 deletions
@@ -0,0 +1,64 @@
# Real-World Email Classification Examples
Actual inbox examples from production runs, showing what to classify and what to ignore.
## Order Confirmations → `Rechnungen_jjjj_mm/Bestellungen_jjjj_mm`
| Sender | Subject | Key Body Indicators |
|--------|---------|---------------------|
| `bestellbestaetigung@amazon.de` | "Bestellt: ..." | "Bestellnr.", "Vielen Dank für deine Bestellung" |
| `noreply@cateringexpert.de` | "Bestellung erfolgreich" | "Bestellbestätigung", "Verpflegungsteilnehmer" |
## Shipments/Notifications → IGNORE
| Sender | Subject | Why Ignore |
|--------|---------|------------|
| `shipment-tracking@amazon.de` | "In Zustellung: ..." | Delivery notification, not an order/invoice |
| `versandbestaetigung@amazon.de` | "Versendet: ..." | Shipping confirmation, not order/invoice |
| `order-update@amazon.de` | "zugestellt" / "geliefert" | Delivery complete |
| `rueckgabe@amazon.de` | Any | Return/refund, not an invoice |
| `noreply@dhl.de` | "Sendung liegt" / "Zustellung" | DHL delivery attempt notice |
## Invoices → `Rechnungen_jjjj_mm`
| Sender | Subject | Key Body Indicators |
|--------|---------|---------------------|
| `no-reply@amazon.de` | "Rechnung" / "Rechnung für" | "Rechnungsnummer", "Gesamtbetrag", "Umsatzsteuer" |
| `AmericanExpress@welcome.americanexpress.com` | "Online-Monatsabrechnung" | Credit card statement |
## Credit Memos → `Rechnungen_jjjj_mm/Gutschriften_jjjj_mm`
| Sender | Subject |
|--------|---------|
| Any | Subject contains "Gutschrift" |
## Typical Ignore Categories (never classify)
| Category | Senders | Examples |
|----------|---------|----------|
| **Marketing/Newsletter** | HelloFresh, Lidl, Rewe, Schuh-Schmid, Bestsecret, Metro, mymuesli, aldi-sued | Deal alerts, weekly offers |
| **Social/Job** | `mailrobot@mail.xing.com`, `jobalerts-noreply@linkedin.com`, Facebook, Pinterest | Birthdays, job alerts, connections |
| **Solar/Technical** | `noreply@sunnyportal.com` | Tagesertrag reports, error reports |
| **Shipping Delays** | `noreply@dhl.de` | "verspätet sich" delivery delay notices |
| **Marketing/Newsletter** | HelloFresh, Lidl, Rewe, Schuh-Schmid, Bestsecret, Metro, mymuesli, aldi-sued | Deal alerts, weekly offers |
| **Energy/Utility Promo** | `news@email.eis.de` | "Guthaben verfällt" balance expiry reminders — marketing, not invoice |
| **Payment App Marketing** | `noreply@hello.klarna.com` | "Bleib flexibel" / "Bezahl mit Klarna" — app feature promo, not invoice |
| **Newsletters** | `newsletter@news.reolinksupport.com`, `newsletter@deals.banggood.com` | Product news, deals |
| **System** | `noreply-dmarc-support@google.com` | DMARC reports |
| **Personal** | `ich@dominikschoen.de`, `debug1@grafiniert.de` | Non-business emails |
## Decision Flow
```
1. Does subject contain "Rechnung" or "Gutschrift"?
→ Yes: read body for Rechnung# / Gesamtbetrag → invoice OR gut-schrift
→ No: continue
2. Does subject contain "bestellt" / "bestellung"?
→ Yes: read body
- Contains "Bestellnr." + "Vielen Dank" → order confirmation
- Contains "In Zustellung" / "zugestellt" / "versendet" → shipment (ignore)
- Contains "Rücksendung" / "Erstattung" → return (ignore)
3. Otherwise: IGNORE
```
@@ -0,0 +1,101 @@
# Discovered Email Patterns — 2026-06
## Invoices (Rechnungen)
### IONITY — Lade-Rechnung
- **Sender**: `no-reply@ionity.eu`
- **Subject**: "Danke, dass du bei IONITY geladen hast"
- **Body**: Contains "Die aktuelle Rechnung ist im Anhang"
- **Attachment**: PDF invoice
- **Folder**: `Rechnungen_YYYY_MM`
### ASFINAG — Österreichische Maut-Rechnung
- **Sender**: `shop@asfinag.at`
- **Subject**: "Abbuchung Digitale Streckenmaut FLEX"
- **Body**: Contains "Rechnungsnummer", "wurde die Abbuchung ... durchgeführt"
- **Attachment**: PDF invoice
- **Folder**: `Rechnungen_YYYY_MM`
### GitHub — Payment Receipt (Sponsoring)
- **Sender**: `noreply@github.com`
- **Subject**: "[GitHub] Payment Receipt for ..."
- **Body**: Contains "GITHUB RECEIPT", "Sponsorship Amount", "Total:"
- **Attachment**: PDF receipt
- **Note**: Steuerlich oft nicht relevant, aber dokumentationswert
- **Folder**: `Rechnungen_YYYY_MM`
## Order Confirmations (Bestellungen)
*None discovered in 2026-06 scan.*
## Common Ignores (non-invoices/non-orders)
### noris network — Incident Notifications
- **Sender**: `support@noris.de`
- **Subject**: "Incident resolved (Prio X): [...]" or "Störung Internetuplink"
- **Body**: Contains "Ticketnummer", "Status: Resolved", "DDS"
- **Reason**: IT incident report, not a financial document
### Cateringexpert — System Migrations
- **Sender**: `noreply@cateringexpert.de`
- **Subject**: "Migration erfolgreich abgeschlossen", "Caterer Wechsel", "Konto Migration"
- **Body**: Contains "Umstellung", "Migration", "storniert wurden"
- **Reason**: System notification, not a real order or invoice
- **Note**: Distinguish from actual catering orders (subject: "Bestellung erfolgreich")
### Temu — Product Recommendations (not orders)
- **Sender**: via Apple Private Relay (e.g., `temu_at_eu_temuemail_com_xxx@privaterelay.appleid.com`)
- **Subject**: "Ihre Bestellung wird von uns übernommen!" or "Passend zu dem, was Sie gekauft haben"
- **Body**: Product recommendations, no order details, no order number
- **Reason**: Marketing disguised as order confirmation
- **Note**: Real Temu order confirmations contain "Bestellnummer" and item details
### Sunny Portal — Solar Energy Reports
- **Sender**: `noreply@sunnyportal.com`
- **Subject**: "Sunny Portal Info Report", "Ereignis Report"
- **Body**: Contains "Tagesertrag", "kWh", "CO2 Minderung", "Fehler"
- **Reason**: Technical energy report, not an invoice
- **Already in learning.json ignore_patterns**
### DKB Finanz-News
- **Sender**: `kundeninformation@emails.dkb.de`
- **Subject**: "Das ist neu im Juni", "DKB Finanz-News"
- **Reason**: Bank newsletter, not a statement or invoice
## New Patterns — 2026-06-09 Session
### Temu — Fake Invoice Subject (Marketing Disguised as Invoice)
- **Sender**: via Apple Private Relay (`temu_at_eu_temuemail_com_xxx@privaterelay.appleid.com`)
- **Subject**: "Deine Rechnung wird übernommen!"
- **Body**: Marketing content, product recommendations, no actual invoice or order details
- **Reason**: Temu uses deceptive subject lines ("Rechnung", "Bestellung", "Lieferung") to drive engagement — never an actual invoice or order confirmation
- **Note**: Real Temu order confirmations contain a verifiable Bestellnummer and itemized list with prices
### Oura Ring — Order Confirmation
- **Sender**: `orders@ouraring.com`
- **Subject**: "Your order is being processed" / "Your sizing kit is being processed"
- **Body**: Contains "Order number" (SO-XXXXXXX), "Sale date", "Order Total", itemized with price and VAT
- **Note**: This is a **bestellbestätigung** (order confirmation), NOT an invoice. The actual invoice/receipt comes later via email. The Sizing Kit (€5.95, discounted to €0) is also an order confirmation for the sizing tool.
- **Folder**: `Rechnungen_YYYY_MM/Bestellungen_YYYY_MM`
### American Express — Monthly Statement
- **Sender**: `AmericanExpress@welcome.americanexpress.com`
- **Subject**: "Deine Online-Monatsabrechnung liegt bereit"
- **Body**: Contains "Kontonummer-Endung", "Monatsabrechnung", "SEPA-Lastschrift", link to online card account
- **Reason**: Credit card monthly statement — financial document worth archiving even though it's not a traditional invoice from a vendor
- **Folder**: `Rechnungen_YYYY_MM`
## False Positives — Service Responses with Invoice Keywords
### AEG/Elxtra — Service Response (NOT an invoice)
- **Sender**: `service@aeg.de`, `service@elxtra.com`
- **Subject**: Ticket reply like "AW: Akkulaufzeit nicht mehr akzeptabel. Bitte um Ersatz Ticket-Nr.: 5a50166#3282150"
- **Body**: Contains "rechnung", "umsatzsteuer", "bestellung" (from embedded shop page HTML in the link)
- **Classification**: IGNORE — customer support response with spare parts shop link, not an invoice
- **Pitfall**: Body-level keyword search for invoice terms is misleading here. Always check if the email is a service/support response.
### ALH Dokumentenservice — Insurance Portal Notification (NOT an invoice)
- **Sender**: `Dokumentenservice@alte-leipziger.de`
- **Subject**: "Erinnerung an ein neues Dokument zu Ihrem ALH-Vertrag" or "Neue Dokumente zu Ihrem ALH-Vertrag"
- **Body**: Mentions "Leistungsabrechnungen" but only as UI navigation instruction ("In Hallesche4u finden Sie Leistungsabrechnungen...")
- **Classification**: IGNORE — insurance portal document notification, not a financial document
- **Pitfall**: "Abrechnungen" in body is UI text, not an actual billing document.
@@ -0,0 +1,89 @@
# Learning JSON File Formats
Two formats exist in production. The **structured** format is newer and preferred.
## Format A — Flat (older, in `continuous-invoice-organizer` learning.json)
```json
{
"corrections": [],
"patterns": {
"rechnung": {
"amazon_rechnung": {
"sender": "no-reply@amazon.de",
"subject_keywords": ["rechnung", "rechnung für"],
"content_keywords": ["rechnungsnummer", "rechnungsdatum", "rechnungsempfänger", "umsatzsteuer-id", "zahlbetrag"]
}
},
"bestellbestaetigung": {
"amazon_bestellung": {
"sender": "bestellbestaetigung@amazon.de",
"subject_keywords": ["bestellt"],
"content_keywords": ["bestellnr", "vielen dank fuer deine bestellung"]
}
},
"ignorieren": {
"amazon_lieferung": {
"sender": "order-update@amazon.de",
"subject_keywords": ["zugestellt", "geliefert"]
}
}
},
"last_scan": "2026-05-19",
"total_processed": 150,
"total_moved": 5
}
```
**Used by:** `continuous-invoice-organizer` cronjob (German-language prompts)
**Keys:** `rechnung`, `bestellbestaetigung`, `ignorieren` (German)
## Format B — Structured (newer, in `continuous-email-organization` cronjob prompt)
```json
{
"corrections": [],
"patterns": {
"invoices": {
"american_express": {
"sender": "AmericanExpress@welcome.americanexpress.com",
"subject_pattern": "Online-Monatsabrechnung",
"folder": "Rechnungen_2026_05"
}
},
"orders": {
"amazon_de": {
"sender_pattern": "bestellbestaetigung@amazon.de",
"subject_pattern": "Bestellt:",
"folder": "Rechnungen_2026_05/Bestellungen_2026_05"
}
},
"ignore_patterns": {
"shipment_tracking": "shipment-tracking@amazon.de + In Zustellung → ignoriert"
},
"structured_ignore_patterns": [
{
"name": "amazon_versand",
"sender": "versandbestaetigung@amazon.de",
"subject_keywords": ["versendet", "versand"],
"notes": "Amazon Versandbestätigung"
}
]
},
"last_scan": "2026-05-19",
"total_processed": 150,
"total_moved": 5
}
```
**Used by:** `continuous-email-organization` cronjob prompt template
**Keys:** `invoices`, `orders`, `ignore_patterns`, `structured_ignore_patterns`
## Migration note
When merging patterns from both systems:
- `rechnung` (Format A) → maps to `invoices` (Format B)
- `bestellbestaetigung` (Format A) → maps to `orders` (Format B)
- `ignorieren` (Format A) → maps to `structured_ignore_patterns` (Format B)
Always check which format the existing file uses before writing updates.
@@ -0,0 +1,27 @@
# Discovered Patterns — 2026-06-16 Session
## False Positive — AEG Service Response
- **Sender**: `service@aeg.de`
- **Subject**: "AW: Akkulaufzeit nicht mehr akzeptabel. Bitte um Ersatz Ticket-Nr.: 5a50166#3282150"
- **Body**: Contains keywords "rechnung", "umsatzsteuer", "bestellung" (likely in legal footer or shop page HTML) — but is a **service response** pointing to a web shop link for spare parts. No actual invoice attached.
- **Classification**: IGNORE (service response, not a financial document)
- **Pitfall**: Body-level keyword search for invoice terms is misleading here. Always check if the email is a service/customer support response.
## False Positive — ALH Dokumentenservice Notifications
- **Sender**: `Dokumentenservice@alte-leipziger.de`
- **Subjects**: "Erinnerung an ein neues Dokument zu Ihrem ALH-Vertrag", "Neue Dokumente zu Ihrem ALH-Vertrag"
- **Body**: Mentions "Leistungsabrechnungen" (in the context of "In Hallesche4u finden Sie Leistungsabrechnungen Ihrer Krankenversicherung") but is just a **notification** that new documents are available in the ALH insurance portal.
- **Classification**: IGNORE (insurance portal notification, not an invoice)
- **Pitfall**: The word "Abrechnungen" in the body is part of UI navigation instructions, not an actual billing document.
## Microsoft Teams Notifications
- **Sender**: `no-reply@teams.mail.microsoft`
- **Subject**: "[Name] hat eine Nachricht gesendet."
- **Body**: Contains HTML with inline images, Teams chat content
- **Classification**: IGNORE (chat notification)
## DKB Referral Marketing
- **Sender**: `kundeninformation@emails.dkb.de`
- **Subject**: "170 € Sommer-Aktion ☀️"
- **Body**: "Letzte Chance: Girokonto empfehlen & mehr verdienen" — referral campaign
- **Classification**: IGNORE (marketing, not a statement or invoice)
@@ -0,0 +1,27 @@
# Session Notes — 2026-06-12
## Key Discovery: DHL Delivery Keyword Variants
The existing DHL ignore pattern used `"zustellung"` / `"sendung liegt"` as keywords, but this session revealed **two additional phrasings** that are NOT caught by those patterns:
| Pattern | Example Subject | Catch Rate |
|---|---|---|
| Old: `zustellung` / `sendung liegt` | `Ihre ARO SUPERMERCHANT Sendung liegt am gewünschten Ablageort` | ❌ Missed |
| New: `liegt am Ablageort` | `Ihre ARO SUPERMERCHANT Sendung liegt am gewünschten Ablageort` | ✅ |
| New: `wird gleich zugestellt` | `Ihre ARO SUPERMERCHANT Sendung wird gleich zugestellt` | ✅ |
**Action taken in learning.json:**
- Added structured ignore pattern `dhl_paket_lieferung` with keywords `["liegt am Ablageort", "wird gleich zugestellt"]` for sender `noreply@dhl.de`
- This runs alongside (not replacing) the existing DHL `zustellung` pattern — both are needed for full coverage.
## Secondary Discovery: Oura Delivery Notification
| Pattern | Example Subject | Type |
|---|---|---|
| `Die Lieferung deiner Bestellung ist für morgen geplant!` | orders@ouraring.com | Delivery notification (ignore) |
| `Great news: Your Oura Ring shipped!` | orders@ouraring.com | Shipment notification (ignore) |
| `Your order is being processed` | orders@ouraring.com | Order confirmation (archive) |
**Action taken:** Added structured ignore pattern `oura_delivery` for sender `orders@ouraring.com` with keywords `["lieferung", "shipped", "delivery"]`.
**Important distinction:** Same sender, different intent. "Order is being processed" → order confirmation. "Delivery" / "shipped" → ignore. Body reading is critical for disambiguation.