gist
3
总安装量
3
周安装量
#60031
全站排名
安装命令
npx skills add https://github.com/saiashirwad/gist-skill --skill gist
Agent 安装分布
pi
3
gemini-cli
3
claude-code
3
codex
3
kimi-cli
3
opencode
3
Skill 文档
GitHub Gist
Create GitHub gists from files, code blocks, or command output using gh gist create.
Prerequisites
ghCLI 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:
-
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
-
Ask if unclear. If the user says “gist this” without context, ask what they want to gist.
-
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)--publiconly if the user explicitly asks for public-wto open in browser when the user wants to view it immediately
-
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