uninstall — команда для Claude Code: что делает и как установить
Команда uninstall удаляет flow-next из проекта. Она убирает маркеры из документации и готовит список команд для безопасного стирания папок.
MIT ★ 730 обновлён 2026-10-29
/plugin marketplace add gmickel/flow-next
/plugin install flow-next@flow-nextЧто делает uninstall
Команда запускает пошаговую деинсталляцию flow-next через встроенный вопрос пользователю. Сначала агент спросит, подтверждаете ли вы удаление, а затем предложит выбор: сохранить задачи и спецификации в .flow/ или стереть всё целиком.
Удаление разделено на два этапа. Безопасную часть ассистент делает сам: вычищает блоки <!-- BEGIN FLOW-NEXT --> и разметку маршрутизации моделей из CLAUDE.md и AGENTS.md. Если маркеры маршрутизации повреждены или не сходятся, агент не станет трогать файл и сообщит об ошибке. Также из .flow/meta.json удаляются служебные метки версии.
Опасные файловые операции модель не выполняет в терминале напрямую, чтобы защита вроде Destructive Command Guard не блокировала процесс. Команда формирует инструкции для ручного запуска: очистку .flow или удаление автосгенерированных конфигов агентов из .codex/agents/. Стирать эти файлы придётся самостоятельно через терминал.
Какие задачи решает
- очистить
CLAUDE.mdиAGENTS.mdот разметкиflow-next - безопасно удалить автосгенерированные конфиги агентов из
.codex/agents/ - подготовить команды полного или частичного удаления каталога
.flow - убрать блоки маршрутизации моделей без риска повредить файлы проекта
Примеры запросов агенту
- /uninstall
- Удали flow-next из проекта, но сохрани задачи в .flow
- Запусти деинсталляцию flow-next и очисти AGENTS.md
Как установить uninstall
1Через маркетплейс плагинов
/plugin marketplace add gmickel/flow-next/plugin install flow-next@flow-next2Вручную: положить файлы
.claude/commands/uninstall.mdВызов — /uninstall. Для всех проектов — ~/.claude/commands/
Вручную: положить файлы
~/.codex/prompts/uninstall.mdВызов — /prompts:uninstall. В Codex этот формат помечен устаревшим, замена — скиллы
Вручную: положить файлы
.github/prompts/uninstall.prompt.mdВручную: положить файлы
.gemini/commands/uninstall.tomlGemini хранит команды в TOML: текст запроса — в поле prompt
Вопросы об uninstall
Как установить uninstall в Claude Code?
Для установки через маркетплейс выполните последовательно две команды: /plugin marketplace add gmickel/flow-next, а затем /plugin install flow-next@flow-next.
Что делает команда uninstall?
Она интерактивно запрашивает режим деинсталляции flow-next, чистит системные комментарии в документации и выводит точные терминальные команды для удаления файлов.
Почему команда не стирает директории сама?
Деструктивные вызовы вроде rm -rf требуют ручного подтверждения человеком. К тому же утилиты защиты вроде Destructive Command Guard блокируют подобные действия агентов.
Исходный текст
uninstall.md · MIT
--- name: uninstall description: Remove flow-next files from project disable-model-invocation: true --- # Flow-Next Uninstall Use `AskUserQuestion` to confirm: **Question 1:** "Remove flow-next from this project?" - "Yes, uninstall" - "Cancel" If cancel → stop. **Question 2:** "Keep your .flow/ tasks and specs?" - "Yes, keep tasks" → partial uninstall - "No, remove everything" → full uninstall ## Generate removal instructions Based on answers, generate the appropriate commands and print them for the user to run manually. **If keeping tasks:** Setup copies nothing into `.flow/`, so uninstall there is marker removal: strip the `<!-- BEGIN FLOW-NEXT -->`...`<!-- END FLOW-NEXT -->` block from CLAUDE.md / AGENTS.md (the "Clean up docs" section below does that) and remove the `setup_version` / `setup_mode` stamps from `.flow/meta.json`. **Legacy cleanup — only when those paths actually exist** (repos set up before copy-less installs). Print this for the user to run manually; omit it entirely when none exist: ``` To complete uninstall, run these commands manually: rm -rf .flow/bin .flow/templates .flow/usage.md ``` **If removing everything:** ``` To complete uninstall, run these commands manually: rm -rf .flow ``` **Always check for Codex agent configs and add if any exist.** On Codex, setup copies flow-next's agent configs into `.codex/agents/`; each starts with `# Auto-generated by sync-codex.sh`. Remove only those, so user-authored agents stay: ```bash if grep -lq '^# Auto-generated by sync-codex.sh' .codex/agents/*.toml 2>/dev/null; then echo "grep -l '^# Auto-generated by sync-codex.sh' .codex/agents/*.toml | xargs rm -f" fi ``` ## Clean up docs (AI can do this) For CLAUDE.md and AGENTS.md: if file exists, remove everything between `<!-- BEGIN FLOW-NEXT -->` and `<!-- END FLOW-NEXT -->` (inclusive). This is safe for the AI to execute. **Also remove the optional model-routing scaffold block** (written by `/flow-next:setup`) from the same files. It is a *second*, independent marker pair: `<!-- flow-next:model-routing:start -->` … `<!-- flow-next:model-routing:end -->`. Apply the deterministic damaged-marker algorithm — line-based, never parsing the fenced content (the block is an example whose routing lines are all HTML comments): - Count the `<!-- flow-next:model-routing:start -->` and `<!-- flow-next:model-routing:end -->` lines. If there is **exactly one** start marker **and exactly one** end marker **and** the start line precedes the end line → remove the block inclusive (both markers and everything between them). - **Any other state** — zero or multiple starts, zero or multiple ends, or end-before-start (out of order) → report the block as damaged and **leave the file untouched**. Never guess which markers pair; a hand-edited file is the user's to fix. ## Report ``` Flow-next uninstall prepared. Cleaned up: - Flow-next sections from docs (if existed) - Model-routing scaffold block from docs (if a well-formed marker pair existed; damaged marker states are reported and left untouched) Run these commands manually to complete removal: <commands from above> Why manual? Destructive commands like rm -rf should have human hands on the keyboard. If you use DCG (Destructive Command Guard), it will block these commands from AI agents - this is intentional protection. ```
© Gordon Mickel · MIT · gmickel/flow-next