ClaudeCodeMod

All shelves / Mods / Workflow

session-cleanup

By dougcunha

session-cleanup is a Claude Code workflow mod by dougcunha.

Lists the files a session created and the Git items it left in a /cleanup pane, then moves the files you pick to the trash and hands the Git items to Claude.

Draws

Install

The marketplace name is claude-mods.

In Claude Code
/plugin install session-cleanup --marketplace dougcunha/claude-mods
Open the repo

It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.

Version
0.1.0
License
MIT
Repo stars
4
Last change
2026-11-07

What it can reach

  • Draws in the session
  • Sees tool calls
  • Runs a command when you press
  • Calls another program on this machine

Answer y to add the marketplace, then pick a scope. Needs session-info, from the same marketplace: install it too. The repository README also adds the marketplace once with /plugin marketplace add dougcunha/claude-mods and installs by name. Type /cleanup before you end the session; the exit hook runs in at most 1.5 seconds and cannot hold the exit, so it cannot ask at exit. Nothing is removed or changed until you press the apply button. Files go to the system trash by default; removeMode can instead be quarantine, which moves them to ~/.claude/cleanup-quarantine/ with a manifest and deletes runs older than quarantineDays (7 by default) when a session starts, or delete, which deletes for good. It does not see a file that a script, a build or a test run writes, unless session-info sees it or it is a new entry of the system temp folder. The author tested it on Claude Code 2.1.316. Settings are in /config.

The marketplace, claude-mods, also holds session-info, topic-guard, feature-progress, and visual-review. Tidying up after a session is why this page files it under workflow. change-ledger, by arasovic, draws a pane of every file this session touched, with lines added and removed and which agent edited it, beside the git working tree. git-nudge, by nextscape, draws a line and a band when the repo falls behind upstream, keeps unpushed commits or old stashes, or stops mid-rebase. This one lists only what the session created that Git does not track, from four sources: the files session-info records as created, the paths a Bash or PowerShell command names as its output, changes in the system temp folder since the mod loaded, and the session's scratchpad folder. A file in a temp folder, with a temporary name, or outside every repository is pre-selected, and no Git item is. The Git section covers tracked files with uncommitted changes, submodules, a detached HEAD, and commits not pushed or a branch with no upstream; the chosen Git items go to Claude as one prompt that tells it to ask you before it commits, pushes, discards changes or moves a HEAD. After the apply it scans again and shows what it could not remove and why.

Demo

The What it does section of the session-cleanup README: /cleanup opens a pane with two checklists and removes nothing until you press apply; the Files list of what the session created, from four sources (what session-info records, the paths shell commands name as output, the system temp folder, the session's scratchpad), and the Git list of uncommitted changes, submodules, a detached HEAD and unpushed commits.
Screenshot of the author's GitHub page.

What it hooks into

  • session.startWhen a session starts
  • tool.callAround a tool call, where it can hold oneBashPowerShell
  • turn.completeWhen a turn ends
  • session.endWhen a session ends
  • command.runWhen you run its slash command
  • ui.renderDraws into the sessionPane

Read from the on() calls in its hook modules. Open its source under Files to check what each one does.

Files

The author's README and source, 4 files. They load when you open them.

Facts

Author
dougcunha
Category
Workflow
Marketplace
claude-mods
Repo
dougcunha/claude-mods
Folder
session-cleanup
Version
0.1.0
License
MIT
Repo stars
4
Last change
2026-11-07
Language
TypeScript
Files
19

Other mods in Workflow

superpowers-progressnextscapeDraws a pane beside the chat for a Superpowers run: the plan's title, the workflow stage, the current task and step, a progress bar, and the ledger's rulings.mazyosMazzeo-MarketingHolds a commandPuts a business's memory files in every session, draws a side panel and a status line for them, and asks before git push --force or git reset --hard.podium-reportereengelkingReports each session's model, context, cost, and failures to a Podium console, and draws a status line under the prompt with the live session count.hivehouseCleveland-RDHolds a commandDraws the hub screen for a team of Claude sessions in tmux, and refuses Edit, Write, and git commands that change a repository in the hub session.better-memoryxobotyiHolds a commandRefuses the agent's writes to the memory folder except through its own save tool, which needs an anchor from the session, and clears stale entries when idle.llx-deskrsaryevOpens browser pages and terminals in a window you watch, draws a pane of its tabs, and sends the comments you make in the window to Claude as messages.scrubjay-uihenba1Draws named rows for scrubjay's archive lookups, live sync steps above the prompt, and its /sj commands in blue, for sessions kept on every machine you own.agentworksmanishiitgDraws incoming AgentWorks messages as a short preview with the sending agent's name, the person's name for a shared sender, and the network it came through.coder-workspace-statuscoderDraws the Coder workspace Claude Code runs in above the prompt: health, startup scripts, autostop, repositories, and ports, with a full card from a command.apiariusyusuflkqDraws a live deck of every agent and subagent in the session, in the Desktop side pane, the terminal, or a browser tab, and an agents band above the prompt.feature-devjuanmhidalgoDraws a Features pane beside the transcript with each feature's status and buttons to plan, review, continue, or delete, and a band above the prompt.ai-cli-jobsmoerasermaxDraws a table of ai-cli background jobs above the prompt, with status, source, model, task, and time, and a one-line job count in the hint line below it.
All 396 in Workflow