DEV Community

Mateusz Daniluk
Mateusz Daniluk

Posted on

I got tired of copy-pasting GitHub issues into AI chats. So I fixed it.

Every developer I know has done this.

You're debugging something and find a GitHub issue that looks exactly like your problem. 40 comments. Code snippets. Someone from the core team explaining the root cause. Gold.

So you paste the URL into Claude or ChatGPT - and what the model gets is a mess.

Navigation bars. Sidebar labels. Reaction emojis. Repo metadata. Random page chrome. The actual issue thread is buried somewhere in between.

That means more tokens, more noise, worse answers.

Sometimes it gets even worse. The model starts referencing unrelated UI text or picks up junk from the page layout, confidently reasoning about something that has nothing to do with your original issue. So now you're debugging the AI context itself before you can debug the real bug.

Sure, you can manually copy the title, description, comments, and code blocks. But that's easily 2 minutes every time. Do that 5 times a day and you're losing 10+ minutes daily to pure workflow friction.

The fix

So I built github2md.com.

The idea is embarrassingly simple:

github.com/facebook/react/issues/24502
↓
github2md.com/facebook/react/issues/24502
Enter fullscreen mode Exit fullscreen mode

That's it. You get clean Markdown: title, description, all comments, labels, and code blocks, pulled directly from the GitHub API. No HTML noise. No sidebars. No irrelevant page chrome. Just clean context ready for AI.

Why Markdown

GitHub's REST API already returns issue bodies in Markdown. That means no scraping, no brittle HTML parsing, no CSS selector maintenance, no DOM cleanup.

Markdown is also far more token-efficient for structured debugging context. Less noise means the model focuses on what actually matters: the bug, repro steps, maintainer comments, the fix.

Real numbers

I benchmarked the React issue facebook/react#24502.

Raw GitHub issue HTML:

curl -L -A "Mozilla/5.0" https://github.com/facebook/react/issues/24502
Enter fullscreen mode Exit fullscreen mode
  • 114,332 tokens
  • 313,657 characters

github2md output:

curl -L -A "Mozilla/5.0" https://github2md.com/api/facebook/react/issues/24502
Enter fullscreen mode Exit fullscreen mode
  • 6,075 tokens
  • 24,452 characters

Token counts measured using the OpenAI Tokenizer.

That's a 94.7% reduction in tokens. The same issue thread dropped from 114k noisy HTML tokens to just 6k clean Markdown. The difference between wasting your context window on GitHub's UI and giving the model only the debugging signal. Same issue. Same comments. Same code blocks. 18.8× fewer tokens.

The bigger idea

What really inspired this was Context7. Watching it fetch fresh docs as a subagent made something click:

Fetching context is a mechanical task, not a reasoning task.

A GitHub issue fetcher doesn't need an expensive reasoning model. It just needs to reliably pull the right text. That means this can run on something cheap like Claude Haiku, while the stronger model focuses only on reasoning.

Cheap model fetches. Expensive model thinks. That split just makes sense.

Also works inside Claude Code

If you want zero browser tab switching, I also turned it into a Claude Code skill:

npx skills add ptu14/github2md
Enter fullscreen mode Exit fullscreen mode

Now Claude can fetch and convert GitHub issues directly inside your workflow.


Small tool. Very specific problem. Huge reduction in token waste.

If you regularly feed GitHub issues into AI, this makes the workflow dramatically smoother.

github2md.com

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.