From qol-langs
Use when writing Rust in this workspace. Workspace-specific style and gotchas (error handling, filesystem, process management, cross-platform code layout) — NOT a generic Rust reference. For canonical Rust/library docs, use context7 instead. Plugin-specific and qol-tray-specific Rust gotchas live in their own skills (`qol-plugin-*`, `qol-tray-core`, `qol-tray-rust`, `qol-arch-code`, `qol-arch-cross-platform`).
How this skill is triggered — by the user, by Claude, or both
Slash command
/qol-langs:rust-conventionsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Platform-specific code should be isolated in dedicated modules:
Platform-specific code should be isolated in dedicated modules:
platform/ subdirectories for OS-specific implementations#[cfg(target_os)] conditionals when possibleqol-arch-code skilldead_code/unused_imports errors on the OSes you don't usually develop on, see qol-arch-cross-platformqol-arch-cicd.expect() is acceptable for compile-time invariants (embedded assets).expect() is NOT acceptable for runtime operations (file paths, config dirs)Option or Result and let callers decide how to handleWhen stopping child processes:
qol-process for detached spawning, PID liveness, termination
escalation, waiting, and child reaping; do not duplicate process-group,
kill, waitpid, or Windows process-handle plumbing in apps and pluginsstd::path::PathBuf and Path for all file operationsstd::env::temp_dir() instead of hardcoded /tmpPath::exists() returns false for broken symlinks - use symlink_metadata().is_ok() to detect symlink existenceqol-fs::{atomic_write, atomic_write_durable} for regular file-content
replacement; never hand-roll sibling temp writes and renames. Binary swaps,
directory promotion, and no-clobber creation stay capability-local.Background threads, supervisors, watchers, listeners (anything always-on) MUST be free-when-idle, not just cheap. Wakeups themselves cost the user.
crossbeam_channel::select!, tokio::select!, Receiver::recv(), inotify, signalfd. Never try_recv + thread::sleep.try_recv + sleep_ms loops. That is not polling, that is busy-waiting with rest periods. Replace with a blocking select! over every channel the loop cares about.tokio::time::interval in always-on paths unless you need genuinely periodic side effects (heartbeat, render tick) AND the work is gated to "needed right now". An interval that fires while the UI is closed is a bug.Duration::from_millis(...) in always-on background code is a code smell. Justify it or remove it. Render-rate intervals (16ms / 60fps) are fine only while the surface is visible.select! over all N. Do not poll one and block on another.if statements as much as possible to avoid nested conditionals.if/match/for blocks. This ensures each function does exactly one logical thing and remains easy to reason about.Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
npx claudepluginhub qol-tools/qol-skills --plugin qol-langs