View *.mdc rules files in rendered Markdown on GitHub

GitHub doesn’t recognize .mdc as markdown so every Cursor rule you look at on GitHub is raw source. Frontmatter soup, unrendered headings, fenced code blocks as plaintext. Mermaid flowcharts? A wall of --> arrows.

I built a UserScript to fix that. It detects and renders *.mdc files on GitHub - rendering Markdown, code-fence syntax highlighting, and even Mermaid flowcharts. It renders by default, but also adds a toggle so you can drop back to the raw source. If you get a deep link to a line number, it does not automatically render; you’ll jump directly to the line of code, as intended.

Example

Example rendering of MDC on GitHub

Install

  1. Install a UserScript engine, such as Violentmonkey or Tampermonkey. GreaseMonkey probably works too.
  2. Install the UserScript from GreasyFork
  3. Open any .mdc on GitHub
  4. Done!