github-gist — Claude Code skill: publish files to GitHub Gist
A skill to quickly publish files and notes as GitHub Gist. Use it when you need to share code, create a shareable snippet link, or upload markdown without extra steps.
MIT 246 installs ★ 414 updated 2026-10-23
npx skills add glebis/claude-skills --skill github-gist -a claude-codeWhat github-gist does
The skill takes a file from your project and publishes it to GitHub Gist—either unlisted (default) or public. By default it creates an unlisted gist, but you can add --public to make it visible in your profile. It handles stdin input, filename overrides, custom descriptions, and can output just the URL or open it in your browser.
You need GitHub authentication to use it. The skill relies on gh CLI (check gh auth status); if it's not available, set a GITHUB_GIST_TOKEN environment variable with gist scope. The output is JSON with the gist URL, ID, and metadata.
What it helps with
- share a code snippet with a public link
- quickly publish a note or session log
- create an unlisted gist for archival without indexing
- rename a file when uploading to gist
- open the created gist directly in a browser
Example prompts for the agent
- Publish this file as an unlisted gist
- Create a gist from
config.jsonwith description 'Project config' - Upload as public and return only the URL
How to install github-gist
1Skills CLI (Vercel)
npx skills add glebis/claude-skills --skill github-gist -a claude-code2Manually: put the files in place
~/.claude/skills/github-gist/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/github-gist/
1Skills CLI (Vercel)
npx skills add glebis/claude-skills --skill github-gist -a codex2Manually: put the files in place
.agents/skills/github-gist/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add glebis/claude-skills --skill github-gist -a cursor2Manually: put the files in place
.cursor/skills/github-gist/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install glebis/claude-skills github-gist2Manually: put the files in place
.github/skills/github-gist/SKILL.md1Skills CLI (Vercel)
npx skills add glebis/claude-skills --skill github-gist -a gemini-cli2Platform CLI
gemini skills install https://github.com/glebis/claude-skills --path github-gistManually: put the files in place
.devin/skills/github-gist/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add glebis/claude-skills --skill github-gist -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about github-gist
How do I install github-gist in Claude Code?
Run npx skills add glebis/claude-skills --skill github-gist -a claude-code, then check ~/.claude/skills/github-gist/SKILL.md for setup details.
What does github-gist do?
It takes a file from your project and publishes it as a GitHub Gist—either unlisted (default) or public. Returns a direct link for sharing.
What do I need to use this skill?
GitHub authentication: either run gh auth login or set the GITHUB_GIST_TOKEN environment variable with gist permissions.
Source text
SKILL.md · MIT
---
name: github-gist
description: Publish files or Obsidian notes as GitHub Gists. Use when user wants to share code/notes publicly, create quick shareable snippets, or publish markdown to GitHub. Triggers include "publish as gist", "create gist", "share on github", "make a gist from this".
---
# GitHub Gist Publisher
Publish any file as a GitHub Gist for easy sharing.
## Prerequisites
Uses `gh` CLI by default. Ensure you're authenticated:
```bash
gh auth status
# If not authenticated: gh auth login
```
Fallback: Set `GITHUB_GIST_TOKEN` env var with gist scope.
## Usage
```bash
# Publish file as secret (unlisted) gist - DEFAULT
python3 scripts/publish_gist.py /path/to/file.md
# Publish as public gist (visible in your profile)
python3 scripts/publish_gist.py /path/to/file.md --public
# Custom description
python3 scripts/publish_gist.py /path/to/file.md -d "My awesome note"
# Override filename in gist
python3 scripts/publish_gist.py /path/to/file.md -f "readme.md"
# From stdin
echo "Hello" | python3 scripts/publish_gist.py - -f "hello.txt"
# Just get URL
python3 scripts/publish_gist.py /path/to/file.md --url-only
# Create and open in browser
python3 scripts/publish_gist.py /path/to/file.md --open
```
## Options
| Flag | Description |
|------|-------------|
| `--public` | Create public gist (default is secret/unlisted) |
| `-d, --description` | Gist description |
| `-f, --filename` | Override filename |
| `--url-only` | Output only URL |
| `--open` | Open in browser |
| `--api` | Force API instead of gh CLI |
## Output
```json
{
"url": "https://gist.github.com/user/abc123",
"id": "abc123",
"public": false,
"filename": "file.md"
}
```
## Example
Session log published with this skill: https://gist.github.com/glebis/3faaae6b907123929220e81add51a567
© glebis · MIT · glebis/claude-skills