[GH-ISSUE #661] [Bug] rea uninstall leaves the 69 skill folders, agent links, and manifest that rea skills add writes #315

Closed
opened 2026-10-15 18:23:48 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @coygeek on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/661

Before submitting

  • I searched the open and closed issues for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

Setup, packaging, or upgrade

Observed behavior

rea skills add, listed under "Integrations" in rea --help, writes 69 per-command skill folders named rea-<command> into ~/.agents/skills, links them and reverse-engineer-anything into the skills directory of each detected non-universal agent (70 links in ~/.claude/skills when Claude Code is detected), and records them in ~/.local/share/incur/rea.json. rea uninstall removes only ~/.agents/skills/reverse-engineer-anything. All 69 folders, all 70 links (the reverse-engineer-anything link now dangling), and the manifest remain.

The script under Reproduction printed the output under Relevant output or evidence with the 4.0.1 package; the main build printed identical lines.

  • The 72 entries in ~/.agents/skills are the 69 rea-<command> folders, reverse-engineer-anything, and the two controls there; the 71 entries in ~/.claude/skills are 70 relative symlinks into ~/.agents/skills plus the control. The folders include rea-analyze, rea-doctor, rea-setup, rea-uninstall, and rea-update, each holding one generated SKILL.md.
  • rea uninstall reported status: complete and exited 0.
  • An earlier run on an empty home without ~/.claude or controls, on both builds, likewise left 69 rea-* folders and the manifest after rea uninstall.

Reproduction

Run this with bash. It uses a throwaway home and unsets the configuration-directory variables that REA and its CLI framework read, so it does not touch real agent configuration. Three user-owned control skills, two named with a rea- prefix and one placed directly in ~/.claude/skills, check that nothing user-authored is removed. It was executed as written against the 4.0.1 package and, with REA="node scripts/rea.mjs" from a main checkout, against the main build.

set -u
# Isolate every location REA and its CLI framework read, not only HOME.
unset CLAUDE_CONFIG_DIR CODEX_HOME COPILOT_HOME OPENCODE_CONFIG XDG_CONFIG_HOME XDG_DATA_HOME
export HOME="$(mktemp -d)"
mkdir -p "$HOME/.claude"   # an existing ~/.claude makes Claude Code count as installed
cd "$(mktemp -d)"
REA="${REA:-npx -y rea-agents@4.0.1}"
# Controls: user-owned skills that must survive.
for d in .agents/skills/my-notes .agents/skills/rea-notes .claude/skills/rea-notes; do mkdir -p "$HOME/$d"; printf -- '---\nname: %s\ndescription: control\n---\n' "${d##*/}" > "$HOME/$d/SKILL.md"; done
$REA skills add < /dev/null > /dev/null; echo "skills add exit=$?"
echo "~/.agents/skills entries: $(ls "$HOME/.agents/skills" | wc -l | tr -d ' ')"
echo "~/.claude/skills entries: $(ls "$HOME/.claude/skills" | wc -l | tr -d ' ')"
$REA uninstall < /dev/null | grep -E '^status|^  skill,' | sed "s|$HOME|~|"
echo "after uninstall, rea-<command> folders in ~/.agents/skills: $(ls "$HOME/.agents/skills" | grep '^rea-' | grep -vc '^rea-notes$')"
echo "after uninstall, entries in ~/.claude/skills other than the control: $(ls "$HOME/.claude/skills" | grep -vc '^rea-notes$')"
p="$HOME/.claude/skills/reverse-engineer-anything"; test -L "$p" && ! test -e "$p" && echo "dangling symlink: ~/.claude/skills/reverse-engineer-anything -> $(readlink "$p")"
for d in .agents/skills/my-notes .agents/skills/rea-notes .claude/skills/rea-notes; do test -f "$HOME/$d/SKILL.md" && echo "control ~/$d: kept"; done
ls "$HOME/.local/share/incur" | sed 's|^|manifest left: ~/.local/share/incur/|'

Expected behavior

rea uninstall --help describes the command as "Remove REA-owned agent configuration and skill files", and the installation guide says it "removes only REA-owned agent registrations and skill files". The rea-<command> folders, their agent links, and the manifest are written by REA's own advertised rea skills add, carry REA command names, and are recorded in incur's manifest ~/.local/share/incur/rea.json, whose skills array lists the rea-* names; this report treats them as REA-owned skill files under that description. After rea uninstall, no skill folder, agent link, or manifest written by rea skills add should remain, while unrelated skills, including user skills whose names start with rea-, stay untouched as the README promises ("Uninstall preserves ... unrelated skills").

Impact and scope

  • Impact level: P2
  • Assessment status: supported
  • Impact basis: After an advertised command is run, uninstall reports complete but leaves 69 skill folders, 70 agent links (one dangling), and a manifest in shared agent directories; agents that read those directories would still discover REA command skills after uninstall (inferred from the directory contents; agent loading was not tested). No user-authored file was removed in the observed run.
  • Workaround status: unverified
  • Workaround basis: Deleting the rea-<command> folders, the matching links, and ~/.local/share/incur/rea.json by hand should remove the leftovers, but this was not run, and the user has to tell REA's folders apart from any of their own skills that start with rea-.

REA version

4.0.1 (npm latest; tag rea-agents-4.0.1, commit feeb19b8b3172b2827b80fde8f09570ce5aeed88); also reproduced on main at 19f8cddfd6f283188567b8ff1e49b810d79952ee built from source

Runtime and platform

Node.js 24.21.0; macOS 27.0.1 arm64; no Hopper or Ghidra involved

Target and artifact context

Not applicable

Interface

CLI

Earliest failure stage

Cleanup, cancellation, or lifecycle

Relevant output or evidence

skills add exit=0
~/.agents/skills entries: 72
~/.claude/skills entries: 71
status: complete
  skill,removed,Removed ~/.agents/skills/reverse-engineer-anything.
after uninstall, rea-<command> folders in ~/.agents/skills: 69
after uninstall, entries in ~/.claude/skills other than the control: 70
dangling symlink: ~/.claude/skills/reverse-engineer-anything -> ../../.agents/skills/reverse-engineer-anything
control ~/.agents/skills/my-notes: kept
control ~/.agents/skills/rea-notes: kept
control ~/.claude/skills/rea-notes: kept
manifest left: ~/.local/share/incur/rea.json

Typed outcome or recovery expected

Run the script against a fixed build. Today it reports 69 rea-<command> folders, 70 entries in ~/.claude/skills other than the control, a dangling link, and a manifest left after uninstall. Restoration means it reports 0 folders, 0 entries other than the control, no dangling link, and no manifest line, while all three control ... kept lines still print. A fix that disables skills add so it writes nothing also satisfies this check; a command that is merely hidden from help but still writes these files does not.

Analysis or suspected cause

  • Expected source: rea uninstall help text from src/cli/setupCommands.ts line 129; docs/installation.md line 312 on main (line 304 in the release); README.md lines 209 and 216.
  • Failure source: the script output above, run locally in throwaway homes against both tested builds.
  • Evidence provenance: observed
  • Local verification: reproduced
  • Reproduction completeness: complete

README.md line 209 alone says uninstall removes "only REA-owned MCP registrations and the managed skill", which the observed uninstall did. The violation rests on the help text and installation guide covering REA-owned skill files and on the premise above that files written by rea skills add are REA-owned. The command reaches REA because src/cli.ts lines 43-51 pass a sync option with include: ["skills/*"] to Cli.create from the incur CLI framework, which then serves its built-in skills add and skills list; uninstall removes only the canonical path (src/application/Uninstall.ts, removeManagedSkills). These locators explain the gap; they do not prescribe a fix.

Additional context

#660 covers rea skills add replacing the managed reverse-engineer-anything skill with a SKILL.md-only copy. Disabling the skills helper would close both reports; teaching uninstall about everything the helper writes would close this one. The sibling rea mcp add helper also writes an agent registration (~/.claude.json in a local run) without setup's plan; it is mentioned only as context.

Originally created by @coygeek on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/661 ### Before submitting - [x] I searched the open and closed issues for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ### Area Setup, packaging, or upgrade ### Observed behavior `rea skills add`, listed under "Integrations" in `rea --help`, writes 69 per-command skill folders named `rea-<command>` into `~/.agents/skills`, links them and `reverse-engineer-anything` into the skills directory of each detected non-universal agent (70 links in `~/.claude/skills` when Claude Code is detected), and records them in `~/.local/share/incur/rea.json`. `rea uninstall` removes only `~/.agents/skills/reverse-engineer-anything`. All 69 folders, all 70 links (the `reverse-engineer-anything` link now dangling), and the manifest remain. The script under Reproduction printed the output under Relevant output or evidence with the 4.0.1 package; the `main` build printed identical lines. - The 72 entries in `~/.agents/skills` are the 69 `rea-<command>` folders, `reverse-engineer-anything`, and the two controls there; the 71 entries in `~/.claude/skills` are 70 relative symlinks into `~/.agents/skills` plus the control. The folders include `rea-analyze`, `rea-doctor`, `rea-setup`, `rea-uninstall`, and `rea-update`, each holding one generated `SKILL.md`. - `rea uninstall` reported `status: complete` and exited 0. - An earlier run on an empty home without `~/.claude` or controls, on both builds, likewise left 69 `rea-*` folders and the manifest after `rea uninstall`. ### Reproduction Run this with `bash`. It uses a throwaway home and unsets the configuration-directory variables that REA and its CLI framework read, so it does not touch real agent configuration. Three user-owned control skills, two named with a `rea-` prefix and one placed directly in `~/.claude/skills`, check that nothing user-authored is removed. It was executed as written against the 4.0.1 package and, with `REA="node scripts/rea.mjs"` from a `main` checkout, against the `main` build. ```bash set -u # Isolate every location REA and its CLI framework read, not only HOME. unset CLAUDE_CONFIG_DIR CODEX_HOME COPILOT_HOME OPENCODE_CONFIG XDG_CONFIG_HOME XDG_DATA_HOME export HOME="$(mktemp -d)" mkdir -p "$HOME/.claude" # an existing ~/.claude makes Claude Code count as installed cd "$(mktemp -d)" REA="${REA:-npx -y rea-agents@4.0.1}" # Controls: user-owned skills that must survive. for d in .agents/skills/my-notes .agents/skills/rea-notes .claude/skills/rea-notes; do mkdir -p "$HOME/$d"; printf -- '---\nname: %s\ndescription: control\n---\n' "${d##*/}" > "$HOME/$d/SKILL.md"; done $REA skills add < /dev/null > /dev/null; echo "skills add exit=$?" echo "~/.agents/skills entries: $(ls "$HOME/.agents/skills" | wc -l | tr -d ' ')" echo "~/.claude/skills entries: $(ls "$HOME/.claude/skills" | wc -l | tr -d ' ')" $REA uninstall < /dev/null | grep -E '^status|^ skill,' | sed "s|$HOME|~|" echo "after uninstall, rea-<command> folders in ~/.agents/skills: $(ls "$HOME/.agents/skills" | grep '^rea-' | grep -vc '^rea-notes$')" echo "after uninstall, entries in ~/.claude/skills other than the control: $(ls "$HOME/.claude/skills" | grep -vc '^rea-notes$')" p="$HOME/.claude/skills/reverse-engineer-anything"; test -L "$p" && ! test -e "$p" && echo "dangling symlink: ~/.claude/skills/reverse-engineer-anything -> $(readlink "$p")" for d in .agents/skills/my-notes .agents/skills/rea-notes .claude/skills/rea-notes; do test -f "$HOME/$d/SKILL.md" && echo "control ~/$d: kept"; done ls "$HOME/.local/share/incur" | sed 's|^|manifest left: ~/.local/share/incur/|' ``` ### Expected behavior `rea uninstall --help` describes the command as "Remove REA-owned agent configuration and skill files", and the installation guide says it "removes only REA-owned agent registrations and skill files". The `rea-<command>` folders, their agent links, and the manifest are written by REA's own advertised `rea skills add`, carry REA command names, and are recorded in incur's manifest `~/.local/share/incur/rea.json`, whose `skills` array lists the `rea-*` names; this report treats them as REA-owned skill files under that description. After `rea uninstall`, no skill folder, agent link, or manifest written by `rea skills add` should remain, while unrelated skills, including user skills whose names start with `rea-`, stay untouched as the README promises ("Uninstall preserves ... unrelated skills"). ### Impact and scope - Impact level: P2 - Assessment status: supported - Impact basis: After an advertised command is run, uninstall reports `complete` but leaves 69 skill folders, 70 agent links (one dangling), and a manifest in shared agent directories; agents that read those directories would still discover REA command skills after uninstall (inferred from the directory contents; agent loading was not tested). No user-authored file was removed in the observed run. - Workaround status: unverified - Workaround basis: Deleting the `rea-<command>` folders, the matching links, and `~/.local/share/incur/rea.json` by hand should remove the leftovers, but this was not run, and the user has to tell REA's folders apart from any of their own skills that start with `rea-`. ### REA version 4.0.1 (npm `latest`; tag `rea-agents-4.0.1`, commit `feeb19b8b3172b2827b80fde8f09570ce5aeed88`); also reproduced on `main` at `19f8cddfd6f283188567b8ff1e49b810d79952ee` built from source ### Runtime and platform Node.js 24.21.0; macOS 27.0.1 arm64; no Hopper or Ghidra involved ### Target and artifact context Not applicable ### Interface CLI ### Earliest failure stage Cleanup, cancellation, or lifecycle ### Relevant output or evidence ```text skills add exit=0 ~/.agents/skills entries: 72 ~/.claude/skills entries: 71 status: complete skill,removed,Removed ~/.agents/skills/reverse-engineer-anything. after uninstall, rea-<command> folders in ~/.agents/skills: 69 after uninstall, entries in ~/.claude/skills other than the control: 70 dangling symlink: ~/.claude/skills/reverse-engineer-anything -> ../../.agents/skills/reverse-engineer-anything control ~/.agents/skills/my-notes: kept control ~/.agents/skills/rea-notes: kept control ~/.claude/skills/rea-notes: kept manifest left: ~/.local/share/incur/rea.json ``` ### Typed outcome or recovery expected Run the script against a fixed build. Today it reports 69 `rea-<command>` folders, 70 entries in `~/.claude/skills` other than the control, a dangling link, and a manifest left after uninstall. Restoration means it reports 0 folders, 0 entries other than the control, no dangling link, and no manifest line, while all three `control ... kept` lines still print. A fix that disables `skills add` so it writes nothing also satisfies this check; a command that is merely hidden from help but still writes these files does not. ### Analysis or suspected cause - Expected source: `rea uninstall` help text from src/cli/setupCommands.ts line 129; docs/installation.md line 312 on `main` (line 304 in the release); README.md lines 209 and 216. - Failure source: the script output above, run locally in throwaway homes against both tested builds. - Evidence provenance: observed - Local verification: reproduced - Reproduction completeness: complete README.md line 209 alone says uninstall removes "only REA-owned MCP registrations and the managed skill", which the observed uninstall did. The violation rests on the help text and installation guide covering REA-owned skill files and on the premise above that files written by `rea skills add` are REA-owned. The command reaches REA because src/cli.ts lines 43-51 pass a `sync` option with `include: ["skills/*"]` to `Cli.create` from the `incur` CLI framework, which then serves its built-in `skills add` and `skills list`; uninstall removes only the canonical path (src/application/Uninstall.ts, `removeManagedSkills`). These locators explain the gap; they do not prescribe a fix. ### Additional context #660 covers `rea skills add` replacing the managed `reverse-engineer-anything` skill with a `SKILL.md`-only copy. Disabling the `skills` helper would close both reports; teaching uninstall about everything the helper writes would close this one. The sibling `rea mcp add` helper also writes an agent registration (`~/.claude.json` in a local run) without setup's plan; it is mentioned only as context.
bsakaguchi 2026-10-15 18:23:48 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#315
No description provided.