How to Save GitHub Repos, Issues, and PRs as Markdown (2026 Guide)
GitHub content is scattered across READMEs, issues, PRs, discussions, and gists --- and feeding any of it to an LLM is painful unless it’s in Markdown. The README is already there, sure, but the part you actually need is the 80-comment issue thread where someone finally figured out the workaround, or the PR where the breaking change got explained, or the discussion that explains why the API was designed that way. None of that is one click away from being usable Claude context.
This guide covers every method to convert GitHub content to clean Markdown --- from a single README to a long PR discussion to an entire repo.
Why Save GitHub Content as Markdown?
Markdown is the format that works wherever code knowledge needs to go:
- Feed it to an LLM --- Claude, ChatGPT, Gemini, and local models all read Markdown natively as context, with code blocks and language identifiers preserved
- Drop it into Obsidian or Notion --- one file per issue or repo, fully searchable, properly headed
- Archive a thread before it gets locked or deleted --- maintainers close issues, repos go private, your notes shouldn’t depend on GitHub’s uptime
- Build offline documentation --- compile READMEs from multiple repos into a single reference
- Quote a specific comment in a long thread --- jumping back to the one useful reply in a 200-comment issue is one search away
The use case driving most GitHub-to-Markdown traffic in 2026 is the first one: developers want to ask an LLM about a library, a bug, or a design decision, and pasting the URL doesn’t give the model what it needs.
Method 1: Save (Fastest, One Click)
Save is a Chrome extension that turns any GitHub page into a Markdown file with one click. It reads the rendered page, reconstructs the original Markdown where possible, and produces something that drops straight into Claude, Obsidian, or your docs folder.
How it works:
- Open the GitHub page in Chrome --- repo, issue, PR, discussion, gist, or wiki
- Click the Save extension icon in your toolbar
- A
.mdfile downloads instantly (or lands in your Save Vault if connected)
What you get:
- READMEs with code blocks, tables, and headings intact
- Issue and PR title, body, status, threaded comments
- Discussion threads with proper nesting
- Linked referenced issues and
@mentionspreserved - Labels, milestones, assignees as frontmatter
- Code blocks keep their language identifier (so syntax highlighting works in Markdown viewers)
- Gists (single-file and multi-file) supported
- Frontmatter with repo, author, date, URL, and state (open/closed/merged)
What gets removed:
- GitHub nav chrome, sidebars, and footer
- Reaction emoji rows under each comment
- “X hidden items” collapses (Save expands and includes them)
- Bot comments from CI, dependabot, and stale-bot (toggleable)
- Repeated quote-replies that just echo the previous comment
Best for: Developers debugging with AI, technical writers compiling docs, researchers archiving threads, anyone building a personal knowledge base of how libraries actually work in practice. If you need clean Markdown that you’ll paste into Claude or read in Obsidian, this is the cleanest path.
Example Output
Saving an issue thread produces:
---
title: "Memory leak when using streaming with large responses"
repo: anthropics/anthropic-sdk-python
number: 412
author: alice-dev
state: closed
labels: ["bug", "streaming", "memory"]
assignees: ["bob-maintainer"]
milestone: "v0.34.0"
created: 2026-03-12
closed: 2026-03-18
url: https://github.com/anthropics/anthropic-sdk-python/issues/412
---
## Issue
When streaming responses larger than ~50MB, memory grows linearly and is
never released. Reproduced on Python 3.11 and 3.12, macOS and Linux.
**Reproduction:**
\`\`\`python
from anthropic import Anthropic
client = Anthropic()
with client.messages.stream(...) as stream:
for text in stream.text_stream:
print(text, end="")
\`\`\`
After the loop ends, `tracemalloc` shows the buffer is still resident.
## Comments
### bob-maintainer (maintainer) --- 2026-03-13
Confirmed. The internal buffer in `_streaming.py` isn't being cleared on
context exit. Looking at it now.
### alice-dev --- 2026-03-14
Thanks. Workaround for anyone hitting this: call `stream.close()`
explicitly before the `with` block exits. References #389.
### bob-maintainer (maintainer) --- 2026-03-18
Fixed in #418, released in v0.34.0. Closing.
That file is one paste away from being usable Claude context, one keystroke away from being a permanent Obsidian note.
Method 2: GitHub’s API + Script
GitHub’s REST and GraphQL APIs expose everything --- READMEs, issues, comments, PR diffs. You can write a script to fetch and convert.
gh api repos/OWNER/REPO/issues/412 --jq '.body' > issue-412.md
gh api repos/OWNER/REPO/issues/412/comments --jq '.[].body' >> issue-412.md
Best for: Engineering teams building documentation pipelines, anyone scripting bulk exports of issues or PRs across many repos.
Problems with this approach:
- The API returns raw Markdown bodies, but stitching title + body + comments + metadata into one readable file is your problem
- Frontmatter (labels, milestones, assignees, state) requires multiple API calls and manual assembly
- Comment ordering, author attribution, and nested reply chains need custom logic
- Rate limits hit fast on large repos (5,000 requests/hour authenticated)
- Discussions live behind the GraphQL API, not REST, so the script is two pipelines
- PR diffs and review comments are separate endpoints again
This is the right method if you’re building a pipeline. It’s overkill for one issue.
Method 3: Clone + Local Conversion (for whole repos)
For READMEs and in-repo docs, the simplest method is to clone and read the files directly --- they’re already Markdown on disk.
git clone https://github.com/OWNER/REPO.git
cd REPO
cat README.md docs/*.md > combined.md
Best for: Developers who want offline access to a repo’s docs, or who need to feed an entire docs tree to a long-context LLM.
Problems with this approach:
- Only works for content stored in the repo (READMEs,
/docs, wiki if cloned separately) - Doesn’t capture issues, PRs, or discussions --- those live in GitHub’s database, not the git tree
- Cross-references between docs and issues break (
#412doesn’t resolve locally) - Image URLs in READMEs often point to
user-attachments.githubusercontent.comand need rewriting for offline use - You still need a script to combine and clean if you want one file
Fine for “I want the docs offline.” Wrong tool for “I want this 80-comment issue thread.”
Method 4: Manual Copy from the Browser
The brute-force method: open the page, select all, paste into a Markdown editor, clean it up.
Steps:
- Open the issue or PR in the browser
- Select the relevant section (or the whole page)
- Paste into Obsidian, VS Code, or another Markdown editor
- Strip the UI noise (reactions, nav, sidebars) by hand
- Re-add code fences, fix the comment ordering, add frontmatter
Problems with this approach:
- Code blocks lose their language identifier and syntax highlighting
- Comment authorship and timestamps end up as freeform text, not structured frontmatter
- Tables in READMEs often paste as plain text with tab separators
- Reaction rows (
+1heartrocket) leak into the body - Threaded discussion nesting collapses to flat text
- Takes 10 minutes for a long thread; multiply by every issue you save
Works for one short README. Falls apart on real issue threads.
Which Method Should You Use?
| Scenario | Best Method |
|---|---|
| Paste an issue or PR into Claude | Save --- one click, structured output |
| Archive a long discussion thread | Save --- nesting and metadata preserved |
| Build an offline copy of a repo’s docs | git clone --- READMEs are already Markdown |
| Bulk-export issues across many repos | GitHub API + script --- programmatic |
| Save a single README quickly | Save --- skip the clone step |
| One-off quick reference for personal notes | Manual copy --- works for short pages |
For most developers --- especially anyone using GitHub content as AI context --- Save is the answer. It produces the cleanest Markdown with zero setup, and it handles long issue threads at the same speed as a README.
Edge Cases Save Handles
- Private repos. Save uses your logged-in browser session. If your GitHub account can see the repo, Save can read it. No API token to configure.
- Self-hosted GitHub Enterprise. Works on any
github.*domain pattern. Save reads the rendered page, so as long as the UI is GitHub’s standard layout, the conversion works. - GitHub Discussions vs Issues. Both supported. Discussions get their category as frontmatter (
category: Q&A,category: Announcements) and nested replies as a threaded structure. - PR diffs and file changes. Kept when relevant. The PR body, review comments, and file-level conversations are included. The raw diff itself is summarized rather than dumped --- you usually don’t want 5,000 lines of diff in your LLM context.
- Reaction emoji rows. Stripped. The
+1,heart,rocketrows under each comment are noise for everything except trending analysis. - Very long issue threads. For threads with hundreds of comments, Save keeps the issue body, the maintainer responses, the resolution comment, and a “Other comments: N omitted” marker. Toggleable to full-include if you need every reply.
- Wiki pages. Repo wikis are supported. Each page becomes one Markdown file, with internal wiki links rewritten as relative paths.
- Project boards. Project board views are captured as a structured list: column → card title → linked issue/PR. Useful for archiving a sprint before it closes.
- Bot comments. Dependabot, stale-bot, CodeQL, GitHub Actions --- all detected and toggleable. Off by default because they almost always add noise.
- Code blocks with language identifiers. The triple-backtick language tag (
```python,```rust) is preserved so any Markdown renderer or LLM gets the syntax-highlighting hint. - Gists. Single-file and multi-file gists both supported. Multi-file gists become a single Markdown file with each file as a section.
Pair It With Your Workflow
The Markdown output works wherever you need it:
- Claude / ChatGPT / Gemini --- paste the file in, ask “why was this issue closed?” or “summarize the design decision in this PR”
- Obsidian --- drop it in your vault, link issues to related notes, search across every library you’ve saved
- Notion --- paste directly, headings, tables, and code blocks render correctly
- Cursor / Claude Code --- drop the file into the project, the AI now has the upstream context when suggesting fixes
- Save Vault --- if you’ve connected one, every GitHub save lands there automatically with the repo as a tag and backlinks to other saved threads
FAQ
Does Save work on private repos? Yes. It uses your logged-in browser session, so anything your GitHub account can see, Save can save. No PAT or OAuth setup required.
Does it work on GitHub Enterprise (self-hosted)?
Yes. Any GitHub UI is supported regardless of the domain. If your company runs github.acme-corp.com, Save works there too.
Will it capture every comment in a 500-comment thread? By default, Save keeps the issue body, maintainer responses, and the resolution. For the full thread, toggle “Include all comments” in the extension menu before saving.
Are code blocks formatted correctly?
Yes. Triple-backtick fences and language identifiers are preserved exactly. ```python stays ```python so any LLM or Markdown viewer gets syntax highlighting.
Does it handle PR diffs? The PR body, review comments, and inline file conversations are included. The raw diff is summarized by file rather than dumped wholesale --- usually what you want for LLM context. Toggle “Include raw diff” if you need the full patch.
What about GitHub Discussions? Fully supported. Categories, threaded replies, and marked-as-answered status all come through as structured Markdown.
Does it preserve @mentions and cross-references?
Yes. @username mentions stay as plain text mentions, and #123 issue references are kept as-is. If you want them as hyperlinks back to GitHub, the extension can rewrite them on save.
Does it work on the GitHub mobile site? The extension is desktop Chrome only. On mobile, copy the URL and open it on desktop, or share to a Save Vault on Mac.
How much does it cost? Save has a free tier so you can try it on a few repos and issues. After that, a small subscription covers heavier use.
Related Save Guides
- Save Stack Overflow Answers as Markdown --- accepted answers with code blocks and comments
- Save ChatGPT Conversations as Markdown --- every turn, with code blocks intact
- Save Claude Conversations as Markdown --- artifacts, code, and reasoning preserved
- Save YouTube Videos as Markdown --- transcript, summary, timestamps, chapter markers
## Continue reading
How to Save a Claude Conversation as Markdown (Artifacts, Citations, Projects)
Convert Claude conversations to clean Markdown: every turn, Artifacts as code blocks, citations preserved. Complete guide for researchers and AI users.
How to Save a ChatGPT Conversation as Markdown (Every Turn, Code Blocks Intact)
Convert any ChatGPT conversation to clean Markdown: every turn, code blocks, tables, citations. Complete 2026 guide for researchers and AI users.
How to Save a Notion Page as Markdown (Toggles Expanded, Databases as Tables)
Convert any Notion page to clean Markdown: toggles expanded, databases as tables, callouts preserved. Complete 2026 guide for Obsidian and AI users.
How to Save a Reddit Thread as Markdown (With Comments and Context)
Convert any Reddit thread to clean Markdown with nested comments, karma, flair, and OP markers preserved. Complete 2026 guide for researchers and AI users.
Written by
Jean-Sébastien Wallez
I've been making internet products for 10+ years. Built Save on weekends because I wanted my own reading library in clean markdown for Claude and Obsidian. Write here about web clipping, AI workflows, and the small things that make a personal knowledge base actually useful.