drift-detection

drift-detection is a skill for Claude Code, Codex from bolivian-peru/os-moda. It costs 29 tokens per session (638 once invoked), scanned A, original, Apache-2.0.

A checker for configuration drift on NixOS, a Linux system where declared configuration is meant to be the source of truth. It looks for changes made manually outside that configuration.

In plain words
What is it for?
Use it to find manually installed packages, edited system files, cron jobs, old NixOS generations, and failed or orphaned services, then consider adding the needed changes to the configuration.
Why use it?
It reveals packages, files, scheduled jobs, system versions, or services that may no longer match the recorded system setup. This helps prevent undocumented changes from causing surprises.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to find manually installed packages, edited system files, cron jobs, old NixOS generations, and failed or orphaned services, then consider adding the needed changes to the configuration.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bolivian-peru/os-moda/drift-detection
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add bolivian-peru/os-moda --skill drift-detection
Clone the repo
git clone --depth 1 https://github.com/bolivian-peru/os-moda

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for drift-detection

README.md
[![agentmods](https://agentmods.dev/badge/skills/bolivian-peru/os-moda/drift-detection/github.svg)](https://agentmods.dev/skills/bolivian-peru/os-moda/drift-detection)
Your own site
<a href="https://agentmods.dev/skills/bolivian-peru/os-moda/drift-detection"><img src="https://agentmods.dev/badge/skills/bolivian-peru/os-moda/drift-detection/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for drift-detection

Your own site · 80×15
<a href="https://agentmods.dev/skills/bolivian-peru/os-moda/drift-detection"><img src="https://agentmods.dev/badge/skills/bolivian-peru/os-moda/drift-detection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 638 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.00638
Opus 5 $0.00015 $0.00319
Sonnet 5 $0.00006 $0.00128
Haiku 4.5 $0.00003 $0.00064

Measured 10d ago against content hash e362ca5b9086, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

drift-detection scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/drift-detection/SKILL.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Configuration Drift Detection

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.

Checks

1. Imperatively installed packages

shell_exec({ command: "nix-env -q 2>/dev/null || echo 'none'" })

If packages found: offer to add them to environment.systemPackages in NixOS config.

2. Manual files outside NixOS

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.

3. Manual cron jobs

shell_exec({ command: "ls /etc/cron.d/ /var/spool/cron/crontabs/ 2>/dev/null" })

Offer to convert to systemd timers in NixOS config.

4. Stale NixOS generations

shell_exec({ command: "nixos-rebuild list-generations 2>/dev/null | wc -l" })

More than 20 generations → suggest cleanup.

5. Orphaned systemd units

shell_exec({ command: "systemctl list-units --state=failed --no-pager" })

Remediation

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

Why This Matters

On Ubuntu, configuration drift is invisible and irreversible. On NixOS with osModa, you can:

  1. Detect that something was changed manually
  2. Reconcile by adding it to the declarative config
  3. Prove with the audit ledger that nothing unauthorized happened
  4. Reproduce the exact system state on new hardware

This is useful supporting evidence for compliance programs (SOC 2, etc.) — though not by itself proof of regulatory readiness.

Read the full file on GitHub · 82 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 82 lines · 29 tokens per session scan A e362ca5b9086

Subscribe to this mod's changes

drift-detection is a skill published in the GitHub repository bolivian-peru/os-moda (117 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 29 tokens to every session and 638 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

makefile-generation

Generates Makefiles with testing, linting, formatting, and automation targets. Use when starting a project or standardizing build automation.

athola/claude-night-market · 31 tokens

workflow-setup

Configures GitHub Actions CI/CD workflows for testing, linting, and deployment. Use when setting up automation for a Python, Rust, or TypeScript project.

athola/claude-night-market · 37 tokens

analyzing-linux-kernel-rootkits

Detect kernel-level rootkits in Linux memory dumps using Volatility3 linux plugins (checksyscall, lsmod, hiddenmodules), rkhunter system scanning, and /proc vs /sys discrepancy analysis to identify hooked syscalls, hidden kernel modules, and tampered system structures.

xalgorix/xalgorix · 65 tokens

devops-expert

Expert-level DevOps practices, culture, automation, and continuous delivery. Use when the user mentions CI/CD, automation, infrastructure, or culture, or when the task involves DevOps Culture or Culture & Process.

personamanagmentlayer/pcl · 47 tokens

shell-scripting

Use this skill when writing bash or zsh scripts, parsing arguments, handling errors, or automating CLI workflows. Triggers on bash scripting, shell scripts, argument parsing, process substitution, here documents, signal trapping, exit codes, and any task requiring portable shell script development.

alibaba/anolisa · 60 tokens

agent-self-improvement

Use when monitor performance of other skills, identify bottlenecks, suggest improvements, and auto-optimize the skill portfolio. Use when monitoring performance of other skills, identify bottlenecks, suggest improvements, and.

oyi77/1ai-skills · 47 tokens