Analyze config files and installed packages to generate a categorized Arch Linux package install list. Discovers packages from config directories, dotfiles, shell functions, compositor bindings, and editor plugins. Validates against official repos and AUR. Writes a chezmoi-managed install list to ~/.config/arch-packages.txt.
Generate a comprehensive, categorized list of application-layer Arch Linux packages needed to reproduce this system's setup.
Run the discovery script to scan configs and query pacman:
~/.claude/skills/arch-packages/scripts/discover-packages.sh
This outputs structured sections:
__UNKNOWN__ for you to resolvepacman -Qe native packages (ground truth)pacman -Qm foreign/AUR packagesFor any package names you're uncertain about, validate them:
~/.claude/skills/arch-packages/scripts/validate-packages.sh pkg1 pkg2 pkg3
Or pipe a list:
echo "neovim bat eza" | ~/.claude/skills/arch-packages/scripts/validate-packages.sh
This checks each package against official repos and AUR via yay -Si and reports:
OK <pkg> (<repo>) — package foundNOTFOUND <pkg> — package doesn't existAfter running both scripts, apply your judgment:
Resolve __UNKNOWN__ entries — For each unmapped config dir, search with yay -Ss <name> to find the correct package. If no package exists (it's a config-only dir), skip it.
Cross-reference — Compare discovered packages against the pacman -Qe output:
pacman -Qe but NOT found in configs may still be needed (ask the user)pacman -Qe should still be included (they're needed)Filter out base/system packages from pacman -Qe — Skip: base, base-devel, linux, linux-firmware, linux-headers, grub, efibootmgr, amd-ucode, intel-ucode, networkmanager, dhcpcd, iwd, wpa_supplicant, and similar low-level packages
Categorize — Group packages into categories:
Validate the final list — Run all candidate packages through validate-packages.sh to confirm they all resolve
Write the categorized package list to ~/.config/arch-packages.txt:
# Generated on <hostname> at <YYYY-MM-DD HH:MM>
# Category Name
package1
package2
# Another Category
package3
Rules:
hostname) and timestamp (date '+%Y-%m-%d %H:%M')#) are category headers# Non-pacman tools (not included in install list) section at the end as comments onlyThe file should be usable with:
grep -v '^#' ~/.config/arch-packages.txt | grep -v '^$' | yay -S --needed -
After writing the file, add it to chezmoi:
chezmoi add ~/.config/arch-packages.txt
Then verify:
chezmoi diff