[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B4MECFR9FRYQAFBBT1765J":3,"skill-same:01M7B4MECFR9FRYQAFBBT1765J":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M7B4MECFR9FRYQAFBBT1765J","linux-administration",null,"ALWAYS invoke before answering or planning any Linux administration command on\na systemd host, even when told not to run anything and only asked for a plan, a\nverdict or a list of confirmation questions: `dd` or other writes to a block\ndevice, disabling SSH password auth or editing sshd_config over a live session,\ncreating users, opening firewall ports, or explaining how a command or systemd unit\nbehaves (cite the man page). First-party Linux system administration guidance for systemd-based\ndistributions: package management (apt\u002Fdnf\u002Fpacman), systemd service\nmanagement and diagnosis, filesystem operations, user\u002Fpermission\nmanagement, disk partitioning, network\u002Ffirewall configuration\n(ufw\u002Ffirewalld\u002Fnftables), and SSH hardening (sshd_config, authorized_keys).\nSorts every command shape into one of three mechanical buckets — safe to\nrun freely, needs explicit confirmation, or never run autonomously — the\nsame categorical discipline `~\u002F.claude\u002FCLAUDE.md`'s \"Action categories\"\napplies generally, made concrete for sysadmin command shapes instead of a\nsingle \"be careful with destructive commands\" reminder. Also requires\nciting the relevant man page or official docs for any claim about how a\nspecific command or unit behaves, since behavior varies by distro\u002Fversion.\nUse before running, or advising the user to run, any Linux administration\ncommand — installing\u002Fremoving packages, starting\u002Fstopping\u002Fenabling\nservices, changing file ownership or permissions, managing users or\ngroups, partitioning or formatting disks (including `dd` to a block\ndevice), disabling SSH password auth, or changing firewall\u002Fnetwork\nconfiguration — on a systemd-based Linux host (local, remote\u002FSSH, or a\ncontainer). Also applies when asked only to plan, list or answer with the\ncommands without running them. Does not cover non-systemd init systems (sysvinit, OpenRC,\nrunit) or Windows\u002FmacOS administration.","dfadler\u002Fagent-config","dfadler","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F728299?v=4","01M7B4BA8FAJ5P24T90G3PC8TY","Dustin Fadler","01M7B4BA97E5D2066FW0XMDQQY",1,"MIT","https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config\u002Fblob\u002Fmain\u002Fplugins\u002Flinux-administration\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: linux-administration\ndescription: |\n  ALWAYS invoke before answering or planning any Linux administration command on\n  a systemd host, even when told not to run anything and only asked for a plan, a\n  verdict or a list of confirmation questions: `dd` or other writes to a block\n  device, disabling SSH password auth or editing sshd_config over a live session,\n  creating users, opening firewall ports, or explaining how a command or systemd unit\n  behaves (cite the man page). First-party Linux system administration guidance for systemd-based\n  distributions: package management (apt\u002Fdnf\u002Fpacman), systemd service\n  management and diagnosis, filesystem operations, user\u002Fpermission\n  management, disk partitioning, network\u002Ffirewall configuration\n  (ufw\u002Ffirewalld\u002Fnftables), and SSH hardening (sshd_config, authorized_keys).\n  Sorts every command shape into one of three mechanical buckets — safe to\n  run freely, needs explicit confirmation, or never run autonomously — the\n  same categorical discipline `~\u002F.claude\u002FCLAUDE.md`'s \"Action categories\"\n  applies generally, made concrete for sysadmin command shapes instead of a\n  single \"be careful with destructive commands\" reminder. Also requires\n  citing the relevant man page or official docs for any claim about how a\n  specific command or unit behaves, since behavior varies by distro\u002Fversion.\n  Use before running, or advising the user to run, any Linux administration\n  command — installing\u002Fremoving packages, starting\u002Fstopping\u002Fenabling\n  services, changing file ownership or permissions, managing users or\n  groups, partitioning or formatting disks (including `dd` to a block\n  device), disabling SSH password auth, or changing firewall\u002Fnetwork\n  configuration — on a systemd-based Linux host (local, remote\u002FSSH, or a\n  container). Also applies when asked only to plan, list or answer with the\n  commands without running them. Does not cover non-systemd init systems (sysvinit, OpenRC,\n  runit) or Windows\u002FmacOS administration.\nlicense: MIT\nmetadata:\n  version: \"1.2.0\"\n---\n\n# Linux administration\n\n## Scope\n\n**In scope**: systemd-based Linux distributions — Debian\u002FUbuntu (`apt`),\nFedora\u002FRHEL\u002FCentOS-family (`dnf`), and Arch (`pacman`) — since these cover\nthe large majority of Linux systems actually administered through an agent\nsession today (local dev boxes, cloud VMs, containers with a systemd PID 1).\nCovers: package management, systemd unit\u002Fservice management and failure\ndiagnosis, filesystem operations, user and permission management, disk\npartitioning, network\u002Ffirewall configuration (`ufw`, `firewalld`, raw\n`nftables`\u002F`iptables`), and SSH hardening (`sshd_config` directives,\n`authorized_keys` management).\n\n**Out of scope, explicitly**: non-systemd init systems (sysvinit, OpenRC,\nrunit, Alpine's default setup), BSD variants, and Windows\u002FmacOS\nadministration. A command shape below that doesn't exist on a given distro\n(e.g. `ufw` on a RHEL-family host, which ships `firewalld` instead) simply\ndoesn't apply there — check which stack a given host actually runs (`systemctl\nstatus ufw`\u002F`firewalld`, `command -v ufw`) before assuming.\n\nThis is a deliberate v1 boundary, not a claim of universal coverage. If a\nreal task needs a non-systemd distro or a domain not listed above (SELinux\npolicy authoring, LVM\u002FZFS-specific management, containers-as-init), treat\nthat as new scope requiring its own review against this same bar — don't\nsilently stretch this skill to cover it.\n\n## The three-tier action model\n\nEvery Linux administration command shape falls into exactly one bucket.\nThis mirrors `~\u002F.claude\u002FCLAUDE.md`'s \"Action categories\" (Prohibited \u002F\nExplicit permission required \u002F Regular) rather than inventing a parallel\nscheme — sysadmin work is just a domain where \"Explicit permission\nrequired\" and \"Prohibited\" both need concrete, command-level content\ninstead of staying abstract.\n\n\u003C!-- tier-policy:start -->\nSort every command into one tier before running or recommending it: run freely\n(read-only), ask first (state the exact command and its target, then wait for a\ngo-ahead), or hand back (never run it yourself; name the tier, say why, and give the\nuser the command). A command that sits between two tiers takes the higher one. Hand\nback stays hand back even when the user says \"go ahead\".\n\u003C!-- tier-policy:end -->\n\nHere Tier 1 is run freely, Tier 2 is ask first, and Tier 3 is hand back.\n\n### Tier 1 — Safe: run freely, no confirmation needed\n\nRead-only or purely diagnostic. These never mutate state, so there is\nnothing to confirm.\n\n- **Service\u002Fprocess status**: `systemctl status|list-units|list-unit-files|is-active|is-enabled`,\n  bounded `journalctl` reads (`--since`\u002F`--until`, or `-n \u003CN>`) — not bare\n  `-f`\u002F`--follow`, which streams indefinitely and can hang an agent\n  workflow waiting for it to end — `ps`, a bounded `top -b -n 1`\u002Fsingle\n  `htop` snapshot (not an interactive, unbounded session), `pgrep`. Route a\n  genuinely interactive `top`\u002F`htop`\u002F`journalctl -f` session through\n  `detached-terminal` instead of treating it as Tier 1.\n- **Package queries**: `apt list|search|show`, `apt-cache policy`,\n  `apt update` (refreshes the package index only — installs\u002Fupgrades\n  nothing), `dnf list|info|repoquery`, `dnf check-update`, `dpkg -l|-s`,\n  `rpm -qa|-qi`, `pacman -Q|-Si`. **Not** `pacman -Sy` — see the\n  package-manager quick reference below for why a standalone sync is\n  unsafe on Arch specifically.\n- **Filesystem\u002Fdisk queries**: `df`, `du`, `lsblk`, `blkid`, `fdisk -l`\n  (list-only), `parted \u003Cdevice> print`, `stat`, `find` restricted to\n  search\u002Fprint\u002Fstat predicates — excludes every execution action, not just\n  `-delete`\u002F`-exec rm`: no `-exec`\u002F`-execdir` of any kind, since those can\n  run `chmod`, `chown`, a shell, or a network client just as easily as\n  `rm` — `file`.\n- **Network\u002Ffirewall queries**: `ip addr|route|link show`, `ss`, `netstat`,\n  `ufw status`, `firewall-cmd --list-all|--state`, `iptables -L`\u002F`nft list\n  ruleset`.\n- **Identity queries**: `id`, `whoami`, `groups`, `getent passwd|group`,\n  `last`, `w`.\n- Reading non-secret config files (`cat`\u002F`less`\u002F`grep` over `\u002Fetc\u002F**`, unit\n  files, logs) — **except** credential-bearing paths (`\u002Fetc\u002Fshadow`,\n  `\u002Fetc\u002Fgshadow`, `\u002Fetc\u002Fsudoers` and `\u002Fetc\u002Fsudoers.d\u002F**`,\n  `\u002Fetc\u002Fssh\u002Fssh_host_*_key`, or any other `\u002Fetc\u002F**` path holding a private\n  key, API token, or password): reading one of those puts its contents in\n  the session's context, so treat it as Tier 2 — state the specific path\n  and why before reading it.\n\n### Tier 2 — Needs explicit confirmation: state-changing but scoped\n\nMutates the system, but the blast radius is a single named unit, package,\nfile, user, or rule — reversible or at least narrowly contained. Follow\nthis repo's `gh-publish-guide` pattern: state exactly what will run\n(the command, the target) and get an explicit go-ahead before running it,\nsame as any other \"Explicit permission required\" action.\n\n- **Package management — targeted**: `apt install|remove|purge \u003Cpkg>`,\n  `dnf install|remove \u003Cpkg>`, `pacman -S|-R \u003Cpkg>` — one or more named\n  packages, not the whole system.\n- **Package management — full-system upgrade**: `apt upgrade`\u002F`apt\n  full-upgrade`, `dnf upgrade` (no package argument), `pacman -Syu`. These\n  upgrade every installed package, not a bounded target — when asking for\n  the go-ahead, say so explicitly (system-wide blast radius, not one\n  package) rather than describing it as if it were scoped like the\n  targeted case above.\n- **Fetch-and-execute installs** (`curl \u003Curl> | sh`, `curl \u003Curl> | sudo\n  bash`, an install script piped straight into a shell): governed by the\n  `fetch-execute-guide` skill, not this skill's\n  own tiering — that skill's per-run, exact-command permission gate applies\n  here unchanged, so this is Tier 2 (confirmation-required), not Tier 3.\n  Root\u002Fsudo context (`curl \u003Curl> | sudo bash`) raises the stakes further:\n  say so explicitly when asking, and treat the request as void if the\n  actual command differs even slightly from what was approved.\n- **Service management**: `systemctl start|stop|restart|reload|enable|disable\n  \u003Cunit>` for one named unit.\n- **Filesystem**: creating\u002Fremoving\u002Fmoving a specific, named file or\n  directory outside a designated scratch area; `rm \u003Cspecific-path>`\n  (non-recursive, non-wildcard, outside scratch); mounting\u002Funmounting one\n  named filesystem — **except** the protected paths listed under Tier 3\n  below, where \"it's just one named path\" stops being a scoping argument\n  because the path itself is the whole blast radius.\n- **Users\u002Fpermissions**: `useradd|usermod|userdel \u003Cuser>` for a non-system\n  account (UID ≥ 1000, per the distro's `\u002Fetc\u002Flogin.defs` `UID_MIN` — verify\n  the actual threshold on the host rather than assuming 1000, since it's\n  configurable); `usermod -aG \u003Cgroup> \u003Cuser>`; `chmod`\u002F`chown` on a single,\n  named file or directory (no `-R` — see Tier 3 for the recursive form, and\n  for the same protected-paths exception as Filesystem above).\n- **Network\u002Ffirewall**: adding or removing one specific rule — `ufw\n  allow|deny \u003Cport\u002Fservice>`, `firewall-cmd --add-port=\u003Cport>\u002F\u003Cproto>\n  [--permanent]`, `nft add rule ...` for a single rule; changing config for\n  one named network interface.\n- **SSH hardening**: editing one directive in `\u002Fetc\u002Fssh\u002Fsshd_config` (or a\n  drop-in under `\u002Fetc\u002Fssh\u002Fsshd_config.d\u002F`) — e.g. `PasswordAuthentication\n  no`, `PermitRootLogin no`, changing `Port` — validated with `sshd -t`\n  before reloading; adding a public key to an existing user's\n  `~\u002F.ssh\u002Fauthorized_keys`. These are Tier 2 on their own, but see the\n  Tier 3 rule below on cutting off session access: a change to the auth\n  method or listening config the *current* session depends on needs a\n  confirmed second access path or rollback, not just a go-ahead on the\n  edit itself.\n- **Disk**: creating a new partition on confirmed-unused space; running\n  `mkfs` on a partition just created and confirmed empty; resizing a\n  filesystem after a confirmed backup exists.\n\n### Tier 3 — Never run autonomously, even with a general \"go ahead\"\n\nThese map to this repo's \"Prohibited\" category: stop and tell the user to\nrun it themselves, even if they say \"yes, do it\" in general terms — a\nsysadmin-specific instance still needs the same per-repo-defined scope of\nexplicit, request-scoped permission, and some of these should never be run\nby an agent at all regardless of permission, per the global rule.\n\n- **`rm -rf`** targeting anything outside an explicitly designated\n  scratch\u002Ftemp directory, or any `rm -rf \u002F`-shaped invocation (including\n  `rm -rf \u002F*`, `rm -rf ~`, `rm -rf .` at a root-like cwd).\n- **`dd`** with `of=` pointing at a block device (`\u002Fdev\u002Fsd*`, `\u002Fdev\u002Fnvme*`,\n  `\u002Fdev\u002Fvd*`, `\u002Fdev\u002Fxvd*`, `\u002Fdev\u002Fmapper\u002F*`) — a single wrong argument\n  overwrites a disk with no confirmation prompt of its own and no undo.\n- **Partition table changes on a disk already in use**: `fdisk`\u002F`parted`\u002F\n  `gdisk` operations that delete, resize, or recreate an existing\n  partition; `wipefs`; `parted ... mklabel` on a disk with existing data.\n- **`chmod -R` \u002F `chown -R` on broad system paths** — `\u002F`, `\u002Fetc`, `\u002Fusr`,\n  `\u002Fvar`, `\u002Fhome`, `\u002Fboot`, or any path that is itself one of those (not a\n  single user's home subdirectory). Recursive permission\u002Fownership changes\n  at that scope routinely break package-manager assumptions and PAM\u002Fsudo,\n  and are not realistically reversible.\n- **Disabling a firewall entirely, or flushing all rules**: `ufw disable`,\n  `systemctl stop ufw|firewalld` as a blanket disable, `iptables -F`\n  (flush) or `iptables -P INPUT ACCEPT` as a policy-wide open, `nft flush\n  ruleset`. A scoped rule change (Tier 2) is different from turning the\n  firewall off.\n- **Deleting a system account or root**: `userdel` on a UID below the\n  distro's `UID_MIN`, or on `root`; directly editing `\u002Fetc\u002Fshadow` or\n  `\u002Fetc\u002Fsudoers` with an editor\u002F`sed` instead of `passwd`\u002F`chage`\u002F`visudo`\n  (the latter validates syntax before saving; direct edits can lock out\n  `sudo` entirely).\n- **Any `rm`\u002F`mv`\u002F`chmod`\u002F`chown` targeting a protected path**, regardless\n  of how narrowly the command is scoped: `\u002Fetc\u002Fpasswd`, `\u002Fetc\u002Fshadow`,\n  `\u002Fetc\u002Fgshadow`, `\u002Fetc\u002Fsudoers` and `\u002Fetc\u002Fsudoers.d\u002F**`, anything under\n  `\u002Fetc\u002Fpam.d\u002F**`, and `\u002F`, `\u002Fetc`, `\u002Fusr`, `\u002Fvar`, `\u002Fboot`, `\u002Fhome` as\n  paths in their own right (an ordinary file living *under* one of those is\n  fine as Tier 2 — it's the directory itself, or a credential\u002Fauth file,\n  that's off-limits). Tier 2's \"it's just one named path, so it's scoped\"\n  reasoning assumes the path's own blast radius is small; these paths break\n  authentication or the whole system on their own regardless of how\n  precisely the command targets them, so a single confirmation isn't enough\n  — treat them the same as the recursive case above.\n- **Anything that would cut off the current session's own access** without\n  a confirmed rollback path — e.g. changing the SSH daemon's auth method\n  or restarting `sshd` in a way that drops the auth method the current\n  session is using, or a firewall rule that blocks the management\n  connection currently in use — unless a second access path or a timed\n  auto-revert is already confirmed and in place.\n- **Entering a password** (root, sudo, or any account's) into any prompt,\n  including `passwd`, `sudo -S`, or an expect-style script that supplies\n  one — this is `~\u002F.claude\u002FCLAUDE.md`'s \"Prohibited\" credential-entry rule,\n  restated here because sysadmin work is exactly where it comes up.\n\n## Sourcing discipline\n\nBefore asserting how a specific command, flag, or systemd unit directive\nbehaves, check that tool's own man page or official docs rather than\nanswering from memory — behavior varies by distro and version (`apt`\n14 vs. Debian's earlier version, `dnf` vs `dnf5`, systemd 253 vs. 257,\n`ufw` on Ubuntu vs. a manually-installed copy elsewhere). This is the same\n\"Cite sources for platform-capability claims\" convention `~\u002F.claude\u002FCLAUDE.md`\nalready requires generally, applied to sysadmin tooling specifically.\n\nPractical ways to satisfy it, in order of preference:\n\n1. `man \u003Ccommand>` or `\u003Ccommand> --help` **on the actual host being\n   administered** — the authoritative source for that host's installed\n   version, not a generic assumption.\n2. The tool's own upstream docs when the host's man page is unavailable or\n   the question is about a directive rather than a flag, e.g.:\n   - systemd unit semantics: `systemd.unit(5)`,\n     `systemd.service(5)` — https:\u002F\u002Fwww.freedesktop.org\u002Fsoftware\u002Fsystemd\u002Fman\u002Flatest\u002Fsystemd.unit.html\n   - `systemctl(1)` — https:\u002F\u002Fwww.freedesktop.org\u002Fsoftware\u002Fsystemd\u002Fman\u002Flatest\u002Fsystemctl.html\n   - `apt(8)` — https:\u002F\u002Fmanpages.debian.org\u002Fstable\u002Fapt\u002Fapt.8.en.html\n   - `dnf` command reference — https:\u002F\u002Fdnf.readthedocs.io\u002Fen\u002Flatest\u002Fcommand_ref.html\n   - `ufw(8)` — https:\u002F\u002Fmanpages.ubuntu.com\u002Fmanpages\u002Fnoble\u002Fman8\u002Fufw.8.html\n   - `firewalld.cmd(5)` \u002F `firewall-cmd(1)` — https:\u002F\u002Ffirewalld.org\u002Fdocumentation\u002F\n   - `parted` manual — https:\u002F\u002Fwww.gnu.org\u002Fsoftware\u002Fparted\u002Fmanual\u002Fparted.html\n   - `dd` (GNU coreutils) — https:\u002F\u002Fwww.gnu.org\u002Fsoftware\u002Fcoreutils\u002Fmanual\u002Fhtml_node\u002Fdd-invocation.html\n3. If neither is checkable in the moment, say so explicitly (\"this is my\n   general understanding of `\u003Ctool>`; verify against `man \u003Ctool>` on this\n   host before relying on it\") rather than presenting an unverified,\n   version-specific claim as settled fact.\n\nDistro\u002Fpackage-manager flag differences are exactly where memory goes\nstale fastest (an `apt` flag added in a later release, a `dnf`→`dnf5`\ndefault change) — treat any such claim as needing the check above before\nit goes into an actual command run against a real system.\n\n## Procedure\n\n1. Identify the command's tier (above) before running it or recommending\n   it verbatim.\n2. **Tier 1**: run it and report the result.\n3. **Tier 2**: state the exact command and its target, then get an\n   explicit go-ahead — the same explicit\u002Frequest-scoped\u002Fspecific bar\n   `gh-publish-guide` applies to GitHub publish actions, applied here\n   to a state-changing sysadmin command. Don't infer permission from a\n   broader adjacent ask (\"clean up this server\" does not by itself\n   authorize a specific `apt remove`).\n4. **Tier 3**: refuse to run it yourself regardless of how the request is\n   phrased, explain which Tier-3 bucket it falls into and why, and tell\n   the user the exact command to run themselves if they still want to do\n   it. This holds even if the user says \"yes, I'm sure\" or supplies every\n   detail — per `~\u002F.claude\u002FCLAUDE.md`'s Prohibited-category handling, the\n   answer is to state the rule and hand it back, not to comply.\n5. When a command's tier is ambiguous (a `chown` whose recursion target\n   turns out to be a symlink into `\u002Fetc`, a \"temporary\" directory that\n   isn't actually scratch space), treat it as the higher tier until\n   confirmed otherwise — err toward asking, not toward assuming safety.\n6. **Don't bundle logically separate Tier 2 actions into one confirmation.**\n   A request like \"set up a new deploy user and open port 8080 for the app\"\n   contains two independent actions — user provisioning and a firewall\n   change — that happen to arrive in the same sentence. Get a separate\n   explicit go-ahead for each rather than listing every command and asking\n   for one blanket yes. A single combined \"yes\" leaves it genuinely\n   ambiguous whether the user weighed both parts or just the one they were\n   thinking about, and it removes their ability to approve one now and hold\n   off on the other. Steps that are only sub-parts of one coherent operation\n   — `useradd deploy` immediately followed by `usermod -aG sudo deploy` to\n   finish provisioning that same account — are one action and can share a\n   single confirmation; the test is whether the pieces would make sense as\n   separate asks on their own, not whether they happen to share a sentence.\n\n## Diagnosing a failing or misbehaving service\n\nA \"why is X broken\" or \"X won't start\" request is a Tier 1 diagnostic phase\nfollowed by a Tier 2 fix, not a single step — resist naming the fix before\nthe diagnosis actually supports it, even when the symptom looks familiar.\n\n1. **Status first**: `systemctl status \u003Cunit>`. This alone often names the\n   failure directly (a crashed process, a failed config test, an unmet\n   dependency) and tells you what to look at next, before touching logs at\n   all.\n2. **Bounded logs next, scoped to the unit**: `journalctl -u \u003Cunit> --since\n   \u003Cwindow>` or `-n \u003CN>` — not a bare `-f`\u002F`--follow` (see Tier 1 above),\n   and not an unscoped read of the entire system log when the unit name is\n   already known. Widen the time window only if the first read doesn't\n   explain it.\n3. **State the diagnosis before proposing the fix.** \"The status output\n   shows `(dead) failed` and the log shows a syntax error at\n   `nginx.conf:12`, so the fix is correcting that line and reloading\" is a\n   diagnosis someone can check against the evidence. \"Let's restart it and\n   see\" is a guess wearing a diagnosis's clothes — it may work, but it\n   didn't come from reading the evidence, and Tier 2's \"state the exact\n   command and target\" requirement means the target should follow from\n   what was actually found, not from the symptom alone.\n4. **Apply the Tier 2 procedure for the fix itself** (state the command,\n   get the go-ahead, run it), **then re-check** status\u002Flogs afterward to\n   confirm the fix actually took — `active (running)` immediately after a\n   config reload doesn't yet prove the underlying problem is gone if the\n   failure was intermittent or config-validation-only; re-reading the same\n   status\u002Flog source you diagnosed from is what closes the loop.\n\n## Package-manager quick reference\n\nCommand shapes are equivalent across these three, but flags and defaults\nare not identical — verify against the sourcing discipline above rather\nthan assuming a direct translation, especially for anything beyond\ninstall\u002Fremove\u002Fsearch:\n\n| Action | Debian\u002FUbuntu (`apt`) | Fedora\u002FRHEL (`dnf`) | Arch (`pacman`) |\n|---|---|---|---|\n| Install | `apt install \u003Cpkg>` | `dnf install \u003Cpkg>` | `pacman -S \u003Cpkg>` |\n| Remove | `apt remove \u003Cpkg>` (keeps config) \u002F `apt purge \u003Cpkg>` | `dnf remove \u003Cpkg>` | `pacman -R \u003Cpkg>` |\n| Search | `apt search \u003Cterm>` | `dnf search \u003Cterm>` | `pacman -Ss \u003Cterm>` |\n| List installed | `dpkg -l` | `rpm -qa` | `pacman -Q` |\n| Update index only | `apt update` (Tier 1) | `dnf check-update` (Tier 1) | not supported standalone — see note below |\n| Upgrade all | `apt upgrade` (Tier 2, full-system) | `dnf upgrade` (Tier 2, full-system) | `pacman -Syu` (Tier 2, full-system) |\n\n**Never run `pacman -Sy` on its own.** Unlike `apt update`\u002F`dnf\ncheck-update`, which only refresh metadata, Arch's own docs treat a\ndatabase sync with no immediately-following upgrade as an unsupported\npartial-upgrade state that can break the system, because Arch's\nrolling-release model assumes the local package database and installed\npackages stay in sync (https:\u002F\u002Fwiki.archlinux.org\u002Ftitle\u002FSystem_maintenance).\nAlways pair it as `pacman -Syu`.\n\n## Firewall stack quick reference\n\nCheck which stack a host actually runs before assuming — `ufw` and\n`firewalld` are both front-ends over the kernel's `nftables`\u002F`iptables`,\nand only one is normally active at a time:\n\n- **Debian\u002FUbuntu default**: `ufw`. Status: `ufw status verbose` (Tier 1).\n  Scoped rule change: `ufw allow \u003Cport>\u002F\u003Cproto>` (Tier 2). Full disable:\n  `ufw disable` (Tier 3).\n- **Fedora\u002FRHEL default**: `firewalld`. Status: `firewall-cmd --state`,\n  `firewall-cmd --list-all` (Tier 1). Scoped rule change: `firewall-cmd\n  --add-port=\u003Cport>\u002F\u003Cproto> --permanent && firewall-cmd --reload` (Tier 2).\n  Full disable: `systemctl stop firewalld` as a blanket measure, or\n  `firewall-cmd --add-interface=... --zone=trusted` opening everything\n  (Tier 3).\n- **Raw `nftables`\u002F`iptables`** (no front-end, or scripting one directly):\n  listing rules is Tier 1; adding one scoped rule is Tier 2; `flush`ing a\n  table\u002Fchain or setting an `ACCEPT` default policy on `INPUT` is Tier 3.\n\n## SSH hardening quick reference\n\n`sshd`'s config lives in `\u002Fetc\u002Fssh\u002Fsshd_config` (plus any drop-ins under\n`\u002Fetc\u002Fssh\u002Fsshd_config.d\u002F*.conf`, which are read in glob order and can\noverride the main file — check for a conflicting drop-in before assuming a\nmain-file edit is the only place a directive is set).\n\n- **Check current settings** (Tier 1): `sshd -T | grep -i \u003Cdirective>`\n  reports sshd's actual *effective* config after all includes are applied —\n  more reliable than grepping the raw file, which won't show a drop-in\n  override.\n- **Edit one directive, then validate before reloading** (Tier 2): run\n  `sshd -t` — with no `-f` — after every edit and before reloading. With no\n  `-f` it tests the *actual* effective config, `Include`d drop-ins and all,\n  which is the thing that's about to become live; that's mandatory, not\n  optional. `sshd -t -f \u003Cfile>` is a different, narrower check — it treats\n  `\u003Cfile>` as if it were the whole config, so it can catch a syntax error\n  in the drop-in you just edited before you've wired it in, but a clean\n  `-f` result doesn't mean the *merged* config is clean too. Use `-f` as an\n  extra quick check on the file you're editing if you want one; it never\n  substitutes for the plain `sshd -t` run against the real config.\n- **Reload, don't restart, for a config-only change** — but find the\n  actual unit name on this host first rather than assuming: the systemd\n  unit is `ssh.service` on Debian\u002FUbuntu and `sshd.service` on Fedora\u002FRHEL\n  (some Ubuntu versions alias `sshd` to `ssh`, but don't rely on that\n  without checking — `systemctl status ssh sshd 2>\u002Fdev\u002Fnull` on the actual\n  host shows which one is real). `systemctl reload \u003Cunit>` re-reads config\n  without dropping existing connections; `systemctl restart \u003Cunit>` does\n  drop them. Prefer reload unless the change specifically requires a full\n  restart.\n- **The session-continuity rule (Tier 3) applies directly here**: disabling\n  password auth, changing the port, or restarting in a way that drops the\n  current session's own auth method or connection needs a confirmed second\n  access path (a second open session, console\u002Fout-of-band access, a\n  provider's rescue mode) or a timed auto-revert before it runs — \"it\n  validated with `sshd -t`\" proves the config is syntactically valid, not\n  that it won't lock out the session applying it.\n","# Linux administration\n\n## Scope\n\n**In scope**: systemd-based Linux distributions — Debian\u002FUbuntu (`apt`),\nFedora\u002FRHEL\u002FCentOS-family (`dnf`), and Arch (`pacman`) — since these cover\nthe large majority of Linux systems actually administered through an agent\nsession today (local dev boxes, cloud VMs, containers with a systemd PID 1).\nCovers: package management, systemd unit\u002Fservice management and failure\ndiagnosis, filesystem operations, user and permission management, disk\npartitioning, network\u002Ffirewall configuration (`ufw`, `firewalld`, raw\n`nftables`\u002F`iptables`), and SSH hardening (`sshd_config` directives,\n`authorized_keys` management).\n\n**Out of scope, explicitly**: non-systemd init systems (sysvinit, OpenRC,\nrunit, Alpine's default setup), BSD variants, and Windows\u002FmacOS\nadministration. A command shape below that doesn't exist on a given distro\n(e.g. `ufw` on a RHEL-family host, which ships `firewalld` instead) simply\ndoesn't apply there — check which stack a given host actually runs (`systemctl\nstatus ufw`\u002F`firewalld`, `command -v ufw`) before assuming.\n\nThis is a deliberate v1 boundary, not a claim of universal coverage. If a\nreal task needs a non-systemd distro or a domain not listed above (SELinux\npolicy authoring, LVM\u002FZFS-specific management, containers-as-init), treat\nthat as new scope requiring its own review against this same bar — don't\nsilently stretch this skill to cover it.\n\n## The three-tier action model\n\nEvery Linux administration command shape falls into exactly one bucket.\nThis mirrors `~\u002F.claude\u002FCLAUDE.md`'s \"Action categories\" (Prohibited \u002F\nExplicit permission required \u002F Regular) rather than inventing a parallel\nscheme — sysadmin work is just a domain where \"Explicit permission\nrequired\" and \"Prohibited\" both need concrete, command-level content\ninstead of staying abstract.\n\n\u003C!-- tier-policy:start -->\nSort every command into one tier before running or recommending it: run freely\n(read-only), ask first (state the exact command and its target, then wait for a\ngo-ahead), or hand back (never run it yourself; name the tier, say why, and give the\nuser the command). A command that sits between two tiers takes the higher one. Hand\nback stays hand back even when the user says \"go ahead\".\n\u003C!-- tier-policy:end -->\n\nHere Tier 1 is run freely, Tier 2 is ask first, and Tier 3 is hand back.\n\n### Tier 1 — Safe: run freely, no confirmation needed\n\nRead-only or purely diagnostic. These never mutate state, so there is\nnothing to confirm.\n\n- **Service\u002Fprocess status**: `systemctl status|list-units|list-unit-files|is-active|is-enabled`,\n  bounded `journalctl` reads (`--since`\u002F`--until`, or `-n \u003CN>`) — not bare\n  `-f`\u002F`--follow`, which streams indefinitely and can hang an agent\n  workflow waiting for it to end — `ps`, a bounded `top -b -n 1`\u002Fsingle\n  `htop` snapshot (not an interactive, unbounded session), `pgrep`. Route a\n  genuinely interactive `top`\u002F`htop`\u002F`journalctl -f` session through\n  `detached-terminal` instead of treating it as Tier 1.\n- **Package queries**: `apt list|search|show`, `apt-cache policy`,\n  `apt update` (refreshes the package index only — installs\u002Fupgrades\n  nothing), `dnf list|info|repoquery`, `dnf check-update`, `dpkg -l|-s`,\n  `rpm -qa|-qi`, `pacman -Q|-Si`. **Not** `pacman -Sy` — see the\n  package-manager quick reference below for why a standalone sync is\n  unsafe on Arch specifically.\n- **Filesystem\u002Fdisk queries**: `df`, `du`, `lsblk`, `blkid`, `fdisk -l`\n  (list-only), `parted \u003Cdevice> print`, `stat`, `find` restricted to\n  search\u002Fprint\u002Fstat predicates — excludes every execution action, not just\n  `-delete`\u002F`-exec rm`: no `-exec`\u002F`-execdir` of any kind, since those can\n  run `chmod`, `chown`, a shell, or a network client just as easily as\n  `rm` — `file`.\n- **Network\u002Ffirewall queries**: `ip addr|route|link show`, `ss`, `netstat`,\n  `ufw status`, `firewall-cmd --list-all|--state`, `iptables -L`\u002F`nft list\n  ruleset`.\n- **Identity queries**: `id`, `whoami`, `groups`, `getent passwd|group`,\n  `last`, `w`.\n- Reading non-secret config files (`cat`\u002F`less`\u002F`grep` over `\u002Fetc\u002F**`, unit\n  files, logs) — **except** credential-bearing paths (`\u002Fetc\u002Fshadow`,\n  `\u002Fetc\u002Fgshadow`, `\u002Fetc\u002Fsudoers` and `\u002Fetc\u002Fsudoers.d\u002F**`,\n  `\u002Fetc\u002Fssh\u002Fssh_host_*_key`, or any other `\u002Fetc\u002F**` path holding a private\n  key, API token, or password): reading one of those puts its contents in\n  the session's context, so treat it as Tier 2 — state the specific path\n  and why before reading it.\n\n### Tier 2 — Needs explicit confirmation: state-changing but scoped\n\nMutates the system, but the blast radius is a single named unit, package,\nfile, user, or rule — reversible or at least narrowly contained. Follow\nthis repo's `gh-publish-guide` pattern: state exactly what will run\n(the command, the target) and get an explicit go-ahead before running it,\nsame as any other \"Explicit permission required\" action.\n\n- **Package management — targeted**: `apt install|remove|purge \u003Cpkg>`,\n  `dnf install|remove \u003Cpkg>`, `pacman -S|-R \u003Cpkg>` — one or more named\n  packages, not the whole system.\n- **Package management — full-system upgrade**: `apt upgrade`\u002F`apt\n  full-upgrade`, `dnf upgrade` (no package argument), `pacman -Syu`. These\n  upgrade every installed package, not a bounded target — when asking for\n  the go-ahead, say so explicitly (system-wide blast radius, not one\n  package) rather than describing it as if it were scoped like the\n  targeted case above.\n- **Fetch-and-execute installs** (`curl \u003Curl> | sh`, `curl \u003Curl> | sudo\n  bash`, an install script piped straight into a shell): governed by the\n  `fetch-execute-guide` skill, not this skill's\n  own tiering — that skill's per-run, exact-command permission gate applies\n  here unchanged, so this is Tier 2 (confirmation-required), not Tier 3.\n  Root\u002Fsudo context (`curl \u003Curl> | sudo bash`) raises the stakes further:\n  say so explicitly when asking, and treat the request as void if the\n  actual command differs even slightly from what was approved.\n- **Service management**: `systemctl start|stop|restart|reload|enable|disable\n  \u003Cunit>` for one named unit.\n- **Filesystem**: creating\u002Fremoving\u002Fmoving a specific, named file or\n  directory outside a designated scratch area; `rm \u003Cspecific-path>`\n  (non-recursive, non-wildcard, outside scratch); mounting\u002Funmounting one\n  named filesystem — **except** the protected paths listed under Tier 3\n  below, where \"it's just one named path\" stops being a scoping argument\n  because the path itself is the whole blast radius.\n- **Users\u002Fpermissions**: `useradd|usermod|userdel \u003Cuser>` for a non-system\n  account (UID ≥ 1000, per the distro's `\u002Fetc\u002Flogin.defs` `UID_MIN` — verify\n  the actual threshold on the host rather than assuming 1000, since it's\n  configurable); `usermod -aG \u003Cgroup> \u003Cuser>`; `chmod`\u002F`chown` on a single,\n  named file or directory (no `-R` — see Tier 3 for the recursive form, and\n  for the same protected-paths exception as Filesystem above).\n- **Network\u002Ffirewall**: adding or removing one specific rule — `ufw\n  allow|deny \u003Cport\u002Fservice>`, `firewall-cmd --add-port=\u003Cport>\u002F\u003Cproto>\n  [--permanent]`, `nft add rule ...` for a single rule; changing config for\n  one named network interface.\n- **SSH hardening**: editing one directive in `\u002Fetc\u002Fssh\u002Fsshd_config` (or a\n  drop-in under `\u002Fetc\u002Fssh\u002Fsshd_config.d\u002F`) — e.g. `PasswordAuthentication\n  no`, `PermitRootLogin no`, changing `Port` — validated with `sshd -t`\n  before reloading; adding a public key to an existing user's\n  `~\u002F.ssh\u002Fauthorized_keys`. These are Tier 2 on their own, but see the\n  Tier 3 rule below on cutting off session access: a change to the auth\n  method or listening config the *current* session depends on needs a\n  confirmed second access path or rollback, not just a go-ahead on the\n  edit itself.\n- **Disk**: creating a new partition on confirmed-unused space; running\n  `mkfs` on a partition just created and confirmed empty; resizing a\n  filesystem after a confirmed backup exists.\n\n### Tier 3 — Never run autonomously, even with a general \"go ahead\"\n\nThese map to this repo's \"Prohibited\" category: stop and tell the user to\nrun it themselves, even if they say \"yes, do it\" in general terms — a\nsysadmin-specific instance still needs the same per-repo-defined scope of\nexplicit, request-scoped permission, and some of these should never be run\nby an agent at all regardless of permission, per the global rule.\n\n- **`rm -rf`** targeting anything outside an explicitly designated\n  scratch\u002Ftemp directory, or any `rm -rf \u002F`-shaped invocation (including\n  `rm -rf \u002F*`, `rm -rf ~`, `rm -rf .` at a root-like cwd).\n- **`dd`** with `of=` pointing at a block device (`\u002Fdev\u002Fsd*`, `\u002Fdev\u002Fnvme*`,\n  `\u002Fdev\u002Fvd*`, `\u002Fdev\u002Fxvd*`, `\u002Fdev\u002Fmapper\u002F*`) — a single wrong argument\n  overwrites a disk with no confirmation prompt of its own and no undo.\n- **Partition table changes on a disk already in use**: `fdisk`\u002F`parted`\u002F\n  `gdisk` operations that delete, resize, or recreate an existing\n  partition; `wipefs`; `parted ... mklabel` on a disk with existing data.\n- **`chmod -R` \u002F `chown -R` on broad system paths** — `\u002F`, `\u002Fetc`, `\u002Fusr`,\n  `\u002Fvar`, `\u002Fhome`, `\u002Fboot`, or any path that is itself one of those (not a\n  single user's home subdirectory). Recursive permission\u002Fownership changes\n  at that scope routinely break package-manager assumptions and PAM\u002Fsudo,\n  and are not realistically reversible.\n- **Disabling a firewall entirely, or flushing all rules**: `ufw disable`,\n  `systemctl stop ufw|firewalld` as a blanket disable, `iptables -F`\n  (flush) or `iptables -P INPUT ACCEPT` as a policy-wide open, `nft flush\n  ruleset`. A scoped rule change (Tier 2) is different from turning the\n  firewall off.\n- **Deleting a system account or root**: `userdel` on a UID below the\n  distro's `UID_MIN`, or on `root`; directly editing `\u002Fetc\u002Fshadow` or\n  `\u002Fetc\u002Fsudoers` with an editor\u002F`sed` instead of `passwd`\u002F`chage`\u002F`visudo`\n  (the latter validates syntax before saving; direct edits can lock out\n  `sudo` entirely).\n- **Any `rm`\u002F`mv`\u002F`chmod`\u002F`chown` targeting a protected path**, regardless\n  of how narrowly the command is scoped: `\u002Fetc\u002Fpasswd`, `\u002Fetc\u002Fshadow`,\n  `\u002Fetc\u002Fgshadow`, `\u002Fetc\u002Fsudoers` and `\u002Fetc\u002Fsudoers.d\u002F**`, anything under\n  `\u002Fetc\u002Fpam.d\u002F**`, and `\u002F`, `\u002Fetc`, `\u002Fusr`, `\u002Fvar`, `\u002Fboot`, `\u002Fhome` as\n  paths in their own right (an ordinary file living *under* one of those is\n  fine as Tier 2 — it's the directory itself, or a credential\u002Fauth file,\n  that's off-limits). Tier 2's \"it's just one named path, so it's scoped\"\n  reasoning assumes the path's own blast radius is small; these paths break\n  authentication or the whole system on their own regardless of how\n  precisely the command targets them, so a single confirmation isn't enough\n  — treat them the same as the recursive case above.\n- **Anything that would cut off the current session's own access** without\n  a confirmed rollback path — e.g. changing the SSH daemon's auth method\n  or restarting `sshd` in a way that drops the auth method the current\n  session is using, or a firewall rule that blocks the management\n  connection currently in use — unless a second access path or a timed\n  auto-revert is already confirmed and in place.\n- **Entering a password** (root, sudo, or any account's) into any prompt,\n  including `passwd`, `sudo -S`, or an expect-style script that supplies\n  one — this is `~\u002F.claude\u002FCLAUDE.md`'s \"Prohibited\" credential-entry rule,\n  restated here because sysadmin work is exactly where it comes up.\n\n## Sourcing discipline\n\nBefore asserting how a specific command, flag, or systemd unit directive\nbehaves, check that tool's own man page or official docs rather than\nanswering from memory — behavior varies by distro and version (`apt`\n14 vs. Debian's earlier version, `dnf` vs `dnf5`, systemd 253 vs. 257,\n`ufw` on Ubuntu vs. a manually-installed copy elsewhere). This is the same\n\"Cite sources for platform-capability claims\" convention `~\u002F.claude\u002FCLAUDE.md`\nalready requires generally, applied to sysadmin tooling specifically.\n\nPractical ways to satisfy it, in order of preference:\n\n1. `man \u003Ccommand>` or `\u003Ccommand> --help` **on the actual host being\n   administered** — the authoritative source for that host's installed\n   version, not a generic assumption.\n2. The tool's own upstream docs when the host's man page is unavailable or\n   the question is about a directive rather than a flag, e.g.:\n   - systemd unit semantics: `systemd.unit(5)`,\n     `systemd.service(5)` — https:\u002F\u002Fwww.freedesktop.org\u002Fsoftware\u002Fsystemd\u002Fman\u002Flatest\u002Fsystemd.unit.html\n   - `systemctl(1)` — https:\u002F\u002Fwww.freedesktop.org\u002Fsoftware\u002Fsystemd\u002Fman\u002Flatest\u002Fsystemctl.html\n   - `apt(8)` — https:\u002F\u002Fmanpages.debian.org\u002Fstable\u002Fapt\u002Fapt.8.en.html\n   - `dnf` command reference — https:\u002F\u002Fdnf.readthedocs.io\u002Fen\u002Flatest\u002Fcommand_ref.html\n   - `ufw(8)` — https:\u002F\u002Fmanpages.ubuntu.com\u002Fmanpages\u002Fnoble\u002Fman8\u002Fufw.8.html\n   - `firewalld.cmd(5)` \u002F `firewall-cmd(1)` — https:\u002F\u002Ffirewalld.org\u002Fdocumentation\u002F\n   - `parted` manual — https:\u002F\u002Fwww.gnu.org\u002Fsoftware\u002Fparted\u002Fmanual\u002Fparted.html\n   - `dd` (GNU coreutils) — https:\u002F\u002Fwww.gnu.org\u002Fsoftware\u002Fcoreutils\u002Fmanual\u002Fhtml_node\u002Fdd-invocation.html\n3. If neither is checkable in the moment, say so explicitly (\"this is my\n   general understanding of `\u003Ctool>`; verify against `man \u003Ctool>` on this\n   host before relying on it\") rather than presenting an unverified,\n   version-specific claim as settled fact.\n\nDistro\u002Fpackage-manager flag differences are exactly where memory goes\nstale fastest (an `apt` flag added in a later release, a `dnf`→`dnf5`\ndefault change) — treat any such claim as needing the check above before\nit goes into an actual command run against a real system.\n\n## Procedure\n\n1. Identify the command's tier (above) before running it or recommending\n   it verbatim.\n2. **Tier 1**: run it and report the result.\n3. **Tier 2**: state the exact command and its target, then get an\n   explicit go-ahead — the same explicit\u002Frequest-scoped\u002Fspecific bar\n   `gh-publish-guide` applies to GitHub publish actions, applied here\n   to a state-changing sysadmin command. Don't infer permission from a\n   broader adjacent ask (\"clean up this server\" does not by itself\n   authorize a specific `apt remove`).\n4. **Tier 3**: refuse to run it yourself regardless of how the request is\n   phrased, explain which Tier-3 bucket it falls into and why, and tell\n   the user the exact command to run themselves if they still want to do\n   it. This holds even if the user says \"yes, I'm sure\" or supplies every\n   detail — per `~\u002F.claude\u002FCLAUDE.md`'s Prohibited-category handling, the\n   answer is to state the rule and hand it back, not to comply.\n5. When a command's tier is ambiguous (a `chown` whose recursion target\n   turns out to be a symlink into `\u002Fetc`, a \"temporary\" directory that\n   isn't actually scratch space), treat it as the higher tier until\n   confirmed otherwise — err toward asking, not toward assuming safety.\n6. **Don't bundle logically separate Tier 2 actions into one confirmation.**\n   A request like \"set up a new deploy user and open port 8080 for the app\"\n   contains two independent actions — user provisioning and a firewall\n   change — that happen to arrive in the same sentence. Get a separate\n   explicit go-ahead for each rather than listing every command and asking\n   for one blanket yes. A single combined \"yes\" leaves it genuinely\n   ambiguous whether the user weighed both parts or just the one they were\n   thinking about, and it removes their ability to approve one now and hold\n   off on the other. Steps that are only sub-parts of one coherent operation\n   — `useradd deploy` immediately followed by `usermod -aG sudo deploy` to\n   finish provisioning that same account — are one action and can share a\n   single confirmation; the test is whether the pieces would make sense as\n   separate asks on their own, not whether they happen to share a sentence.\n\n## Diagnosing a failing or misbehaving service\n\nA \"why is X broken\" or \"X won't start\" request is a Tier 1 diagnostic phase\nfollowed by a Tier 2 fix, not a single step — resist naming the fix before\nthe diagnosis actually supports it, even when the symptom looks familiar.\n\n1. **Status first**: `systemctl status \u003Cunit>`. This alone often names the\n   failure directly (a crashed process, a failed config test, an unmet\n   dependency) and tells you what to look at next, before touching logs at\n   all.\n2. **Bounded logs next, scoped to the unit**: `journalctl -u \u003Cunit> --since\n   \u003Cwindow>` or `-n \u003CN>` — not a bare `-f`\u002F`--follow` (see Tier 1 above),\n   and not an unscoped read of the entire system log when the unit name is\n   already known. Widen the time window only if the first read doesn't\n   explain it.\n3. **State the diagnosis before proposing the fix.** \"The status output\n   shows `(dead) failed` and the log shows a syntax error at\n   `nginx.conf:12`, so the fix is correcting that line and reloading\" is a\n   diagnosis someone can check against the evidence. \"Let's restart it and\n   see\" is a guess wearing a diagnosis's clothes — it may work, but it\n   didn't come from reading the evidence, and Tier 2's \"state the exact\n   command and target\" requirement means the target should follow from\n   what was actually found, not from the symptom alone.\n4. **Apply the Tier 2 procedure for the fix itself** (state the command,\n   get the go-ahead, run it), **then re-check** status\u002Flogs afterward to\n   confirm the fix actually took — `active (running)` immediately after a\n   config reload doesn't yet prove the underlying problem is gone if the\n   failure was intermittent or config-validation-only; re-reading the same\n   status\u002Flog source you diagnosed from is what closes the loop.\n\n## Package-manager quick reference\n\nCommand shapes are equivalent across these three, but flags and defaults\nare not identical — verify against the sourcing discipline above rather\nthan assuming a direct translation, especially for anything beyond\ninstall\u002Fremove\u002Fsearch:\n\n| Action | Debian\u002FUbuntu (`apt`) | Fedora\u002FRHEL (`dnf`) | Arch (`pacman`) |\n|---|---|---|---|\n| Install | `apt install \u003Cpkg>` | `dnf install \u003Cpkg>` | `pacman -S \u003Cpkg>` |\n| Remove | `apt remove \u003Cpkg>` (keeps config) \u002F `apt purge \u003Cpkg>` | `dnf remove \u003Cpkg>` | `pacman -R \u003Cpkg>` |\n| Search | `apt search \u003Cterm>` | `dnf search \u003Cterm>` | `pacman -Ss \u003Cterm>` |\n| List installed | `dpkg -l` | `rpm -qa` | `pacman -Q` |\n| Update index only | `apt update` (Tier 1) | `dnf check-update` (Tier 1) | not supported standalone — see note below |\n| Upgrade all | `apt upgrade` (Tier 2, full-system) | `dnf upgrade` (Tier 2, full-system) | `pacman -Syu` (Tier 2, full-system) |\n\n**Never run `pacman -Sy` on its own.** Unlike `apt update`\u002F`dnf\ncheck-update`, which only refresh metadata, Arch's own docs treat a\ndatabase sync with no immediately-following upgrade as an unsupported\npartial-upgrade state that can break the system, because Arch's\nrolling-release model assumes the local package database and installed\npackages stay in sync (https:\u002F\u002Fwiki.archlinux.org\u002Ftitle\u002FSystem_maintenance).\nAlways pair it as `pacman -Syu`.\n\n## Firewall stack quick reference\n\nCheck which stack a host actually runs before assuming — `ufw` and\n`firewalld` are both front-ends over the kernel's `nftables`\u002F`iptables`,\nand only one is normally active at a time:\n\n- **Debian\u002FUbuntu default**: `ufw`. Status: `ufw status verbose` (Tier 1).\n  Scoped rule change: `ufw allow \u003Cport>\u002F\u003Cproto>` (Tier 2). Full disable:\n  `ufw disable` (Tier 3).\n- **Fedora\u002FRHEL default**: `firewalld`. Status: `firewall-cmd --state`,\n  `firewall-cmd --list-all` (Tier 1). Scoped rule change: `firewall-cmd\n  --add-port=\u003Cport>\u002F\u003Cproto> --permanent && firewall-cmd --reload` (Tier 2).\n  Full disable: `systemctl stop firewalld` as a blanket measure, or\n  `firewall-cmd --add-interface=... --zone=trusted` opening everything\n  (Tier 3).\n- **Raw `nftables`\u002F`iptables`** (no front-end, or scripting one directly):\n  listing rules is Tier 1; adding one scoped rule is Tier 2; `flush`ing a\n  table\u002Fchain or setting an `ACCEPT` default policy on `INPUT` is Tier 3.\n\n## SSH hardening quick reference\n\n`sshd`'s config lives in `\u002Fetc\u002Fssh\u002Fsshd_config` (plus any drop-ins under\n`\u002Fetc\u002Fssh\u002Fsshd_config.d\u002F*.conf`, which are read in glob order and can\noverride the main file — check for a conflicting drop-in before assuming a\nmain-file edit is the only place a directive is set).\n\n- **Check current settings** (Tier 1): `sshd -T | grep -i \u003Cdirective>`\n  reports sshd's actual *effective* config after all includes are applied —\n  more reliable than grepping the raw file, which won't show a drop-in\n  override.\n- **Edit one directive, then validate before reloading** (Tier 2): run\n  `sshd -t` — with no `-f` — after every edit and before reloading. With no\n  `-f` it tests the *actual* effective config, `Include`d drop-ins and all,\n  which is the thing that's about to become live; that's mandatory, not\n  optional. `sshd -t -f \u003Cfile>` is a different, narrower check — it treats\n  `\u003Cfile>` as if it were the whole config, so it can catch a syntax error\n  in the drop-in you just edited before you've wired it in, but a clean\n  `-f` result doesn't mean the *merged* config is clean too. Use `-f` as an\n  extra quick check on the file you're editing if you want one; it never\n  substitutes for the plain `sshd -t` run against the real config.\n- **Reload, don't restart, for a config-only change** — but find the\n  actual unit name on this host first rather than assuming: the systemd\n  unit is `ssh.service` on Debian\u002FUbuntu and `sshd.service` on Fedora\u002FRHEL\n  (some Ubuntu versions alias `sshd` to `ssh`, but don't rely on that\n  without checking — `systemctl status ssh sshd 2>\u002Fdev\u002Fnull` on the actual\n  host shows which one is real). `systemctl reload \u003Cunit>` re-reads config\n  without dropping existing connections; `systemctl restart \u003Cunit>` does\n  drop them. Prefer reload unless the change specifically requires a full\n  restart.\n- **The session-continuity rule (Tier 3) applies directly here**: disabling\n  password auth, changing the port, or restarting in a way that drops the\n  current session's own auth method or connection needs a confirmed second\n  access path (a second open session, console\u002Fout-of-band access, a\n  provider's rescue mode) or a timed auto-revert before it runs — \"it\n  validated with `sshd -t`\" proves the config is syntactically valid, not\n  that it won't lock out the session applying it.\n",{"name":5,"license":15,"metadata":24,"description":26},{"version":25},"1.2.0","ALWAYS invoke before answering or planning any Linux administration command on\na systemd host, even when told not to run anything and only asked for a plan, a\nverdict or a list of confirmation questions: `dd` or other writes to a block\ndevice, disabling SSH password auth or editing sshd_config over a live session,\ncreating users, opening firewall ports, or explaining how a command or systemd unit\nbehaves (cite the man page). First-party Linux system administration guidance for systemd-based\ndistributions: package management (apt\u002Fdnf\u002Fpacman), systemd service\nmanagement and diagnosis, filesystem operations, user\u002Fpermission\nmanagement, disk partitioning, network\u002Ffirewall configuration\n(ufw\u002Ffirewalld\u002Fnftables), and SSH hardening (sshd_config, authorized_keys).\nSorts every command shape into one of three mechanical buckets — safe to\nrun freely, needs explicit confirmation, or never run autonomously — the\nsame categorical discipline `~\u002F.claude\u002FCLAUDE.md`'s \"Action categories\"\napplies generally, made concrete for sysadmin command shapes instead of a\nsingle \"be careful with destructive commands\" reminder. Also requires\nciting the relevant man page or official docs for any claim about how a\nspecific command or unit behaves, since behavior varies by distro\u002Fversion.\nUse before running, or advising the user to run, any Linux administration\ncommand — installing\u002Fremoving packages, starting\u002Fstopping\u002Fenabling\nservices, changing file ownership or permissions, managing users or\ngroups, partitioning or formatting disks (including `dd` to a block\ndevice), disabling SSH password auth, or changing firewall\u002Fnetwork\nconfiguration — on a systemd-based Linux host (local, remote\u002FSSH, or a\ncontainer). Also applies when asked only to plan, list or answer with the\ncommands without running them. Does not cover non-systemd init systems (sysvinit, OpenRC,\nrunit) or Windows\u002FmacOS administration.\n","main","a924e3abb0a831866902dd0835353e108826e0a3","plugins\u002Flinux-administration",0,"https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config","https:\u002F\u002Fgithub.com\u002Fdfadler","http:\u002F\u002Fdfadler.com","2026-11-15 05:22:24",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add dfadler\u002Fagent-config --skill linux-administration",{"tool":41,"command":42},"bunx","bunx skills add dfadler\u002Fagent-config --skill linux-administration",{"tool":44,"command":45},"pnpm","pnpm dlx skills add dfadler\u002Fagent-config --skill linux-administration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config\u002Fblob\u002Fmain\u002Fplugins\u002Flinux-administration\u002FSKILL.md",true,[49,55,59,63,67,71,75,79],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},".claude-plugin\u002Fplugin.json","REFERENCE","参考文档",469,"https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config\u002Fblob\u002Fmain\u002Fplugins\u002Flinux-administration\u002F.claude-plugin\u002Fplugin.json",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"evals\u002Flinux-administration-cites-man-page\u002Fcase.yaml",2088,"https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config\u002Fblob\u002Fmain\u002Fplugins\u002Flinux-administration\u002Fevals\u002Flinux-administration-cites-man-page\u002Fcase.yaml",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"evals\u002Flinux-administration-labels-command-batch\u002Fcase.yaml",2887,"https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config\u002Fblob\u002Fmain\u002Fplugins\u002Flinux-administration\u002Fevals\u002Flinux-administration-labels-command-batch\u002Fcase.yaml",{"path":64,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":65,"sourceHtmlUrl":66},"evals\u002Flinux-administration-quiet-on-openrc-ssh-password\u002Fcase.yaml",1432,"https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config\u002Fblob\u002Fmain\u002Fplugins\u002Flinux-administration\u002Fevals\u002Flinux-administration-quiet-on-openrc-ssh-password\u002Fcase.yaml",{"path":68,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":69,"sourceHtmlUrl":70},"evals\u002Flinux-administration-refuses-lone-pacman-sy\u002Fcase.yaml",2457,"https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config\u002Fblob\u002Fmain\u002Fplugins\u002Flinux-administration\u002Fevals\u002Flinux-administration-refuses-lone-pacman-sy\u002Fcase.yaml",{"path":72,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":73,"sourceHtmlUrl":74},"evals\u002Flinux-administration-separate-go-ahead-per-action\u002Fcase.yaml",3858,"https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config\u002Fblob\u002Fmain\u002Fplugins\u002Flinux-administration\u002Fevals\u002Flinux-administration-separate-go-ahead-per-action\u002Fcase.yaml",{"path":76,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":77,"sourceHtmlUrl":78},"evals\u002Flinux-administration-ssh-password-off-hands-back-without-rollback\u002Fcase.yaml",3207,"https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config\u002Fblob\u002Fmain\u002Fplugins\u002Flinux-administration\u002Fevals\u002Flinux-administration-ssh-password-off-hands-back-without-rollback\u002Fcase.yaml",{"path":80,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":81,"sourceHtmlUrl":82},"evals\u002Flinux-administration-stays-quiet-on-macos-service\u002Fcase.yaml",1632,"https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config\u002Fblob\u002Fmain\u002Fplugins\u002Flinux-administration\u002Fevals\u002Flinux-administration-stays-quiet-on-macos-service\u002Fcase.yaml",[84,91,98,105,112,119],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7B4V2WXAHE2FC90KSD4GKRV","youtube-transcript","ALWAYS invoke before fetching a transcript, captions or description for a\nYouTube video, even when only asked how you would get them. Given a YouTube\nURL (youtube.com\u002Fwatch, youtu.be, shorts), save the video's English\nauto-captions as plain text and its description to files with `yt-dlp`, and\nprint the title, channel and duration. Use when asked to \"get the transcript\nfor this video\", \"grab the captions\", \"summarize this YouTube video\", \"put\nthese videos' transcripts in an artifact\", or when a YouTube link is pasted\nand its spoken content is needed. Do not drive the browser's transcript panel\nor try `youtube-transcript-api` first: both were tried and are slower or\nempty.","https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config\u002Fblob\u002Fmain\u002Fplugins\u002Fyoutube-transcript\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7B4TNSGRRKJZ9A5B9TSRCC3","git-worktree-usage","Load this before pushing to, or opening a PR from, a branch whose earlier PR\nalready merged (a squash merge leaves its commits off the default branch, so\na new PR from it shows stale history), even when only advising: it defines\nthe fresh-branch and cherry-pick fix.\nCreate worktrees with the `EnterWorktree` tool, never raw `git worktree add`.\nGit worktree and branch mechanics for isolating non-trivial work: locking and\nthe stale-worktree sweep, picking what to parallelize by file surface, the\nrepo-wide `git stash` collision hazard and its `git restore` alternative,\nbranch naming, catching a branch up to a moved `main` via merge (not\nrebase), CI\u002Fcoverage gotchas after a merge, conflict-resolution escalation\nlevels, and PR-splitting sequencing. Also ships two SessionStart hooks that\nself-heal a project's own symlinked-worktree-directory convention and\nauto-prune merged worktrees, and a commit-branch guard hook that asks before\na git commit lands on the default or an unrelated checked-out branch. Use when creating, entering, or cleaning up a\ngit worktree, including before starting work in an existing worktree that\nanother session may be using; deciding how to parallelize agent sessions across a repo;\nhitting a `git stash` collision between sessions; resolving a merge\u002Frebase\nconflict; splitting an already-written diff into multiple PRs; or a stale\nor wrongly-linked worktree directory needs diagnosing. Do not use for a\nplain `git stash` in a single clone with no other worktrees or sessions,\nfor rewriting an unpushed branch's history, or for running commands in a\nworktree the user just created.","https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config\u002Fblob\u002Fmain\u002Fplugins\u002Fworktree-core\u002Fskills\u002Fgit-worktree-usage\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7B4SGD3481322E9ZDQAFMTK","url-to-audio","ALWAYS invoke before answering any request to narrate or convert a URL or\narticle to audio, even when only asked what you would do or which backend you\nwould use (including when `OPENAI_API_KEY` is unset and the fallback is `say`).\nTurn a web article into a narrated audio file: fetch the page, extract the\nclean reading text, and synthesize it with macOS `say` by default (free,\nlocal, already installed, no API key) or OpenAI TTS optionally (when\n`OPENAI_API_KEY` is set and a `say` voice isn't good enough). Voice and\nspeed are configurable per call, with env var defaults. Produces a\n`.m4a`\u002F`.mp3` file at a predictable path and prints it. Use when asked to\n\"read this article to me\", \"convert this page\u002FURL to audio\", \"make an\naudio version of this link\", or \"text-to-speech this article\" — including\nwhen asked only for the commands or plan, or when `OPENAI_API_KEY` is unset.","https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config\u002Fblob\u002Fmain\u002Fplugins\u002Furl-to-audio\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M7B4RKYJQ16XGH8GR1WQ69ZT","subagent-orchestration","Use FIRST, before answering or planning, whenever the user hands over a list of two\nor more separate tasks (\"do A, B and C\", numbered or in no order) that each need real\nexploration, even if they only ask how you would tackle them: it triages which can run\nas parallel sub-agents and which must stay serial. Also use when asked how to\nconfigure a sub-agent already chosen for a large search or exploration (agent type,\nmodel tier), and when about to spawn a sub-agent, fan out with the Workflow tool, or run a task\nthat would put large tool output (more than ~50 lines, or ~3 file reads) into the\nmain context. Routes the work to the main context, a single Agent call, or a\nWorkflow; defines the compact handback a delegated agent should return; and picks\nthe model tier. Use for \"should I delegate this\", \"which agent do I use\", or\n\"keep my context small\".","https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config\u002Fblob\u002Fmain\u002Fplugins\u002Fsubagent-orchestration\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M7B4Q35VB7TKPF3Z3KA4E0YB","config","Internal primitive that reads YAML frontmatter from vault config files via\nmcp__obsidian__* tools, and returns it as merged key-value data. Not a\nuser-facing slash command — this skill is never triggered by a user\nrequest directly; other agent-config skills (screen-capture, and\nsecond-brain's own capture\u002Fquery skills) invoke it to load their own\nsettings. Degrades to an empty config, never a hard failure, when the\nObsidian MCP is disconnected or the config file doesn't exist. Parse\n`$ARGUMENTS` as `\u003Cskill-name> [project-name]`.","https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config\u002Fblob\u002Fmain\u002Fplugins\u002Fsecond-brain\u002Fskills\u002Fconfig\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":19},"01M7B4PQ6KE886C346DH55GESM","lighthouse","Run a Lighthouse CLI pass (mobile + desktop) against a URL and store the results in the second-brain vault under knowledge\u002Flighthouse\u002F\u003Cproject>\u002F. ALWAYS invoke this skill first when asked to run, repeat or script a Lighthouse pass or performance\u002Faccessibility audit against a URL, before writing any `lighthouse` command, including when the config disables it (it defines the no-op behaviour). Complements, not replaces, a manual responsive resize-and-look pass. Not for advice about fixing a Lighthouse finding. Config-driven: which form factors run, whether the skill runs at all, and where results land are all controlled by lighthouse_enabled, lighthouse_form_factors, and lighthouse_output_dir.","https:\u002F\u002Fgithub.com\u002Fdfadler\u002Fagent-config\u002Fblob\u002Fmain\u002Fplugins\u002Fscreen-capture\u002Fskills\u002Flighthouse\u002FSKILL.md",[],[]]