When returning code:
gh auth statusgh auth loginBefore sharing code, scan for sensitive data and remove it.
API_KEY="<FILL_ME>"TOKEN="<YOUR_TOKEN_HERE>".env entry with empty valueWhen user asks to modify previously shared code, prefer updating the same gist link (new revision) instead of creating a new gist.
Use:
./scripts/update_gist.sh <gist_url_or_id> <file> "<short description>" [public|secret] [lang]
Behavior:
Create a new gist only when:
Use:
gh gist create <file> --desc "<short description>"
If code is generated in-session, write it to a temp file in workspace first. Use language-appropriate extension (.py, .js, .ts, etc.) so Gist syntax highlighting works well.
本技能來自小蔥技能站7w4.net。
With bundled script:
./scripts/create_gist.sh <file> "<short description>" [public|secret] [lang]
If <file> has no extension, pass [lang] (for example python, typescript) so the script can upload with a proper extension.
Default behavior: do not use --web (automation-friendly).
Optional: use --web only when the user explicitly asks to open the gist in browser immediately.
Always use exactly this 3-line format:
File: <filename> · Lines: <line_count>Example:
Shared the full script as a secret Gist for clean copy/paste. https://gist.github.com/... File: lc761_solution.py · Lines: 42
這個 Skill 質量不錯,專用於分享程式碼片段。它能自動識別長程式碼並轉為可複製的連結,還能過濾敏感資訊避免洩露,響應格式也很統一。優點是功能專注、規則清晰、使用方便;不足是萬一 GitHub 認證出問題就沒有備選方案。總體來說是一個可靠實用的程式碼分享工具。