/ubuntu-security:scan-schedulefrom ubuntu-security
Schedule periodic malware / rootkit scans and definition refreshes on Ubuntu with systemd timers (cron fallback) — e.g. weekly quick scan, monthly deep scan — writing reports to the user's reports folder, marking the unit failed when there are findings, and sending a desktop notification on desktops. Also lists, changes or removes existing schedules. Use when the user says "schedule virus scans", "run clamav weekly", "automate rkhunter", "set up periodic scans", "what scans are scheduled", or "stop the scheduled scans".
Ships in ubuntu-security. 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.
None: SKILL.md is the whole skill.
ClamAV signatures already refresh on their own through the clamav-freshclam
service; a timer for definitions is only needed for rkhunter / debsecan. Scans that
read the whole system and run rkhunter/chkrootkit need root, so these are
system timers.
systemctl list-timers --all --no-pager | grep -Ei 'ubuntu-security|clam|rkhunter|aide|lynis'
ls /etc/cron.daily /etc/cron.weekly 2>/dev/null | grep -Ei 'rkhunter|aide|chkrootkit'
Ubuntu packages may already schedule things: rkhunter ships
/etc/cron.daily/rkhunter (runs only if CRON_DAILY_RUN="true" in
/etc/default/rkhunter), aide ships a daily check (dailyaidecheck),
chkrootkit ships /etc/cron.daily/chkrootkit (gated by RUN_DAILY in
/etc/chkrootkit/chkrootkit.conf). Report these so nothing runs twice.
Default proposal:
| Job | Cadence | Command |
|---|---|---|
| definitions | daily | av-update.sh |
| quick scan | weekly | av-scan.sh --mode quick |
| deep scan | monthly | av-scan.sh --mode deep |
Plus: reports folder (from config.json, default ~/security-reports) and, on a
desktop, which user gets notifications.
Units must not point into a plugin cache that can move:
sudo install -d /usr/local/lib/ubuntu-security
sudo install -m 0755 "$SCRIPTS"/av-update.sh "$SCRIPTS"/av-scan.sh /usr/local/lib/ubuntu-security/
One service + timer per job. Example for the weekly quick scan (substitute
<user> and <reports>; for a server drop --notify-user):
# /etc/systemd/system/ubuntu-security-quick-scan.service
[Unit]
Description=Weekly quick malware scan (ubuntu-security)
After=network-online.target
[Service]
Type=oneshot
Environment=SUDO_USER=<user>
ExecStart=/usr/local/lib/ubuntu-security/av-scan.sh --mode quick --out <reports> --notify-user <user>
Nice=10
IOSchedulingClass=idle
# /etc/systemd/system/ubuntu-security-quick-scan.timer
[Unit]
Description=Weekly quick malware scan (ubuntu-security)
[Timer]
OnCalendar=weekly
Persistent=true
RandomizedDelaySec=1h
[Install]
WantedBy=timers.target
SUDO_USER tells the script whose home "quick" means and who owns the reports.
Same pattern for ubuntu-security-deep-scan (--mode deep, OnCalendar=monthly)
and ubuntu-security-definitions (av-update.sh --out <reports>,
OnCalendar=daily). Custom cadences take any OnCalendar= expression
(Sun *-*-* 03:00); check with systemd-analyze calendar '<expr>'.
sudo systemctl daemon-reload
sudo systemctl enable --now ubuntu-security-{definitions,quick-scan,deep-scan}.timer
systemctl list-timers --no-pager | grep ubuntu-security
Persistent=true catches up missed runs after a laptop was asleep or off.
av-scan.sh exits 1 when there is anything to review, so the service shows as
failed: visible in systemctl --failed and
journalctl -u ubuntu-security-quick-scan. On servers this is the signal to
watch (or hook OnFailure= to a mail/notify unit the user already has).--notify-user <user> sends a critical notify-send to that user's
session if they are logged in.<reports>/_summary/.To test without waiting: sudo systemctl start ubuntu-security-quick-scan.service,
then systemctl status it.
# /etc/cron.d/ubuntu-security
0 3 * * * root SUDO_USER=<user> /usr/local/lib/ubuntu-security/av-update.sh --out <reports>
0 4 * * 1 root SUDO_USER=<user> /usr/local/lib/ubuntu-security/av-scan.sh --mode quick --out <reports>
0 5 1 * * root SUDO_USER=<user> /usr/local/lib/ubuntu-security/av-scan.sh --mode deep --out <reports>
sudo systemctl disable --now ubuntu-security-{definitions,quick-scan,deep-scan}.timer
sudo rm /etc/systemd/system/ubuntu-security-*.{service,timer}
sudo systemctl daemon-reload
Units written by the older linux-av-manager plugin are named
linux-av-manager-*.timer; offer to replace them rather than run both.
SCRIPTS="${CLAUDE_PLUGIN_ROOT}/scripts". If CLAUDE_PLUGIN_ROOT is unset, clone
https://github.com/danielrosehill/Ubuntu-Security (e.g. to
~/.local/share/ubuntu-security-skills) and use its scripts/.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
18 skills in this plugin
/av-installInstall and initialise malware and rootkit scanning on Ubuntu — the core set (ClamAV engine + clamd daemon + freshclam updater, ClamTk GUI on desktops, rkhunter) and, on request, the advanced layer (Lynis hardening audit, chkrootkit, AIDE file-integrity baseline, debsecan). Detects what is already installed, picks a reports folder, runs the first definitions update and baselines. Use when the user says "install antivirus", "set up clamav", "install rkhunter / lynis / aide / chkrootkit", "set up malware scanning", or when malware-scan finds no scanners installed./av-update-definitionsRefresh signature databases and data for every installed scanner on Ubuntu — freshclam (ClamAV), rkhunter --update, Lynis version check, debsecan CVE list — and report one status line per tool, without re-baselining rkhunter or AIDE. Also explains stale ClamAV signatures (freshclam service down, mirror rate-limiting). Use when the user says "update antivirus definitions", "refresh signatures", "update clamav", "is clamav up to date", or before a scan when signatures are old./complementary-pluginsList and install plugins that complement ubuntu-security: hardware-auth-keys, security-auditor, ubuntu-admin. Use on "related plugins"./fail2banInstall, configure and operate fail2ban on Ubuntu — sshd jail reading the systemd journal, ban time and retry thresholds, ignoring the LAN/VPN so the user can't ban themselves, list active jails and banned IPs, unban an address, and check whether fail2ban is the reason a client can't connect. Use when the user says "set up fail2ban", "protect ssh from brute force", "who is banned", "unban <ip>", "fail2ban banned me", or "is fail2ban working"./fingerprint-setupSet up a fingerprint reader for login, lock screen and sudo on an Ubuntu laptop or desktop — check the reader is supported by libfprint, install fprintd and libpam-fprintd, enroll fingers, enable fingerprint auth with pam-auth-update, verify, and troubleshoot unsupported or flaky readers. Use when the user says "set up the fingerprint reader", "enable fingerprint login", "fingerprint for sudo", "enroll my fingerprint", or "fingerprint reader not working"./firewall-allowAdd a scoped firewall exemption with ufw on an Ubuntu desktop or server — open a port, port range or app profile (OpenSSH, CUPS, KDE Connect, Samba, Syncthing...) to the LAN, a VPN interface, one host, or anywhere, with a comment, without duplicating existing rules, and verify it actually took effect. Use when the user says "open port X", "allow <service> through the firewall", "add a firewall exemption", "let my phone/printer/other machine connect", "unblock <port>", or when another skill finds ufw blocking something it needs.ubuntu-security@danielrosehill is listed by danielrosehill/claude-code-plugins — review the source before installing
npx claudepluginhub danielrosehill/claude-code-plugins --plugin ubuntu-security