Skip to content
cccskills
FreePublished on GitHub

marketplace-toggle

マーケットプレイスのソースを dev(directory)/ prd(git)に切り替える。「マーケットプレイス切替」「marketplace toggle」「dev モード」「prd モード」「ローカル開発モード」「開発モード切替」「マーケットプレイス dev」などで起動。

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md5.5 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Marketplace Toggle

マーケットプレイスの installLocation をシンボリックリンク(dev)/ git clone(prd)に切り替える。

Help

$ARGUMENTS に --help が含まれる場合、以下を表示して終了:

/marketplace-toggle - Marketplace Toggle

概要:
  マーケットプレイスの installLocation を切り替えます。
  - dev: installLocation をプロジェクトディレクトリへの symlink に差し替え
  - prd: installLocation を元の git clone に復元
  切り替え後は Claude Code の再起動が必要です。

使用方法:
  /marketplace-toggle [dev|prd|status] [オプション]

サブコマンド:
  dev     symlink に切り替え(開発用)
  prd     git clone に復元(本番用)
  status  現在のモードを表示(デフォルト)

オプション:
  --help  このヘルプを表示

例:
  /marketplace-toggle dev      # ローカル開発モードに切り替え
  /marketplace-toggle prd      # git モードに戻す
  /marketplace-toggle status   # 現在のモードを確認
  /marketplace-toggle          # status と同じ

仕組み

Claude Code はプラグインを以下の流れで読み込む:

