mcpField
G
github-gist

github-gist

github.com/glebis生産性401242 回インストール1 日前に更新
リポジトリ

github-gist について

GitHub Gist Publisher は、ローカルファイルを GitHub Gist として公開するスキルです。通常は `gh` CLI を使い、トークンによる API アクセスにも対応します。公開を指定しない場合は、非公開リストの Gist を作成します。

主な機能

  1. 01非公開または公開 Gist の作成
  2. 02説明とファイル名の設定
  3. 03URL のみを出力
  4. 04公開した Gist をブラウザーで表示
  5. 05`gh` CLI または API の利用

活用シーン

  1. 01セッションログの共有
  2. 02Markdown ノートの公開
  3. 03公開ファイルスニペットの作成

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/glebis/claude-skills --skill github-gist

インストール後、Claude Code で/github-gistを入力して読み込まれたか確認します。

同梱ファイル.claude-plugin/plugin.jsonscripts/publish_gist.py

詳細

GitHub Gist パブリッシャー

ファイルを GitHub Gist として公開して、簡単に共有できます。

前提条件

デフォルトで gh CLI を使用します。認証済みであることを確認してください。

gh auth status
# If not authenticated: gh auth login

代替手段:gist スコープを持つ GITHUB_GIST_TOKEN 環境変数を設定します。

使用方法

# 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

オプション

フラグ説明
--public公開 Gist を作成します(デフォルトはシークレット/非公開です)
-d, --descriptionGist の説明
-f, --filenameファイル名を上書きします
--url-onlyURL のみを出力します
--openブラウザーで開きます
--apigh CLI の代わりに API を強制的に使用します

出力

{
  "url": "https://gist.github.com/user/abc123",
  "id": "abc123",
  "public": false,
  "filename": "file.md"
}

例

このスキルで公開されたセッションログ:https://gist.github.com/glebis/3faaae6b907123929220e81add51a567

コメント