qol-arch-cross-platformlisted
Install: claude install-skill qol-tools/qol-skills
# qol-arch-cross-platform: Cross-Platform Symbol Hygiene
> Cross-platform warnings are errors: code that compiles green on Linux breaks macOS/Windows under `-D warnings` because `dead_code`, `unused_imports`, and `unused_mut` differ per backend. CI runs `RUSTFLAGS=-D warnings` on every target; this gate is not optional. Full symbol-hygiene patterns and triggers follow.
## Why this skill exists
The `qol-arch-code` skill compartmentalizes platform-specific *bodies* into `platform/{linux,macos,windows}.rs`. That solves the easy half of the problem.
The *hard* half is symbols that look cross-platform but in practice are consumed by only one OS's backend. Those symbols compile clean on the host you're on (because the consumer compiles too), and explode under `-D warnings` on the OS where the consumer is cfg'd out:
- **`dead_code`** — `pub fn`, `pub const`, `pub struct` in a shared module whose only callers live behind `#[cfg(target_os = "linux")]`.
- **`unused_imports`** — `use` statements that pull in symbols only referenced from a cfg-gated function body.
- **`unused_mut`** — function parameters or local bindings that are only mutated in one platform's branch.
The qol-tools commit history is full of these. The `d797294` refactor moved sixteen `dead_code` errors out of macOS-side `qol-tray` builds by relocating a `BindingMatcher` table from the shared `capture/mod.rs` into the linux-only `capture/platform/linux/matcher.rs`. The `33df35d` follow-up flipped a constants module