Files
dotfiles/modules/claude-code/skills/remove-skills/SKILL.md
alexion b7363ed7e1 feat(claude-code): manage the user's global config in the Module
Bring the declarative half of ~/.claude into modules/claude-code and apply
it when the Module is enabled: the global agent instructions (context =
./CLAUDE.md), the skills tree (skills = ./skills), the attention-bell hook,
and settings.json (model = opus plus the Stop/Notification/SessionStart
hook wiring).

Runtime state (projects, plugins, cache, history, sessions) and the
.credentials.json secret are left out, so login survives rebuilds and no
secret enters the repo. Verified against the built home-files that
~/.claude/{CLAUDE.md,settings.json,skills,hooks/attention-bell.sh} are
generated, the hook executable.
2026-07-19 07:57:43 -04:00

1.6 KiB

name, description, disable-model-invocation
name description disable-model-invocation
remove-skills Remove one or more previously added library skills from the current project. true

Removes a skill that setup-skills previously copied into the current project, deleting both its files and its entry in .claude/skills-lock.yaml (see LOCKFILE.md for its schema).

Steps

  1. Read .claude/skills-lock.yaml. If it doesn't exist or is empty, tell the user there's nothing installed to remove and stop.

  2. Determine which skill(s) to remove:

    • If the user's invocation already named a specific skill, use that — if it isn't in the lockfile, say so and stop.
    • Otherwise, list every skill currently in the lockfile and ask the user to pick one (or more).
  3. For each skill to remove, compute its current hash (~/.claude/skills/setup-skills/hash-dir.sh .claude/skills/<name>) and compare it to the hash stored in the lockfile:

    • If it matches (never modified since it was installed), delete .claude/skills/<name>/ and remove its lockfile entry immediately — no confirmation needed, since nothing of the user's is being lost.
    • If it differs (locally customized), tell the user it has local changes that will be permanently lost and ask for confirmation before deleting. If they decline, leave that skill installed and move on to the next.
  4. Finish with a summary of what was removed and what was left in place.

Done when every skill to remove has been either deleted (with its lockfile entry removed) or explicitly left in place with a stated reason.