/dotfiles-dev:manage-packagesfrom dotfiles-dev
Add, delete, or update packages in this dotfiles repo's Brewfile, mas.Brewfile, snap installs, uv tool installs, vscode extensions, or other package manifests. Default mode opens a GitHub PR, merges it into main, and stops. Use when the user asks to add a brew formula or cask, remove a package, rename or retarget a Brewfile pin, edit snap installs, or change a package-manager manifest.
Ships in dotfiles-dev. 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.
Apply a set of {packages} operations (add, delete, update) to the
package manifests in this repository, verify each change the way recent
Brewfile PRs did, then finish in {mode}. {mode}=pr (default) opens a
GitHub PR, merges it into main, and stops.
This skill is for the yliapis/dotfiles repo only. Read
references/managers.md before the first edit.
Use conventional-commits and minimal-diffs when those skills are present.
{packages} — required list of operations. Accept YAML, JSON, or
unambiguous inline text (add utm; delete messenger; update claude-code -> claude-code@latest). Each record has:
name — package token (required)action — add | delete | update (required)manager — auto | brew | mas | snap | uv | vscode; optional,
default autokind — auto | formula | cask | tap; optional, default auto
(brew only)to — replacement token or spec; required for updategate — auto | macos | linux | none; optional, default autotap — third-party tap; optionalid — Mac App Store numeric id; required when manager=mas and the id
is not already on the line{mode} — pr | local; optional, default pr.
pr: branch from origin/main, commit, push, open a PR, squash-merge
it into main, then stop.local: commit on a local branch; do not push or open a PR.{dry_run} — optional boolean, default false. Resolve, classify, and
report the plan. Write no files, create no commit, and open no PR.Unknown parameters or invalid values abort before side effects.
Brewfile and ai-coding/plugins/ exist at the root) and
{packages} parses to at least one valid record.add / update target exists and is not disabled via the
manager API in references/managers.md. Prove
each delete target is present in its manifest.{dry_run}=true writes nothing.{mode}=pr produces one commit, one GitHub PR from a branch off
origin/main, a squash-merge into main, and a Done report that
names the PR URL and the merge commit SHA. A blocked merge is not
Done: report the PR URL and the merge error, then stop.{mode}=local produces the same commit contract without push, PR, or
merge.conventional-commits and minimal-diffs when those skills are
present. Do not abort if they are missing.install.sh; there is no apt package list).brew bundle, brew install, snap install, uv tool install, or mas install unless the user asked to provision this
machine. Manifest edit plus API / parse evidence is enough (cloud VMs
often have no Homebrew).homebrew/core or homebrew/cask already ships
the package. MUST NOT use mas when a Homebrew cask exists.--admin. On merge failure,
leave the PR open and stop.pr) one merged PR. Out of
scope: rewriting install.sh, adding package managers, or changing
sync/mirror tooling.Preflight. Confirm repo identity. Parse {packages}. Resolve
{mode} (pr) and {dry_run} (false). For {mode}=pr, require
gh and a clean worktree (git status --porcelain empty of unrelated
paths). Fetch origin/main.
Classify. For each record, follow Kind Resolution and OS Gates in references/managers.md. Probe APIs. Record the planned line, file, and gate. Abort the whole set on the first failure.
Plan. Render the Output Format Plan. Stop when {dry_run} is true
or a record is ambiguous after the resolution rules.
Branch. {mode}=pr: create chore/packages-<slug> from
origin/main. {mode}=local: use the current branch when it is not
main; otherwise create the same slug branch locally.
Edit. Apply each record. Keep section placement and tap trusted:
syntax from the reference. On delete, drop the tap line only when
this package was its last consumer.
Verify. Grep the exact lines and re-check APIs. A new macOS-only
package keeps if OS.mac?. Cross-platform formulae stay unguarded.
Commit. One commit for the set. When conventional-commits is
present, scope brew, mas, snap, uv, or vscode when every
record shares that manager; otherwise packages.
PR mode. Push -u origin HEAD. Open the PR with gh pr create
using docs/pr-template.md. Then:
gh pr merge --squash --delete-branch
Confirm origin/main advanced to the squash commit. That is Done.
If merge is rejected (review required, checks, conflict), report the
PR URL and the error; do not retry with extra flags.
Named sections, in order:
One row per record: name, action, manager, kind, file, gate,
line (the exact planned text), and the API proof used.
Repo-relative paths and the line-level change, or none (dry-run).
Commands run, exit status, and the facts they proved (token, tap,
disabled/deprecated, bottles or platform).
Branch, commit SHA, subject. For {mode}=pr: PR URL, merge result
(merged | blocked), merge commit SHA when merged.
One sentence. pr + successful merge ends with Done.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub yliapis/dotfiles --plugin dotfiles-dev