Skip to content

install_skills.py: the failed-hash rollback runs skills remove without -a, so it can delete another agent's same-named skill #405

Closed

Description

@seathatflowsinourveins

Finding (from the GPT-6 review of #391, 2026-09-27)

tools/adoption/install_skills.py installs each pinned skill for two agents only, but its rollback removes the skill for every agent:

  • line 176: add_args = ["add", skill["url"], "--skill", name, "-g", "-y", "-a", "claude-code", "codex"]
  • line 196, the rollback when installed content does not match the pinned hash or tree: run_skills_bin(skills_bin, ["remove", name, "-g", "-y"], ...)

In skills v1.7.0, remove without -a/--agent selects every known agent and recursively removes the matching skill directories (upstream src/remove.ts#L209, confirmed against the pinned 1.7.0 cli.mjs removeCommand/parseRemoveOptions). A failed-hash rollback can therefore delete a same-named skill that another agent owns (for example Cursor's), which this installer never installed. That breaks adoption/lifecycle.md:100: "Never uninstall all user tools to roll back one package."

Suggested fix: scope the rollback exactly like the install: ["remove", name, "-g", "-y", "-a", "claude-code", "codex"]. -a must come last, because the parser consumes the trailing words as agent names. Add a unit test that asserts remove carries the same -a list as add.

Related: #391 (its rollback text now uses the scoped form), docs/decisions/2026-09-25-skills-trial-and-usage.md:43.

Activity

  1. added 4 commits that reference this issue on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lane:foundationFoundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions