fix: clean home-scope skill registration on uninstall; back up config files (#1121)#1310
Open
fliaght wants to merge 1 commit into
Open
fix: clean home-scope skill registration on uninstall; back up config files (#1121)#1310fliaght wants to merge 1 commit into
fliaght wants to merge 1 commit into
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Global
graphify installwrites the# graphifyskill registration to a home-scoped file (~/.claude/CLAUDE.md, and~/.codebuddy/CODEBUDDY.mdfor codebuddy), butgraphify uninstallonly stripped./CLAUDE.mdin 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_uninstallnow strip the home-scope# graphifyblock on global (non-project) uninstall, via a shared_strip_skill_registrationhelper.CLAUDE.md,CODEBUDDY.md,GEMINI.md,AGENTS.md, VS Code instructions) to~/.graphify/backups/<date>/before modifying or deleting it.GRAPHIFY_NO_BACKUP=1disables it; mirrors the existingexport.backup_if_protectedconvention. 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
Path.home()).tests/test_install_backup.pysuite covering the backup helper andGRAPHIFY_NO_BACKUP.