mcpField
L
linkgo

linkgo

github.com/wmy2981生産性155 回インストール5 週間前に更新
リポジトリ

linkgo について

linkgoは、HTTP APIを通じてLinkGo v3のナビゲーションページを管理するスキルです。サービスカードやページ設定に加え、アイコンと設定のインポート・エクスポートも扱います。

主な機能

  1. 01サービスカードの照会・追加・編集・削除
  2. 02ページ設定の更新
  3. 03アイコンのアップロードと一覧表示
  4. 04設定のエクスポートとインポート
  5. 05管理者パスワードとデバッグ情報の管理

活用シーン

  1. 01有効・無効なサービスカードの確認
  2. 02ナビゲーションページへの項目追加や更新
  3. 03移行や復元に備えた設定のバックアップ

インストール

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

$npx skills add https://github.com/wmy2981/skills --skill linkgo

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

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

.claude-plugin/
plugin.json
references/
api_doc.md
scripts/
.env.example
linkgo.py

詳細

LinkGo v3 リモート管理

HTTP API を介して、LinkGo v3 のナビゲーションページ上のサービスカード、ページ設定、アイコン、システム設定を管理します。

実行ルール

依存関係、環境変数、設定を事前に確認せず、ユーザーが要求したコマンドを直接実行します。問題がある場合は、スクリプトが明確なエラーを表示して失敗するため、その時点で確認して修正してください。

環境変数

変数必須用途
LINKGO_HOST✅インスタンスのアドレス。例:http://192.168.1.100:80
LINKGO_PASSWORD✅管理者パスワード

スクリプトはこれらの値を ~/.wmyskills/.env(スキル間で共有)から自動的に読み込みます。スクリプトのディレクトリに scripts/.env がある場合は、そちらが優先されます。テンプレートとして scripts/.env.example を使用してください。変数は ~/.wmyskills/.env に追加し、既存のファイルを上書きしないでください。

要件

外部依存関係はありません(標準ライブラリのみ)。

使用方法

スクリプト:scripts/linkgo.py

接続確認
python scripts/linkgo.py ping
カードの照会
# List enabled cards (default)
python scripts/linkgo.py list

# List all cards (including disabled)
python scripts/linkgo.py list --all

# Query a specific card by id
python scripts/linkgo.py list --id my-service
カードの管理
# Add a card (JSON string)
python scripts/linkgo.py add '{"id":"my-service","title":"My Service","href":"http://example.com","icon":"static/icon/link.svg","displayAddress":"example.com","description":"Service description","status":1}'

# Edit a card (merge fields by id)
python scripts/linkgo.py edit my-service '{"title":"New Title","href":"http://new.example.com"}'

# Delete a card
python scripts/linkgo.py delete my-service

# Enable / disable
python scripts/linkgo.py enable my-service
python scripts/linkgo.py disable my-service
ページ設定
python scripts/linkgo.py page '{"title":"New Title","searchEnabled":0}'
アイコン
# Upload one or more icons (multi-file supported)
python scripts/linkgo.py upload-icon /path/to/icon.svg /path/to/another.png

# List available icons
python scripts/linkgo.py icons
設定のエクスポート/インポート
# Export config to file
python scripts/linkgo.py export -o backup.json

# Export to stdout
python scripts/linkgo.py export

# Import config (overwrites all data)
python scripts/linkgo.py import backup.json

# Reset to default config
python scripts/linkgo.py reset
パスワードとデバッグ
# Change admin password
python scripts/linkgo.py change-password <old_password> <new_password>

# Reset password to a random 8-char one (server-local only, 127.0.0.1)
python scripts/linkgo.py reset-password

# Debug info
python scripts/linkgo.py debug

サービスカードのフィールド

フィールド必須型説明
id✅string一意の識別子。英数字のみ。作成後は変更できません
title✅string表示タイトル。変数置換に対応しています
href✅stringクリック時のリンク先 URL。javascript: プロトコルに対応しています
icon❌stringアイコンのパス(例:static/icon/home.svg)。アップロード後に使用できます
displayAddress❌stringカードに表示されるアドレスのテキスト
description❌string説明テキスト。変数置換と HTML に対応しています
status❌int1=有効(デフォルト)、0=無効
パラメーター構文(description のみ)
構文説明例
{link:URL,text}通常のリンク{link:https://example.com,Example}
{sublink:URL,text}青色の太字リンク{sublink:https://example.com,Details}
{modallink:URL,title,text}iframe モーダルリンク{modallink:http://x:8080,Service,View}
{tip:content}検索キーワードのヒント(非表示){tip:keyword1 keyword2}
{page_info}ページ情報のプレースホルダー(選択可能なテキスト){page_info}
静的変数
変数置換後の値例
{project_name}プロジェクト名LinkGo
{project_version}プロジェクトのバージョンv3_20250823
{addr_prefit}地址: ラベル{addr_prefit} → 地址:
{space}半角スペース3つLine 1{space}Line 2
{icon_path}アイコンディレクトリ{icon_path}myicon.svg → /static/icon/myicon.svg
{api_path}API ディレクトリ{api_path} → /api/
{static_path}静的ファイルのディレクトリ{static_path} → /static/
{pages_path}ページディレクトリ{pages_path} → /pages/
動的変数(ページごとにフロントエンドが自動置換)
変数説明例
{host}ホスト名+ポートlocalhost:8080
{hostname}ホスト名のみlocalhost
{port}ポート8080
{protocol}プロトコル(http/https)http
{pathname}現在の URL パス/index.html
{href}完全な URLhttp://localhost:8080/index.html
%s{host} の別名localhost:8080

重要な注意事項

  • Edit は差分更新です — 変更したいフィールドのみを渡してください。それ以外はそのまま維持されます
  • インポート/リセットの前にバックアップしてください — どちらの操作もすべてのデータを上書きし、取り消せません
  • アイコンのアップロード上限:1ファイルあたり1MB。対応形式:SVG/PNG/JPG/JPEG/GIF/WEBP/ICO
  • reset を実行すると、すべてのカスタムカードが消去されます
  • reset-password はサーバーホスト上でのみ動作します(API が受け付けるのは 127.0.0.1 のみです)。実行するには LINKGO_HOST を http://127.0.0.1 に設定する必要があります
  • パスワードを変更すると、サーバーの config.php が自動更新されます
  • change-password / reset-password の実行後は、~/.wmyskills/.env(存在する場合は scripts/.env も — こちらが優先されます)の LINKGO_PASSWORD を更新するようユーザーに案内してください。保存されているパスワードは無効になり、以降のコマンドは 401 エラーで失敗します

参照資料

LinkGo v3 API のリファレンス、変数置換システム、フロントエンドモジュール、デプロイ設定の全文については、references/api_doc.md を参照してください。

コメント