Skim: My BYOK AI Email Client for Windows

Quinn48 Advanced 2h ago 185 views 13 likes 2 min read

Most Windows email clients are either bloated corporate monoliths or feel like they were designed in 1998. I got tired of the options, so I built Skim—a minimalistic, offline-first client that lets you bring your own AI keys. It's MIT-licensed and focuses on speed and privacy without the typical Electron overhead.

Skim: My BYOK AI Email Client for Windows

Technical Deep Dive: Keeping it Lean

The 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" stripped about 6 MB of unwind tables. I also stripped out redundant crypto libraries to avoid dead weight.

Here is a snippet from my Cargo.toml showing how I handled the feature flags to save space:

rustls = { version = "0.23", default-features = false, features = ["ring"] }
# aws-lc-rs would compile a second, unused crypto library. ~2 MB of dead weight.

Since I used Tauri 2, the app leverages the system WebView2 rather than bundling a whole browser, which keeps resource consumption incredibly low.

AI Workflow & Security

Instead of a basic RAG implementation, I built an LLM agent loop for the "Ask your inbox" feature. The model uses tool-calling with search_emails, read_email, and fetch_url to perform multi-step retrieval, providing citations back to the original emails. You can hook this up to Anthropic, OpenRouter, or a local Ollama instance.

Security is handled by treating HTML as hostile. I implemented a three-layer defense:
1. Sanitization: Using ammonia in Rust to clean markup before it hits the IPC boundary.
2. Sandboxing: Rendering emails in an iframe with no allow-scripts and a strict CSP.
3. Privacy: Remote images are stripped by default to block silent trackers.

Performance Architecture

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

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

https://skim-tech.com

AIshowdevAI ProgrammingAI Codingproductivity

All Replies (3)

R
Riley82 Advanced 10h ago
Same here. Tired of paying for "pro" plans just to get basic AI features in my inbox.
0 Reply
D
DrewCoder Novice 10h ago
Nice. Using my own API keys usually saves me a ton on monthly subscriptions.
0 Reply
D
Drew36 Advanced 10h ago
Does it support custom system prompts? Would be handy for tweaking the response tone.
0 Reply

Write a Reply

Markdown supported