Remove stale loop files, logs, and orphaned PROMPT.md files
Removes stale Lisa loop files, orphaned prompts, and plugin caches from the project.
/plugin marketplace add Arakiss/lisa/plugin install lisa@lisa-marketplaceClean up Lisa artifacts and stale files from the project.
.claude/lisa-loop.local.md (leftover from canceled/crashed loops).claude/lisa-loop.log (iteration logs from previous runs)PROMPT*.md and IMPLEMENTATION_PLAN*.md files in project root~/.claude/plugins/cache/When user invokes /lisa-clean:
test -f .claude/lisa-loop.local.md && echo "ACTIVE" || echo "NO_LOOP"
If ACTIVE, warn user:
"There's an active Lisa loop. Cancel it first with
/lisa-cancelor use--forceto clean anyway."
rm -f .claude/lisa-loop.local.md
rm -f .claude/lisa-loop.log
Report: "Removed state file and logs"
Look for untracked PROMPT and IMPLEMENTATION_PLAN files:
# Find untracked PROMPT*.md files
for f in PROMPT*.md IMPLEMENTATION_PLAN*.md; do
if [[ -f "$f" ]] && ! git ls-files --error-unmatch "$f" &>/dev/null; then
echo "ORPHAN: $f"
fi
done
For each orphaned file found:
If --all flag is provided, delete all orphaned files without prompting.
rm -rf ~/.claude/plugins/cache/*/lisa/*
Report: "Cleared plugin cache"
test -d ~/.claude/skills/lisa-guide && echo "ORPHAN" || echo "CLEAN"
If ORPHAN exists, remove it:
rm -rf ~/.claude/skills/lisa-guide
Report: "Removed orphaned skill"
Lisa cleanup complete!
Removed:
- State file: .claude/lisa-loop.local.md
- Log file: .claude/lisa-loop.log (847 lines)
- Orphaned prompts: PROMPT-EXPANSION.md, IMPLEMENTATION_PLAN-DOCS.md
- Plugin cache: 3 old versions (140KB)
Project is clean.
--force - Clean state file even if a loop appears active--all - Delete all orphaned prompt files without prompting--keep-logs - Preserve log file for analysis--dry-run - Show what would be cleaned without doing itLisa loops use PROMPT.md files to define tasks. These files are:
Over time, completed task prompts accumulate as clutter. This command helps clean them up.