Skip to content
Development
Command

/diff

Source と Target 間の差分を表示します。

From plugin
skillshare
3k38 skills38 commands
$ npx -y skills add runkids/skillshare --agent claude-code

Command definition

diff.md
sidebar_position: 2

diff

Source と Target 間の差分を表示します。

skillshare diff              # すべての Target(インタラクティブ TUI)
skillshare diff claude       # 特定の Target
skillshare diff agents       # Agent Target のみ
skillshare diff --stat       # ファイル単位の変更
skillshare diff --patch      # 完全な unified diff
skillshare diff --no-tui

claude, claude-work, gemini, opencode, universal
  New       remotion-captions

cursor
  Local only  cursor-shortcuts
  New         remotion-captions

Extras
✓ commands  ~/.claude/commands · in sync
✓ rules     ~/.claude/rules · in sync
✓ rules     ~/.cursor/rules · in sync
✓ team      ~/.codex · in sync
✓ team      ~/.claude · in sync
✓ team      ~/.gemini · in sync
✓ team      ~/notes · in sync

! 6 targets: 6 to sync

Next
  skillshare sync     apply the changes
  skillshare collect  copy local-only skills into source

エージェントのバリアントが曖昧な場合、診断付きの `(skill selection)` スキップ行が表示されます。`include`/`exclude` またはソース側のターゲット上書きで必要なバリアントを選択してください。この行は選択がスキップされた理由を示し、sync で適用できる変更ではありません。

インタラクティブ TUI

TTY 上では、`diff` はインタラクティブな画面を開きます。左側にターゲット、右側に選択したターゲットの差分が表示され、ファイル単位の diff まで確認できます。キーは画面下部に表示されます。プレーンテキストにするには `--no-tui` を使うか、出力をパイプしてください。

使うタイミング

  • sync する前に、Source と Target の間で正確に何が異なるかを確認する
  • Target にのみ存在する Skill(まだ収集されていないローカル専用)を見つける
  • symlink に置き換えられるローカルコピーを特定する
  • `--stat` でファイル単位の変更、`--patch` で完全なテキスト diff を確認する

出力例

claude
  Local override  local-copy
  Local only      my-local-skill
  New             another-skill, missing-skill

✓ cursor    in sync

! 2 targets: 1 to sync, 1 in sync

Next
  skillshare sync          apply the changes
  skillshare sync --force  also replace local copies
  skillshare collect       copy local-only skills into source

グループ化された複数 Target の出力

複数の Target が同一の diff 結果を持つ場合、ノイズを減らすために 1 つのブロックにまとめられます。

agents, claude
  New       skill-1, skill-2

cursor
  New       skill-1

✓ codex, copilot  in sync

(`include`/`exclude` フィルタなどの理由で)結果が異なる Target は個別に表示されます。

ラベル

| ラベル | 意味 | 動作 | |-------|---------|--------| | New | Source にあり、Target にない | `sync` が追加する | | Restore | Target にあったが削除された | `sync` が復元する | | Modified | 内容または target naming が変更された(copy mode)、または merge sync がリンクに置き換える、編集されていない copy mode のコピー | `sync` が更新する | | Renamed | 管理対象のエントリが以前の `target_naming` による名前のまま | `sync` が名前を変更する | | Local only, skill kept under old name | 現在の `target_naming` が付ける名前をローカルフォルダーが使っているため、Skill は以前の管理対象エントリのまま(`name (stays at old-name)` と表示) | フォルダーの名前を変えるか削除してから `sync` | | Local override | symlink ではなくローカルコピー(編集済みの copy mode コピーを含む) | `sync --force` で置き換え | | Orphan | マニフェストにあるが Source にない | `sync` が刈り取る | | Local only | Target のみに存在し、Source にない | `collect` でインポート |

ファイル単位の詳細

`--stat`

各 Skill 内でどのファイルが異なるかを表示します。

skillshare diff --stat
claude
  Modified  my-skill
            + new-file.md (120 bytes)
            ~ SKILL.md (840 → 912 bytes)
            - old-file.md (64 bytes)

`--patch`

変更されたファイルの完全な unified テキスト diff を表示します。

skillshare diff --patch
claude
  Modified  my-skill
            ~ SKILL.md (840 → 912 bytes)
            --- SKILL.md
            - old line
            + new line

`--stat` と `--patch` はどちらも `--no-tui`(プレーンテキスト出力)を暗黙的に指定します。

diff が示す内容

merge mode の Target

