gist

Create GitHub gists using the gh CLI. Use when the user says "gist this", "create a gist", "share this as a gist", or wants to quickly share code snippets, files, or command output via GitHub Gist.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "gist" with this command: npx skills add saiashirwad/gist-skill/saiashirwad-gist-skill-gist

GitHub Gist

Create GitHub gists from files, code blocks, or command output using gh gist create.

Prerequisites

  • gh CLI installed and authenticated (gh auth status)

Quick Reference

# single file
gh gist create path/to/file.ts

# multiple files
gh gist create src/utils.ts src/types.ts

# glob patterns
gh gist create *.md

# with description
gh gist create -d "auth middleware example" src/auth.ts

# public gist
gh gist create --public handler.ts

# from stdin (pipe content)
echo "content" | gh gist create -f "snippet.ts"

# open in browser after creating
gh gist create -w file.ts

Behavior

When the user asks to create a gist:

  1. Identify what to gist. Could be:

    • Specific files the user mentioned
    • Code blocks from the conversation (write to a temp file first)
    • Output of a command (pipe to gh gist create -f <name>)
    • The current file being discussed
  2. Ask if unclear. If the user says "gist this" without context, ask what they want to gist.

  3. Build the command. Always use gh gist create. Apply flags:

    • -d "description" when context gives a natural description
    • -f "filename.ext" when piping stdin (use a meaningful filename with correct extension)
    • --public only if the user explicitly asks for public
    • -w to open in browser when the user wants to view it immediately
  4. Run and report. Execute the command, then return the gist URL to the user.

Examples

User: "gist this file" (while discussing src/auth.ts)

gh gist create -d "auth middleware" src/auth.ts

User: "make a gist of that code block" (after showing a snippet) Write the snippet to a temp file, then:

gh gist create -f "snippet.ts" /tmp/snippet.ts

User: "gist my git diff"

git diff | gh gist create -f "changes.diff"

User: "public gist of these three files"

gh gist create --public file1.ts file2.ts file3.ts

Defaults

  • Visibility: secret (not public) unless user says otherwise
  • Description: infer from context, skip if nothing obvious
  • Browser: don't open unless asked
  • Always return the gist URL after creation

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

obsidian

Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli.

Archived SourceRecently Updated
Coding

gog

Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs.

Archived SourceRecently Updated
Coding

obsidian-notes

Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli.

Archived SourceRecently Updated
Coding

mcporter-cli

Use the mcporter CLI to list, configure, auth, and call MCP servers/tools directly (HTTP or stdio), including ad-hoc servers, config edits, and CLI/type generation.

Archived SourceRecently Updated