known_marketplaces.json
  └─ installLocation(git clone またはシンボリックリンク)
       └─ marketplace.json + plugins/*/
            └─ /plugin install 時に cache/ にコピー
                 └─ installed_plugins.json の installPath から読み込み

source フィールドを変更しても installLocation は更新されないため、installLocation 自体を差し替える必要がある。

定数

  • installLocation: ~/.claude/plugins/marketplaces/shiiman-claude-code-plugins
  • git clone バックアップ: ~/.claude/plugins/marketplaces/shiiman-claude-code-plugins.git-backup
  • プロジェクトディレクトリ: /Users/a12665/Documents/personal/claude-code-plugins

ワークフロー

1. サブコマンド判定

$ARGUMENTS から判定:

  • dev → ステップ 3(dev 切り替え)
  • prd → ステップ 4(prd 切り替え)
  • status または引数なし → ステップ 2(状態表示)
  • 引数がない場合は発話内容から判定(「開発モード」→ dev、「本番モード」→ prd)

2. 現在の状態を表示

readlink ~/.claude/plugins/marketplaces/shiiman-claude-code-plugins 2>/dev/null || echo "NOT_SYMLINK"
  • シンボリックリンク → 現在: dev モード(symlink → {リンク先})
  • 通常ディレクトリ → 現在: prd モード(git clone)

status の場合はここで終了。

3. dev モードに切り替え

3-1. 事前チェック

# すでに symlink なら何もしない
if [ -L ~/.claude/plugins/marketplaces/shiiman-claude-code-plugins ]; then
  echo "すでに dev モードです"
  exit 0
fi

3-2. git clone をバックアップ

mv ~/.claude/plugins/marketplaces/shiiman-claude-code-plugins ~/.claude/plugins/marketplaces/shiiman-claude-code-plugins.git-backup

3-3. シンボリックリンク作成

ln -s /Users/a12665/Documents/personal/claude-code-plugins ~/.claude/plugins/marketplaces/shiiman-claude-code-plugins

3-4. 確認

readlink ~/.claude/plugins/marketplaces/shiiman-claude-code-plugins

切り替え後、以下を表示:

✅ dev モードに切り替えました
  installLocation → symlink → /Users/a12665/Documents/personal/claude-code-plugins

次のステップ:
  Claude Code を再起動してください。ローカルの変更が反映されます。

4. prd モードに切り替え

4-1. 事前チェック

# symlink でなければ何もしない
if [ ! -L ~/.claude/plugins/marketplaces/shiiman-claude-code-plugins ]; then
  echo "すでに prd モードです"
  exit 0
fi

# バックアップが存在するか確認
if [ ! -d ~/.claude/plugins/marketplaces/shiiman-claude-code-plugins.git-backup ]; then
  echo "エラー: git clone のバックアップが見つかりません"
  exit 1
fi

4-2. symlink を削除

rm ~/.claude/plugins/marketplaces/shiiman-claude-code-plugins

4-3. git clone を復元

mv ~/.claude/plugins/marketplaces/shiiman-claude-code-plugins.git-backup ~/.claude/plugins/marketplaces/shiiman-claude-code-plugins

4-4. git pull で最新化

git -C ~/.claude/plugins/marketplaces/shiiman-claude-code-plugins pull

切り替え後、以下を表示:

✅ prd モードに切り替えました
  installLocation → git clone(git pull 済み)

次のステップ:
  Claude Code を再起動してください。git リモートの最新版が反映されます。

注意事項

  • 切り替え後は Claude Code の再起動が必要
  • dev モードではプロジェクトディレクトリの変更が直接反映される(cache 更新不要)
  • prd モードでは git リモートの最新コミットが使用される
  • git clone バックアップ(.git-backup)は prd 復元時に必要。手動で削除しないこと

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

プラグインに新しいフックを作成する。「フック作成」「新しいフック」「フックを作って」「フック追加」「hook 作成」「フックを追加したい」「新規フック」などで起動。ツール実行前後やセッションイベントで実行されるフックを生成。

The English summary is being prepared. Showing the original description.

shiiman/claude-code-plugins6Updated Jun 17, 2026

新しい Claude Code プラグインを作成する。「プラグイン作成」「新しいプラグイン」「プラグインを作って」「プラグイン追加」「plugin 作成」「プラグイン一括作成」「フル作成」などで起動。プラグインのみ作成と、スキル/サブエージェント/フックを含む一括作成の両方に対応。

The English summary is being prepared. Showing the original description.

shiiman/claude-code-plugins6Updated Jun 17, 2026

MCP サーバーの一覧表示・追加・削除を一つのスキルで管理する。「MCP 管理」「MCP 一覧」「MCP を追加」「MCP を削除」「MCP サーバー管理」「MCP 設定」「MCP 操作」などで起動。引数があれば優先し、なければ発話内容から list/install/remove を判定。

The English summary is being prepared. Showing the original description.

shiiman/claude-code-plugins6Updated Jun 17, 2026

プロジェクトの Claude Code リソース一覧を表示する。「Claude リソース一覧」「スキル一覧」「エージェント一覧」「フック一覧」「プロジェクトリソース確認」「何があるか確認」「リソースを見せて」などで起動。表示対象(スキル/エージェント/フック)は発話から判断する。

The English summary is being prepared. Showing the original description.

shiiman/claude-code-plugins6Updated Jun 17, 2026

Claude Code 設定の表示・更新・ローカル更新を統合管理する。「Claude 設定管理」「設定を表示」「settings を更新」「local settings を更新」「権限設定を変更」「設定ファイル管理」「claude settings」などで起動。引数があれば優先し、なければ発話内容から view/update/local-update を判定。

The English summary is being prepared. Showing the original description.

shiiman/claude-code-plugins6Updated Jun 17, 2026

Claude Code CLI 本体のバージョン確認・更新と、インストール済みプラグインの一括更新を実行する。「Claude Code を更新」「claude update」「Claude のバージョン確認」「Claude 本体更新」「プラグイン更新」「plugin update」などで起動。引数があれば優先し、なければ発話内容から version/update/plugin-update を判定。brew での AI CLI 一括更新は shiiman-common:brew-upgrade-ai。

The English summary is being prepared. Showing the original description.

shiiman/claude-code-plugins6Updated Jun 17, 2026

See all skills by shiiman

Report a problem with this skill