"Remove Contour monitoring injection from CLAUDE.md, optionally delete data files. Safe: never deletes non-Contour files."
Install
npx skillscat add alexu0317-father/contour/uninstall Install via the SkillsCat registry.
/contour:uninstall
Remove Contour from this system. Cleans up CLAUDE.md injection and optionally deletes data files.
Safe by design: only removes content with Contour markers or Contour-prefixed filenames. Never touches files it didn't create.
Step 1 — Confirm intent
Ask (AskUserQuestion):
"This will remove Contour's monitoring injection from CLAUDE.md. Continue?"
Options: Yes, uninstall / No, cancel
If "No, cancel" → STOP.
Step 2 — Remove CLAUDE.md injection and rules file
2a — Remove CLAUDE.md entry block
Target file: ~/.claude/CLAUDE.md
- Read the file
- Find the block bounded by
<!-- Contour -->and<!-- End Contour -->(inclusive of both marker lines) - If found: delete the entire block (and any blank line immediately preceding it)
- If not found: note "No Contour injection found in CLAUDE.md" and continue
- Write the updated file back
2b — Remove hooks from settings.json
Target file: ~/.claude/settings.json
- If the file does not exist: skip silently
- Read and parse the file
- Remove the Contour SessionStart hook: in
hooks.SessionStart, find the entry whosecommandcontains the Contour data directory path (e.g.,.claude/contouror the resolved$AI_INFRA_DIR) and remove it - Remove the Contour Stop hook: in
hooks.Stop, find the entry whosecommandcontainscognitive-monitor.tsand remove it - If any hook array is now empty: remove that key. If
hooksobject is now empty: remove it entirely. - Write the updated file back
2c — Delete hook script
Target file: {AI_INFRA_DIR}/hooks/cognitive-monitor.ts
- If found: delete it
- If the
hooks/directory is now empty: remove the directory - If not found: skip silently
2d — Delete rules file
Target file: ~/.claude/rules/contour-monitoring.md
- If found: delete it
- If not found: skip silently
Step 3 — Ask about data files
Resolve the data directory: check $AI_INFRA_DIR, fall back to ~/.claude/contour/.
Ask (AskUserQuestion):
"Delete your Contour data files in {resolved_path}? This includes Core Profile, Domain State, and Extract Buffer. This cannot be undone."
Options: Yes, delete data files / No, keep data files
If Yes:
- List all files in the directory
- Delete only files matching these patterns:
*-core.md*-*.md(Domain State files)extract-buffer.mdhooks/cognitive-monitor.ts(and thehooks/subdirectory if empty)
- If the directory is now empty, remove it
- If the directory still contains other files (user-created), leave it in place
If No:
- Skip deletion, note the path so the user knows where files remain
Step 4 — Report
Contour uninstall complete ({date}):
CLAUDE.md: injection block removed (restart Claude Code to take effect)
settings.json: SessionStart + Stop hooks removed
Hook script: {AI_INFRA_DIR}/hooks/cognitive-monitor.ts removed
Data files: {deleted / kept at {path}}
Next step:
claude plugin uninstall Alexu0317-FATHER/contourRender the report in the user's language if detectable from the session; otherwise use English.
Safety rules
- Never delete files that don't match the patterns above
- Never delete
~/.claude/CLAUDE.mditself — only edit it - If any file operation fails, report the failure and continue with remaining steps
- If
CLAUDE.mddoes not exist, skip Step 2 silently