Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: clean home-scope skill registration on uninstall; back up config files (#1121)#1310

Open
fliaght wants to merge 1 commit into
safishamsi:v8from
fliaght:fix/uninstall-registration-backup
Open

fix: clean home-scope skill registration on uninstall; back up config files (#1121)#1310
fliaght wants to merge 1 commit into
safishamsi:v8from
fliaght:fix/uninstall-registration-backup

Conversation

@fliaght

@fliaght fliaght commented Jun 14, 2026

Copy link
Copy Markdown

Problem

Global graphify install writes the # graphify skill registration to a home-scoped file (~/.claude/CLAUDE.md, and ~/.codebuddy/CODEBUDDY.md for codebuddy), but graphify uninstall only stripped ./CLAUDE.md in the cwd — and matched the wrong heading level (## vs the # install wrote). Result: the registration is orphaned, left pointing at a now-deleted skill. Project-scope (--project) was already symmetric; this was global-scope only.

Fix

  • claude_uninstall / codebuddy_uninstall now strip the home-scope # graphify block on global (non-project) uninstall, via a shared _strip_skill_registration helper.
  • Backup safety net: install/uninstall now snapshot any user-editable config file (CLAUDE.md, CODEBUDDY.md, GEMINI.md, AGENTS.md, VS Code instructions) to ~/.graphify/backups/<date>/ before modifying or deleting it. GRAPHIFY_NO_BACKUP=1 disables it; mirrors the existing export.backup_if_protected convention. graphify-owned files (skill trees, Cursor/Devin rule files) are intentionally not backed up — they hold no user content.

Audit

Checked every platform's install-target vs uninstall-target. Only claude and codebuddy had the home-scope asymmetry (both fixed); gemini, the AGENTS.md family, and vscode were already symmetric.

Tests

  • Home-scope uninstall regressions for claude and codebuddy (with sandboxed Path.home()).
  • New tests/test_install_backup.py suite covering the backup helper and GRAPHIFY_NO_BACKUP.
  • Full suite: 2039 passed, 28 skipped.

… files (safishamsi#1121)

Global `graphify install` writes the `# graphify` skill registration to a
home-scoped file (~/.claude/CLAUDE.md, and ~/.codebuddy/CODEBUDDY.md for
codebuddy), but uninstall only stripped ./CLAUDE.md in the cwd and matched the
wrong heading level, orphaning the registration pointing at a deleted skill.

- claude_uninstall / codebuddy_uninstall now strip the home-scope `# graphify`
  block on global (non-project) uninstall, via a shared
  _strip_skill_registration helper.
- Add a backup safety net: install/uninstall snapshot any user-editable config
  file (CLAUDE.md, CODEBUDDY.md, GEMINI.md, AGENTS.md, VS Code instructions) to
  ~/.graphify/backups/<date>/ before modifying or deleting it. GRAPHIFY_NO_BACKUP=1
  disables it. graphify-owned files (skill trees, Cursor/Devin rules) are not
  backed up.
- Tests: home-scope uninstall regressions for claude and codebuddy, plus a
  dedicated backup suite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant