skills/drift-detection/SKILL.md
Detect configuration drift — manual changes that exist outside NixOS management. Offer to bring imperative changes into declarative config.
npx skillsauth add bolivian-peru/os-moda drift-detectionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
NixOS is declarative — the config should be the single source of truth. But reality drifts: manual edits, imperative installs, ad-hoc cron jobs. Detect and reconcile.
shell_exec({ command: "nix-env -q 2>/dev/null || echo 'none'" })
If packages found: offer to add them to environment.systemPackages in NixOS config.
shell_exec({ command: "find /etc -newer /etc/NIXOS -not -path '/etc/nixos/*' -not -path '/etc/resolv.conf' -type f 2>/dev/null | head -20" })
Files modified after last NixOS rebuild may be manual edits.
shell_exec({ command: "ls /etc/cron.d/ /var/spool/cron/crontabs/ 2>/dev/null" })
Offer to convert to systemd timers in NixOS config.
shell_exec({ command: "nixos-rebuild list-generations 2>/dev/null | wc -l" })
More than 20 generations → suggest cleanup.
shell_exec({ command: "systemctl list-units --state=failed --no-pager" })
For each drift finding, offer to bring it into NixOS:
Drift Report:
⚠️ 3 packages installed via nix-env: htop, ncdu, tree
→ Add to environment.systemPackages? [Y/n]
⚠️ /etc/cron.d/backup exists outside NixOS
→ Convert to systemd timer in NixOS config? [Y/n]
⚠️ 47 old NixOS generations (using 18GB)
→ Keep current + last 5, remove rest? [Y/n]
✅ No unauthorized file changes in /etc/nixos/
✅ All systemd services match NixOS config
On Ubuntu, configuration drift is invisible and irreversible. On NixOS with osModa, you can:
This is useful supporting evidence for compliance programs (SOC 2, etc.) — though not by itself proof of regulatory readiness.
devops
Multi-perspective risk analysis using structured persona debate before deploying changes
development
Build software via spec-driven development (github/spec-kit). Whenever the user asks for a feature larger than a one-line tweak, scaffold a spec-kit project, capture WHAT + WHY, declare tech stack, break into tasks, then iterate the implementation until tests pass.
development
Manage NixOS packages declaratively. Search, install (via configuration.nix rebuild), remove, rollback, and list generations. Understands the NixOS declarative model.
data-ai
Monitor system health: CPU, memory, disk, network, processes, services, and logs. Present data naturally. Correlate issues across subsystems. Alert on thresholds. Diagnose root causes.