BeClaude

markdown-cleanup-plugin

40Community RegistryDevelopmentby emiller · MIT

Automatically cleans up stray markdown files created during Claude Code sessions. Uses Stop hook to remove temporary files from /tmp while preserving important documentation. Silent operation with smart file detection.

First seen 4/17/2026

Summary

The markdown-cleanup-plugin skill automatically removes stray markdown files generated during Claude Code sessions, using a Stop hook to clean up temporary files from /tmp while preserving important documentation.

  • It operates silently with smart file detection, helping developers maintain a clutter-free workspace without manual intervention.

Overview

<div align="center">

![Made with Doom Emacs](https://github.com/hlissner/doom-emacs) ![NixOS 24.11](https://nixos.org) ![nix-darwin](https://github.com/nix-darwin/nix-darwin)

</div>

Hey, you. You're finally awake. You were trying to configure your OS declaratively, right? Walked right into that NixOS ambush, same as us, and those dotfiles over there.

Good news, traveler! These dotfiles now work on both NixOS and macOS. One config to rule them all, and in the darkness bind them.

sh
# Quick taste of what you're in for:
nix run nix-darwin -- switch --flake ~/.config/dotfiles  # macOS
nixos-rebuild switch --flake .#hostname                   # NixOS

Shell:zsh + a bunch of Nix magic
DM:lightdm + lightdm-mini-greeter
WM:bspwm + polybar (Linux) / Aerospace (macOS)
Editor:[Doom Emacs][doom-emacs] (and nvim when Emacs is napping)
Terminal:st (Linux) / Ghostty (macOS)
Launcher:rofi (Linux) / Raycast (macOS)
Browser:firefox / Zen Browser / Orion (I collect browsers)
GTK Theme:Ant Dracula

Quick start

NixOS? I used to be an adventurer like you...

  1. Acquire [NixOS 24.11][nixos] (or close enough).
  2. Boot into the installer.
  3. Do your partitions and mount your root to /mnt (or don't, I'm not your supervisor)
  4. git clone https://github.com/emiller88/dotfiles /etc/nixos
  5. Install NixOS: nixos-install --root /mnt --flake /etc/nixos#XYZ, where XYZ is your

hostname. Use #generic for a simple, universal config.

  1. OPTIONAL: Create a sub-directory in hosts/ for your device. See [host/kuro]

as an example.

  1. Reboot!

macOS? Let me guess, someone stole your sweetroll.

  1. Install Nix using the Determinate Systems installer (it's like the official installer, but actually works):

```sh

``` Why this installer? It handles macOS quirks, enables flakes by default, and won't leave you troubleshooting for hours.

  1. git clone https://github.com/emiller88/dotfiles ~/.config/dotfiles
  2. cd ~/.config/dotfiles
  3. ./bin/hey re (or if hey isn't in your PATH yet: nix run .#darwinConfigurations.HOSTNAME.system.build.darwin-rebuild -- switch --flake .)

- Use MacTraitor-Pro or Seqeratop for HOSTNAME, or check flake.nix for available configs

  1. Grab a coffee while Nix downloads the internet
  2. sudo ./result/sw/bin/darwin-rebuild --flake .#HOSTNAME switch when prompted

Management

And I say, bin/hey. What's going on?

CommandDescription
hey rebuildRebuild this flake (shortcut: hey re)
hey upgradeUpdate flake lockfile and switch to it (shortcut: hey up)
hey rollbackRoll back to previous system generation
hey gcRuns nix-collect-garbage -d. Use sudo to clean system profile
hey push REMOTEDeploy these dotfiles to REMOTE (over ssh)
hey checkRun tests and checks for this flake
hey showShow flake outputs of this repo
hey skillkit-syncReinstall/repatch @crafter/skillkit with Amp + Pi support

On macOS, hey re also re-applies the Skillkit patch via Home Manager for any host that enables modules.shell.skillkit. If you manually reinstall @crafter/skillkit, run hey skillkit-sync to put the patch back.

Frequently asked questions

  • How do I change the default username?

1. Set USER the first time you run nixos-install: USER=myusername nixos-install --root /mnt --flake #XYZ 2. Or change "emiller" in modules/options.nix (was "hlissner" in the before times). 3. For macOS: just make sure your username matches what's in the flake

  • How do I "set up my partitions"?

My main host has a README you can use as a reference. I set up an EFI+GPT system and partitions with parted and zfs.

macOS users: You can skip this part and feel smug about it.

  • Why is my build failing with homebrew errors?

That's just homebrew being homebrew. The build succeeded, you just need to run the activation with sudo. Check the message at the end of hey re.

  • How 2 flakes?

It wouldn't be the NixOS experience if I gave you all the answers in one, convenient place. But basically: everything is a flake now, resistance is futile.

[doom-emacs]: https://github.com/hlissner/doom-emacs [vim]: https://github.com/hlissner/.vim [nixos]: https://releases.nixos.org/?prefix=nixos/24.11/ [host/kuro]: https://github.com/hlissner/dotfiles/tree/master/hosts/kuro

Usage as a flake

![FlakeHub](https://flakehub.com/flake/Emiller88/dotfiles)

Add dotfiles to your flake.nix:

nix
{
  inputs.dotfiles.url = "https://flakehub.com/f/Emiller88/dotfiles/*.tar.gz";

  outputs = { self, dotfiles }: {
    # Use in your outputs
  };
}

Install & Usage

1
Add a marketplace
/plugin marketplace add <org/repo>
2
Install the plugin

Add the configuration to /plugin install markdown-cleanup-plugin@<marketplace>

3
Manage with /plugin
/plugin

Use Cases

After a Claude Code session that generated multiple temporary markdown files, automatically clean them up to keep your project directory tidy.
Prevent accidental commits of temporary markdown files by removing them before you stage changes.
When working on documentation, ensure only intentional markdown files remain by filtering out auto-generated ones.
During long coding sessions, avoid clutter buildup in /tmp by having stray files removed silently in the background.
After running a Claude Code task that produced debug or intermediate markdown output, automatically delete those files to save disk space.
When collaborating on a project, ensure temporary markdown files from your local Claude Code sessions don't end up in shared repositories.

Usage Examples

1

/markdown-cleanup-plugin run

2

Clean up stray markdown files from my last Claude Code session.

3

/markdown-cleanup-plugin --dry-run to preview which files would be removed.

View source on GitHub
documentationpluginmarkdowncleanupfile-managementautomationhooksproductivity

Security Audits

LicensePassSourceWarnRepositoryPass

Frequently Asked Questions

What is markdown-cleanup-plugin?

The markdown-cleanup-plugin skill automatically removes stray markdown files generated during Claude Code sessions, using a Stop hook to clean up temporary files from /tmp while preserving important documentation. It operates silently with smart file detection, helping developers maintain a clutter-free workspace without manual intervention.

How to install markdown-cleanup-plugin?

To install markdown-cleanup-plugin: add a marketplace (/plugin marketplace add <org/repo>), then add the config to /plugin install markdown-cleanup-plugin@<marketplace>. Finally, /plugin in Claude Code.

What is markdown-cleanup-plugin best for?

markdown-cleanup-plugin is a plugin categorized under Development. It is designed for: documentation, plugin, markdown, cleanup, file-management, automation, hooks, productivity. Created by emiller.

What can I use markdown-cleanup-plugin for?

markdown-cleanup-plugin is useful for: After a Claude Code session that generated multiple temporary markdown files, automatically clean them up to keep your project directory tidy.; Prevent accidental commits of temporary markdown files by removing them before you stage changes.; When working on documentation, ensure only intentional markdown files remain by filtering out auto-generated ones.; During long coding sessions, avoid clutter buildup in /tmp by having stray files removed silently in the background.; After running a Claude Code task that produced debug or intermediate markdown output, automatically delete those files to save disk space.; When collaborating on a project, ensure temporary markdown files from your local Claude Code sessions don't end up in shared repositories..