markdown-cleanup-plugin
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.
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">
  
</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.
# 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...
- Acquire [NixOS 24.11][nixos] (or close enough).
- Boot into the installer.
- Do your partitions and mount your root to
/mnt(or don't, I'm not your supervisor) git clone https://github.com/emiller88/dotfiles /etc/nixos- Install NixOS:
nixos-install --root /mnt --flake /etc/nixos#XYZ, whereXYZis your
hostname. Use #generic for a simple, universal config.
- OPTIONAL: Create a sub-directory in
hosts/for your device. See [host/kuro]
as an example.
- Reboot!
macOS? Let me guess, someone stole your sweetroll.
- 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.
git clone https://github.com/emiller88/dotfiles ~/.config/dotfilescd ~/.config/dotfiles./bin/hey re(or ifheyisn'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
- Grab a coffee while Nix downloads the internet
sudo ./result/sw/bin/darwin-rebuild --flake .#HOSTNAME switchwhen prompted
Management
And I say, bin/hey. What's going on?
| Command | Description |
|---|---|
hey rebuild | Rebuild this flake (shortcut: hey re) |
hey upgrade | Update flake lockfile and switch to it (shortcut: hey up) |
hey rollback | Roll back to previous system generation |
hey gc | Runs nix-collect-garbage -d. Use sudo to clean system profile |
hey push REMOTE | Deploy these dotfiles to REMOTE (over ssh) |
hey check | Run tests and checks for this flake |
hey show | Show flake outputs of this repo |
hey skillkit-sync | Reinstall/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

Add dotfiles to your flake.nix:
{
inputs.dotfiles.url = "https://flakehub.com/f/Emiller88/dotfiles/*.tar.gz";
outputs = { self, dotfiles }: {
# Use in your outputs
};
}
Install & Usage
/plugin marketplace add <org/repo>Add the configuration to /plugin install markdown-cleanup-plugin@<marketplace>
/pluginUse Cases
Usage Examples
/markdown-cleanup-plugin run
Clean up stray markdown files from my last Claude Code session.
/markdown-cleanup-plugin --dry-run to preview which files would be removed.
Security Audits
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..