session-cleanup

by Douglas Cunha · ★ 4 · updated 13 days ago

PanesGuardsCommandsvalidates

0

The /cleanup command lists the temporary files the session created and the Git items it left (uncommitted changes, changed submodules, a detached HEAD, unpushed commits); choose what to send to the trash and what to ask Claude to fix.

install session-cleanup

Install

/plugin marketplace add dougcunha/claude-mods
/plugin install session-cleanup@claude-mods

Then run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.

View source on GitHub

What it hooks into

From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.

Events
session.starttool.callturn.completesession.endcommand.runui.render
API calls
$.clock.now$.command.register$.env.get$.fs.exists$.fs.list$.fs.stat$.fs.write$.process.run$.prompt.submit$.session.cwd$.session.id$.session.root$.state.get$.state.set$.ui.close$.ui.open$.ui.resolve$.ui.toast
Draws
Pane
Can see
Bash callsPowerShell calls
Reach
level 2 of 3 runs processeswrites filesdrives Claudereads filesreads env varsreads mod statedraws

Origin

How it got here
Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
Repository
github.com/dougcunha/claude-mods
Path in repo
session-cleanup
Source commit
78689f0 the exact code the scan read
Author
Douglas Cunha @dougcunha
License
MIT
First published
Last pushed
First listed here

Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.

More from dougcunha/claude-mods

feature-progress

dougcunha/claude-mods

A tool any spec-driven flow calls to report the progress of a feature and its tasks; a band above the prompt shows the stage and the count, and a pane lists every task with its state, round, steps and note.

★ 4PanesBandsGuards

session-info

dougcunha/claude-mods

Session pane: context, cost and turns, the prompt cache with the time until it expires, keep warm and a guard that holds a prompt that would write an expired cache again, the last turn's tokens, cache, tools and refused calls, a task list Claude keeps with a switch that keeps Claude working while tasks remain open, an autopick switch that answers a question left unanswered with its recommended...

★ 4PanesBandsGuards

topic-guard

dougcunha/claude-mods

Before a prompt enters the session, a small model judges whether it belongs to the session's topic. When it starts a separate topic, the mod holds it in the prompt box: press Enter to keep it here, or New session to clear the session and send it there.

★ 4BandsStatus linePrompt

visual-review

dougcunha/claude-mods

The /visual-review command shows the design of the changes against a base branch as a diagram in the browser: classes and modules with their relations, size and quality notes, and the database tables. Comment on the diagram and send the review back to the session in one step.

★ 4Status lineGuardsCommands