/linux:linux-file-integrityfrom linux
Establishes, checks, tunes, and safely updates an AIDE baseline on Debian/Ubuntu or RHEL-family hosts. Covers drift triage, scheduling, and off-box trust.
Ships in linux. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Two-family skill. AIDE runs on both families, but the packaging and paths
differ more than most tools: Debian/Ubuntu wraps AIDE in helper scripts
(aideinit, update-aide.conf) and splits config into /etc/aide/ with a
aide.conf.d/ drop-in dir; the RHEL family ships plain upstream AIDE with a
single /etc/aide.conf and uses aide --init directly. Body uses
Debian/Ubuntu; substitute per this matrix.
| Concept | Debian/Ubuntu | RHEL family |
|---|---|---|
| Install | apt install aide aide-common | dnf install aide |
| Main config | /etc/aide/aide.conf (+ aide.conf.d/) | /etc/aide.conf (single file) |
| Build baseline | aideinit (wrapper) | aide --init |
| New DB path | /var/lib/aide/aide.db.new | /var/lib/aide/aide.db.new.gz |
| Trusted DB path | /var/lib/aide/aide.db | /var/lib/aide/aide.db.gz |
| Regenerate config | update-aide.conf | edit /etc/aide.conf directly |
| Run check | aide --check | aide --check (same) |
| Accept changes | aideinit + copy, or aide --update | aide --update + copy |
AIDE answers "which files have changed since we last knew they were
good?" It hashes watched paths into a baseline database, then reports drift
on each check. It is the drift layer of compliance auditing; pair it with
attribution (linux-auditd-rules, auditd) and benchmark scoring
(linux-benchmark-scanning, OpenSCAP/Lynis). See
../../docs/multi-distro/plan.md.
aide --check) and triaging the report./etc/aide.conf rule groups, or scheduling nightly checks.linux-auditd-rules (auditd).linux-benchmark-scanning.linux-intrusion-detection (rkhunter/chkrootkit).| Artefact | Source | Required? | If absent |
|---|---|---|---|
| Known-clean attestation and trusted package/deployment state | Host owner and provenance records | baseline only | Stop; do not establish or update trust. |
| Monitored paths, attributes, exclusions, and alert destination | Control owner | yes | Run read-only config review only. |
| Baseline location/checksum, change ticket, and accept/escalate authority | FIM custody/change process | update only | Preserve current baseline and escalate drift. |
Default assessment is read-only: read/search AIDE config, database metadata, and drift output. Installation, baseline creation/replacement, config edits, scheduling, and accepting changes require explicit authority. A drift investigation never updates the baseline implicitly.
Without a trusted baseline, report FIM as unavailable rather than clean. Without off-box comparison or provenance, qualify trust. If noisy paths prevent a complete run, list exclusions and unassessed scope; never convert it to a pass.
| Choice | Action | Failure or risk avoided |
|---|---|---|
| Build baseline | Proceed only from a known-clean, patched, attested state. | Blessing attacker modifications. |
| Drift severity | Escalate executable/config hash or ownership changes; contextualise expected volatile attributes. | Missing high-impact tampering. |
| Accept change | Require ticket, package/deployment evidence, and reviewed diff before update. | Blind re-baselining. |
| Baseline custody | Store checksum/database in a separately protected or off-box location. | Attacker rewriting evidence. |
/bin, /sbin, /usr/bin, /usr/sbin, /usr/local/*bin as critical until proven benign.| Artefact | Consumer | Acceptance condition |
|---|---|---|
| Baseline custody record | Control owner | Known-clean basis, config, database path/checksum, protected copy, scope, and exclusions are recorded. |
| Drift triage | Incident/change owner | Each change has severity, provenance, accept/escalate decision, and approver where applicable. |
| Scheduled-check evidence | Operator | Canary detection, run status, alert delivery, and unassessed paths are documented. |
| Artefact | Acceptance |
|---|---|
| FIM evidence pack | Contains baseline checksum/custody, config validation, clean and canary checks, redacted drift report, change provenance, and acceptance/escalation record. |
After an authorised package update changes /usr/bin/example, compare package provenance and the AIDE attributes, verify the ticket and signature, accept only that reviewed delta, protect the new database checksum off-box, and rerun a clean check.
references/aide-reference.md — install, init, config tuning, reading the report, accepting changes, scheduling (timer/cron), and off-box DB storage, both families.This skill is self-contained. Every command below is standard AIDE on its
family (see Distro support for the package and path substitutions). The
sk-* scripts in the Optional fast path section are convenience
wrappers — never required.
Build the baseline on a host you know is clean — right after provisioning, before it is ever exposed. Baselining a compromised host just records the compromise as "normal."
# Debian/Ubuntu
sudo apt install aide aide-common
sudo aideinit # 1-10 min: hashes watched paths
sudo cp /var/lib/aide/aide.db.new /var/lib/aide/aide.db
# RHEL family
sudo dnf install aide
sudo aide --init
sudo cp /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
Smoke test:
sudo aide --check # expect: "found NO differences"
sudo touch /etc/test-aide && sudo aide --check # now reports test-aide added
sudo rm /etc/test-aide
sudo aide --check # full check; exit 0 = clean, 1-15 = drift, 16+ = error
sudo aide --check --log-level=warning # quiet, for cron
sudo aide --check --limit='^/etc/ssh' # one path
Reading the report (flag string, exit codes) and the per-path triage flow are
in references/aide-reference.md.
After a confirmed-legitimate change (package upgrade, config edit), refresh the baseline so the next run starts clean:
# Debian/Ubuntu
sudo aideinit && sudo cp /var/lib/aide/aide.db.new /var/lib/aide/aide.db
# RHEL family
sudo aide --update && sudo cp /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
sudo aide --check # confirm: no differences
# Log the accepted change
echo "$(date -Iseconds) aide baseline updated after nginx upgrade" \
| sudo tee -a /var/log/linux-skills/aide-baseline-updates.log
The Ubuntu package splits config into /etc/aide/aide.conf plus
/etc/aide/aide.conf.d/ drop-ins (regenerate with update-aide.conf); the
RHEL family uses a single /etc/aide.conf. Rules pair a path with a named
check group:
/etc/ssh/ NORMAL # perms+owner+group+size+mtime+hashes
/var/log/ Logs # perms+owner only (logs grow legitimately)
!/var/cache # ignore (the ! prefix)
The full rule-group catalogue, a ready-to-drop strict ruleset, and ignore
lists are in references/aide-reference.md.
sudo tee /etc/cron.daily/aide-check > /dev/null <<'EOF'
#!/bin/bash
# Nightly AIDE check — mail the report only when drift is found
set -u
REPORT=$(aide --check 2>&1 || true)
if echo "$REPORT" | grep -q "found differences"; then
echo "$REPORT" | mail -s "AIDE Report $(hostname) $(date +%Y-%m-%d)" root
fi
EOF
sudo chmod +x /etc/cron.daily/aide-check
A systemd-timer alternative and a critical-paths-only filter are in
references/aide-reference.md. Ensure an MTA
delivers root mail to a human — see linux-mail-server.
The trusted DB is the only thing that makes AIDE trustworthy. An attacker who
edits both a binary and the on-box DB defeats the check silently. Copy the
DB to a write-once or remote location after every (re)baseline, and compare
against that copy before trusting a check. Detail in
references/aide-reference.md.
No wrapper commands for this skill are shipped in this checkout. Use the native procedures above; planned wrappers remain in the script inventory until their source files are present.
What SKILL.md sets; muted values are Claude Code's defaults
45 skills in this plugin
/cisco-ios-patternsUse when reading or reviewing Cisco IOS/IOS-XE configuration, selecting read-only show commands, or planning and verifying bounded router or switch configuration work. Not for Linux host networking, bulk SSH automation, or config preflight parsing; route those to linux-network-admin, netmiko-ssh-automation, or network-config-validation./linux-access-controlUse when creating, revoking, or auditing Linux users, groups, SSH keys, sudo/wheel access, PAM settings, SELinux user mappings, or file permissions. Use linux-secrets for credential material and linux-server-hardening for broader host policy./linux-archive-integrityUse when creating, signing, encrypting, listing, comparing, or restoring metadata-preserving tar archives on Debian/Ubuntu or RHEL-family hosts. Covers ACLs, xattrs, incrementals, and verification; use linux-rsync-sync for file-tree mirrors.npx claudepluginhub peterbamuhigire/linux-skills --plugin linuxOther plugins' skills for the same job