teardown — clean up plugin files
Caution
Teardown deletes brewcode project files permanently. Templates, configs, logs, plan directories, and grepai indexes are removed. The operation asks for confirmation before touching anything — unless --dry-run is passed.
Tip
Task directories and user rules are never touched. Everything under .claude/tasks/*_task/ and .claude/rules/ survives teardown unconditionally. Use --dry-run first to preview exactly what would be removed.
Quick reference
| Field | Value |
|---|---|
| Command | /brewcode:teardown |
| Arguments | [--dry-run] |
| Model | haiku |
| Context | fork |
| Tools | Bash, Read, AskUserQuestion |
When to use
- Project wrap-up — the task batch is done and the brewcode scaffolding is no longer needed in the repo
- Fresh start — you want to re-run
/brewcode:setupon a clean slate without leftover configs - Disk cleanup —
.grepai/indexes or log directories have grown large and are no longer useful - Preview before commit —
--dry-runshows exactly which files would go, without committing to removal
Examples
# Preview removals without deleting anything
/brewcode:teardown --dry-run
# Full teardown (prompts for confirmation)
/brewcode:teardown
# Natural language also triggers the skill
"clean up brewcode files"
"tear down brewcode setup"
Flow
- Receive arguments
The skill reads
$ARGUMENTS. If—dry-runis present, skip confirmation and go straight to listing. Otherwise proceed to the confirmation step. - Confirm (full mode only)
AskUserQuestion: “This will delete brewcode project files (templates, configs, logs, plans). Task directories are preserved. Proceed?” — answering No aborts with no changes made.
- Run teardown script
Executes
teardown.shfrom$CLAUDE_SKILL_DIR/scripts/. In dry-run mode the script only prints; in full mode it deletes. The skill stops with an error if the script is missing or not executable. - Print removal report
Each removed path is listed with a ✅. Paths that were skipped (not found or preserved) are listed with ⏭️. No silent deletions.
- Done
The project directory is clean. Run
/brewcode:setupagain at any time to re-initialise scaffolding.
Options
| Option | Behavior |
|---|---|
--dry-run | List files that would be deleted — no confirmation prompt, no changes |
| (none) | Full removal after explicit user confirmation |
What teardown removes vs. keeps
Removed
| Path | Contents |
|---|---|
.claude/tasks/templates/ | PLAN.md, SPEC.md, KNOWLEDGE.jsonl starters |
.claude/tasks/cfg/ | brewcode.config.json, brewcode.state.json |
.claude/tasks/logs/ | Execution logs |
.claude/plans/ | Intermediate plan files |
.grepai/ | Semantic search indexes |
.claude/skills/brewcode-review/ | Quorum review working files |
Always preserved
| Path | Reason |
|---|---|
.claude/tasks/*_task/ | Completed task work — your artifacts |
.claude/rules/ | User rules — not managed by brewcode |
Setup
Re-initialise brewcode scaffolding after teardown.
Start
Infinite task execution — the skill teardown cleans up after.
GitHub source
Source code and teardown.sh script.
Brewcode overview
All brewcode skills and agents in one place.
Updating plugins
/brewtools:plugin-update to check and update the brewcode plugin suite in one command.
See the FAQ for details.