« Back to projects

gfm-tidy

A userscript that adds buttons to GitHub's markdown toolbar, and lets you reorder or hide the rest.

gfm-tidy is a userscript that adds extra buttons to GitHub’s markdown comment toolbar, and gives you control over which of GitHub’s own buttons you keep. It works on issues, pull requests, review comments and discussions.

It exists because AI agents write annoying GitHub comments: text hard-wrapped at 80 columns (GitHub renders a single line break as a <br>, so every wrap shows up), commit hashes in backticks (which stops GitHub linking them), and code indented to wherever it happened to sit in the source.

The buttons:

  • Unwrap joins hard-wrapped lines back into full-length paragraphs and frees commit hashes from their backticks, leaving code fences, tables, lists and headings alone
  • Dedent strips the leading whitespace common to every line
  • Details wraps the text in a <details> box, with the <summary> placeholder selected so you can type over it
  • Alerts inserts a GitHub alert, one button per kind: Note, Tip, Important, Warning and Caution
  • Configure opens a panel where you can drag any toolbar button into a new order, hide it, or add separators, including GitHub’s own buttons

Changes apply immediately with no page reload, and undo works as you’d expect. The layout is stored by the userscript manager, so it follows you between machines.

One file, no build step, no dependencies. Install Violentmonkey or Tampermonkey, then open gfm-tidy.user.js and confirm the prompt. Updates are automatic.

See the source code and installation instructions on GitHub.