merge mode(デフォルト)を使う Target の場合:

  • まだ Target に symlink されていない、Source 内の Skill を一覧表示する
  • symlink ではなくローカルコピーとして存在する Skill を表示する
  • Target 内のローカル専用の Skill を特定する(Source にない — sync で保持される)

copy mode の Target

copy mode を使う Target の場合:

  • まだ管理下にない(マニフェストにない)、Source 内の Skill を一覧表示する
  • チェックサム比較による内容の変更を表示する
  • Source にもう存在しない、孤立した管理下のコピーを表示する(sync 時に刈り取られる)
  • ローカル専用の Skill(Source になく、管理もされていない)を特定する

symlink mode の Target

symlink mode を使う Target の場合:

  • symlink が正しい Source を指しているかを単純に確認する
  • 「in sync」を表示するか、誤った symlink について警告する

ユースケース

sync 前

何が変更されるかを確認します。

skillshare diff
# sync が何を行うかを確認してから:
skillshare sync

ローカル Skill を見つける

Target 内に直接作成した Skill を発見します。

skillshare diff claude
# 表示: Local only  my-local-skill

skillshare collect claude  # Source にインポート

変更内容の確認

sync 前に、Skill 内で何が変更されたかを正確に確認します。

skillshare diff --patch claude   # 完全なテキスト diff
skillshare diff --stat claude    # ファイル単位のサマリー

トラブルシューティング

sync ステータスに問題が表示された場合:

skillshare status          # 「needs sync」を表示
skillshare diff claude     # 何が異なるかを正確に確認
skillshare sync            # 修正する

Agent Diff {#agent-diff}

`agents` キーワードを使うと、Agent Target のみを diff します。

skillshare diff agents             # すべての Agent 対応 Target
skillshare diff agents claude      # 特定の Target
skillshare diff agents --json      # JSON 出力

Agent diff は、不足している agent(sync が必要)、孤立した symlink(prune が必要)、ローカル専用の agent ファイルを表示します。`agents` パス設定を持つ Target のみが対象です。全リストは [Agents — 対応 Target](/docs/understand/agents#supported-targets) を参照してください。

---

オプション

| フラグ | 説明 | |------|-------------| | `--project, -p` | project mode を使う | | `--global, -g` | global mode を使う | | `--stat` | ファイル単位の変更を表示(`--no-tui` を暗黙指定) | | `--patch` | 完全な unified diff を表示(`--no-tui` を暗黙指定) | | `--no-tui` | プレーンテキスト出力(インタラクティブ TUI をスキップ) | | `--json` | JSON として出力(`--no-tui` を暗黙指定) |

JSON 出力

skillshare diff --json
{
  "targets": [
    {
      "name": "claude",
      "mode": "merge",
      "synced": false,
      "items": [
        {"action": "add", "name": "missing-skill", "kind": "skill", "reason": "source only", "is_sync": true},
        {"action": "modify", "name": "local-copy", "kind": "skill", "reason": "local copy (sync --force to replace)", "is_sync": true},
        {"action": "remove", "name": "my-own-skill", "kind": "skill", "reason": "local only", "is_sync": false},
        {"action": "kept", "name": "prototype", "kind": "skill", "reason": "local folder; the skill stays at _emil-design__skills__prototype", "is_sync": false}
      ],
      "include": [],
      "exclude": []
    }
  ],
  "duration": "0.045s"
}

`sync` がその target に対して行うことがない

Read more
@runkids
Ships withskillshare

📚 Sync skills, agents, MCP, plugins to all AI CLI tools with one command and simplify team sharing.

Stars on GitHub

Momentum

stars in total
3.0k
Star history of runkids/skillshare on GitHub, a chart by star-history.com

Other commands on skillshare.

analyze

analyze

Command

各 Target の Skill について、コンテキストウィンドウの使用量と Skill の品質を分析します。

@runkids@runkidsInstall Command
audit

audit

Command

インストール済みの Skill をスキャンし、セキュリティ上の脅威や悪意のあるパターンを検出します。

@runkids@runkidsInstall Command
backup

backup

Command

ターゲットディレクトリのバックアップを作成、一覧表示、管理します。

@runkids@runkidsInstall Command
check

check

Command

変更を適用せずに、トラッキング対象のリポジトリとインストール済み Skill の更新有無を確認します。

@runkids@runkidsInstall Command
collect

collect

Command

ターゲットからソースへ、ローカルの Skill や agent を収集します。

@runkids@runkidsInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command