{"slug": "skim-my-byok-ai-email-client-for-windows", "title": "Skim: My BYOK AI Email Client for Windows", "summary": "Skim, a new BYOK (Bring Your Own Key) AI email client for Windows, achieves an installer under 5 MB by optimizing dependencies and compiler flags, using Tauri 2 to leverage the system WebView2. The app features an LLM agent loop for multi-step email retrieval via tool-calling, supports Anthropic, OpenRouter, or local Ollama, and implements three-layer security including HTML sanitization with ammonia, sandboxed iframes, and stripped remote images. It is strictly offline-first with SQLite FTS5 search and bm25 ranking.", "body_md": "# Skim: My BYOK AI Email Client for Windows\n\n## Technical Deep Dive: Keeping it Lean\n\nThe biggest challenge wasn't the UI, but the binary size. I managed to get the installer under 5 MB by obsessing over dependencies and compiler flags. For example, using `panic = \"abort\"`\n\nstripped about 6 MB of unwind tables. I also stripped out redundant crypto libraries to avoid dead weight.\n\nHere is a snippet from my `Cargo.toml`\n\nshowing how I handled the feature flags to save space:\n\n```\nrustls = { version = \"0.23\", default-features = false, features = [\"ring\"] }\n# aws-lc-rs would compile a second, unused crypto library. ~2 MB of dead weight.\n```\n\nSince I used Tauri 2, the app leverages the system WebView2 rather than bundling a whole browser, which keeps resource consumption incredibly low.\n\n## AI Workflow & Security\n\nInstead of a basic [RAG](/en/tags/rag/) implementation, I built an LLM agent loop for the \"Ask your inbox\" feature. The model uses tool-calling with `search_emails`\n\n, `read_email`\n\n, and `fetch_url`\n\nto perform multi-step retrieval, providing citations back to the original emails. You can hook this up to Anthropic, OpenRouter, or a local Ollama instance.\n\nSecurity is handled by treating HTML as hostile. I implemented a three-layer defense:\n\n1. **Sanitization:** Using `ammonia`\n\nin Rust to clean markup before it hits the IPC boundary.\n\n2. **Sandboxing:** Rendering emails in an iframe with no `allow-scripts`\n\nand a strict CSP.\n\n3. **Privacy:** Remote images are stripped by default to block silent trackers.\n\n## Performance Architecture\n\nThe app is strictly offline-first. Every action (archiving, deleting, starring) is wrapped in a single SQLite transaction and pushed to an operation queue. This allows the UI to update instantly while the server syncs in the background. For search, I'm using SQLite FTS5 with bm25 ranking, ensuring that searching through thousands of emails is instantaneous even without an internet connection.\n\nIf you're looking for a lightweight, keyboard-driven alternative to Outlook, this is a great way to integrate your own LLM into your mail flow.\n\n`https://skim-tech.com`\n\n[Next Topcoat: A Full-Stack Rust Alternative to Next.js →](/en/threads/2629/)", "url": "https://wpnews.pro/news/skim-my-byok-ai-email-client-for-windows", "canonical_source": "https://promptcube3.com/en/threads/2653/", "published_at": "2026-07-24 01:45:32+00:00", "updated_at": "2026-07-24 10:10:14.251402+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "large-language-models"], "entities": ["Skim", "Tauri 2", "Anthropic", "OpenRouter", "Ollama", "SQLite"], "alternates": {"html": "https://wpnews.pro/news/skim-my-byok-ai-email-client-for-windows", "markdown": "https://wpnews.pro/news/skim-my-byok-ai-email-client-for-windows.md", "text": "https://wpnews.pro/news/skim-my-byok-ai-email-client-for-windows.txt", "jsonld": "https://wpnews.pro/news/skim-my-byok-ai-email-client-for-windows.jsonld"}}