Github issue to markdown
Skill developmentseed/skills/skills/github-issue-to-markdown
Exports a GitHub Issue (including comments and private issues) to a clean Markdown file using the GitHub CLI (`gh`). Use when asked to archive, export, or save a GitHub issue.From its SKILL.md
npx -y skills add developmentseed/skills --skill github-issue-to-markdownAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.5 KB, as published. Nobody here has run it
GitHub Issue to Markdown
This skill leverages the official GitHub CLI (gh) to fetch issue data and converts it into a structured Markdown file.
Environment & Compatibility
[!IMPORTANT] Needs an authenticated
gh. This skill shells out to the GitHub CLI, so it runs whereghis installed and logged in — Claude Code on your own machine is the normal case.The claude.ai web sandbox cannot run an interactive
gh auth login; there, use the Copy-Paste Fallback below.
Copy-Paste Fallback (for Claude Web)
If you're using Claude on the web or don't have gh installed:
-
Run this command locally (replace the URL with your issue):
gh issue view "https://github.com/owner/repo/issues/123" --json title,body,author,createdAt,comments,url -
Copy the JSON output and paste it into Claude.
-
Tell Claude: "Convert this GitHub issue JSON to Markdown using the github-issue-to-markdown format."
For multiple issues, run for each issue and paste all JSON objects, or use:
gh issue list -R owner/repo --limit 5 --json title,body,author,createdAt,comments,url
Prerequisites (running the script yourself)
- GitHub CLI (
gh): Must be installed on your system. - Authentication: You must be logged in. Run
./run.sh --authif you need to sign in. - Multiple Accounts: The script uses whichever account
ghis currently authenticated as (orGH_TOKENif set). To use a different account for a run, set the token yourself:export GH_TOKEN=$(gh auth token --user <login>).
Usage
-
Export a Single Issue: Provide the full URL of the GitHub issue.
./run.sh "https://github.com/owner/repo/issues/123" -
Export Search Results: Provide a GitHub search URL. By default, it exports the first 5 issues without comments.
./run.sh "https://github.com/owner/repo/issues?q=is:issue+state:open" -
Options:
--limit N: Specify the maximum number of issues to export (default: 5).--comments: Include comments in the markdown output (off by default).
-
Where files land:
./output/under the directory you ran the command from — not under the skill's own directory. SetGH_ISSUE_OUTPUT_DIRto send every export to one fixed folder instead:export GH_ISSUE_OUTPUT_DIR=~/Documents/github-issue-exports(When a skill is installed as a plugin it runs from a versioned cache directory; anything written next to the script is stranded there on the next version bump. Hence caller-relative by default.)
Agent Instructions
When a user asks to export an issue:
If gh is available and authenticated:
- Check the active account: Run
gh api user --jq '.login'to see whoghis authenticated as. - Access denied? Never run
gh auth switchorgh auth loginyourself — account state belongs to the user. Instead, tell the user which account is active and ask them to pointGH_TOKENat the right one, then re-run:export GH_TOKEN=$(gh auth token --user <login>)
If in a restricted environment (Claude web) or gh is unavailable:
- Detect the limitation: If
ghis not installed, not authenticated, or network access is blocked. - Guide the user: Provide the exact command they need to run locally:
gh issue view "ISSUE_URL" --json title,body,author,createdAt,comments,url - Process pasted JSON: When the user pastes JSON, format it into Markdown following the standard output format (metadata header, description, comments with author/timestamp).
- Output format should match:
## Issue Title - **Author:** @username - **Created:** YYYY-MM-DD HH:MM:SS - **URL:** https://github.com/... ### Description [issue body] ### Comments #### @commenter commented on YYYY-MM-DD HH:MM:SS [comment body] ---
How it Works
- The skill first checks if
ghis authenticated. - It uses
gh issue view --jsonto fetch the title, body, author, and all comments. - A Python script (
scripts/export_issue.py) processes the JSON and generates a Markdown file with:- Metadata (Title, Author, Date, URL)
- The original issue description
- A threaded view of all comments with author attribution and timestamps.