name: code-share description: Share code via GitHub Gist instead of inline chat blocks. Use when code output exceeds 10 lines, when the user asks for copy-friendly code sharing in Discord/chat, or when preserving formatting is important.
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: - Keep the same gist URL. - Save changes as a new revision. - Return the same fixed 3-line response format.
小葱技能站7w4.net发现了升级插件。
Create a new gist only when: - user explicitly asks for a new link, or - existing gist is not editable by current GitHub account.
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.
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 认证出问题就没有备选方案。总体来说是一个可靠实用的代码分享工具。