Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 38 additions & 25 deletions .claude/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@
### Git管理対象

- `config.json` - カスタムプラグインリポジトリの設定
- `known_marketplaces.json` - 使用するマーケットプレイスのリスト
- `known_marketplaces.json.template` - マーケットプレイス設定のテンプレート(環境非依存)
- `plugins.txt` - インストールするプラグインのリスト
- `README.md` - このドキュメント

### Git管理対象外(.gitignore)

- `known_marketplaces.json` - 環境固有のマーケットプレイス設定(テンプレートから自動生成)
- `installed_plugins.json` - インストール済みプラグインのメタデータ(環境依存)
- `marketplaces/` - マーケットプレイスからダウンロードされたプラグイン実体
- `repos/` - カスタムリポジトリのプラグイン

## プラグイン管理の仕組み

### 1. マーケットプレイスの設定
### 1. 環境非依存のマーケットプレイス設定

`known_marketplaces.json`でどのマーケットプレイスを使用するか定義します:
`known_marketplaces.json.template`でマーケットプレイスを定義します。`{{HOME}}`プレースホルダーを使用することで、macOS/Linux/DevContainer環境すべてで動作します:

```json
{
Expand All @@ -29,12 +31,13 @@
"source": "github",
"repo": "anthropics/claude-code"
},
"installLocation": "/home/vscode/.claude/plugins/marketplaces/claude-code-plugins",
"lastUpdated": "2025-12-02T07:58:31.073Z"
"installLocation": "{{HOME}}/.claude/plugins/marketplaces/claude-code-plugins"
}
}
```

`setup-claude.sh`実行時に、テンプレートから環境固有の`known_marketplaces.json`が自動生成されます。

### 2. プラグインの有効化

`.claude/settings.local.json`(git管理対象外)でどのプラグインを有効にするか設定:
Expand All @@ -50,40 +53,50 @@

## セットアップ手順

### 新しい環境でのセットアップ
### 新しい環境でのセットアップ(推奨)

1. **マーケットプレイスの追加**
リポジトリの自動セットアップスクリプトを使用:

Claude Codeで以下のコマンドを実行してマーケットプレイスを追加:
```bash
# すべてセットアップ(設定同期 + プラグインインストール)
make claude-setup

```bash
# 公式プラグイン
claude marketplace add anthropics/claude-code
# または、プラグインのみインストール
make claude-plugins
```

# コミュニティプラグイン(例)
claude marketplace add davila7/claude-code-templates
claude marketplace add wshobson/agents
```
このコマンドにより:

1. リポジトリの`plugins.txt`と`known_marketplaces.json.template`を`~/.claude/plugins/`にコピー
2. テンプレートから環境固有の`known_marketplaces.json`を生成
3. 必要なマーケットプレイスを自動追加
4. `plugins.txt`に記載されたすべてのプラグインをインストール

2. **プラグインのインストール**
### 手動セットアップ

Claude Code UIまたはコマンドでプラグインをインストール:
1. **マーケットプレイス設定の生成**

```bash
claude plugin install frontend-design@claude-code-plugins
# テンプレートから環境固有の設定を生成
sed "s|{{HOME}}|${HOME}|g" .claude/plugins/known_marketplaces.json.template > ~/.claude/plugins/known_marketplaces.json
```

3. **プラグインの有効化**
2. **マーケットプレイスの追加**

`.claude/settings.local.json`に`enabledPlugins`設定を追加
```bash
claude plugin marketplace add anthropics/claude-plugins-official
claude plugin marketplace add wshobson/agents
```

### 既存環境の設定をエクスポート
3. **プラグインのインストール**

現在の環境のマーケットプレイス設定を保存:
```bash
# 個別インストール
claude plugin install commit-commands@claude-plugins-official

```bash
cp ~/.claude/plugins/known_marketplaces.json .claude/plugins/known_marketplaces.json
```
# または一括インストール
make claude-plugins
```

## 利用可能なマーケットプレイス

Expand Down
50 changes: 0 additions & 50 deletions .claude/plugins/known_marketplaces.json

This file was deleted.

44 changes: 44 additions & 0 deletions .claude/plugins/known_marketplaces.json.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"anthropic-agent-skills": {
"source": {
"source": "git",
"url": "https://github.com/anthropics/skills.git"
},
"installLocation": "{{HOME}}/.claude/plugins/marketplaces/anthropic-agent-skills"
},
"claude-code-plugins": {
"source": {
"source": "github",
"repo": "anthropics/claude-code"
},
"installLocation": "{{HOME}}/.claude/plugins/marketplaces/claude-code-plugins"
},
"claude-code-templates": {
"source": {
"source": "git",
"url": "https://github.com/davila7/claude-code-templates.git"
},
"installLocation": "{{HOME}}/.claude/plugins/marketplaces/claude-code-templates"
},
"claude-code-workflows": {
"source": {
"source": "github",
"repo": "wshobson/agents"
},
"installLocation": "{{HOME}}/.claude/plugins/marketplaces/claude-code-workflows"
},
"claude-plugins-official": {
"source": {
"source": "github",
"repo": "anthropics/claude-plugins-official"
},
"installLocation": "{{HOME}}/.claude/plugins/marketplaces/claude-plugins-official"
},
"playwright-skill": {
"source": {
"source": "github",
"repo": "lackeyjb/playwright-skill"
},
"installLocation": "{{HOME}}/.claude/plugins/marketplaces/playwright-skill"
}
}
24 changes: 6 additions & 18 deletions .claude/plugins/plugins.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,19 @@

# === Official Plugins (claude-plugins-official) ===
# 基本プラグイン
vercel@claude-plugins-official
commit-commands@claude-plugins-official
hookify@claude-plugins-official
plugin-dev@claude-plugins-official
frontend-design@claude-plugins-official

# プロジェクト固有
supabase@claude-plugins-official
typescript-lsp@claude-plugins-official

# === Template Plugins (claude-code-templates) ===
nextjs-vercel-pro@claude-code-templates
supabase-toolkit@claude-code-templates

# === Workflow Plugins (claude-code-workflows) ===
code-refactoring@claude-code-workflows

# === Additional Plugins ===
# AI and Code Review
code-review-ai@claude-plugins-official
# Kubernetes
kubernetes-operations@claude-plugins-official
# JavaScript/TypeScript
javascript-typescript@claude-plugins-official
# Agents (wshobson/agents)
agents@claude-code-workflows
# Playwright
playwright-skill@playwright-skill
# AI Code Review
code-review-ai@claude-code-workflows
# Kubernetes Operations
kubernetes-operations@claude-code-workflows
# JavaScript/TypeScript Development
javascript-typescript@claude-code-workflows
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
},
"remoteEnv": {
"HOMEBREW_NO_AUTO_UPDATE": "1",
"SHELL": "/bin/bash"
"SHELL": "/bin/bash",
"TMPDIR": "/home/vscode/.claude/tmp"
},
"overrideCommand": true,
"updateRemoteUserUID": false,
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ report.log

# Claude settings (local overrides)
.claude/settings.local.json
.claude/plugins/known_marketplaces.json

# MCP configuration
.mcp.json
1 change: 1 addition & 0 deletions script/install-claude-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ fi

echo "[INFO] マーケットプレイスを初期化中..."
# 必須マーケットプレイスを追加(完全なHTTPS URLを使用)
claude plugin marketplace add https://github.com/anthropics/claude-plugins-official.git 2>&1 || echo "[WARN] claude-plugins-official already exists or failed to add"
claude plugin marketplace add https://github.com/anthropics/claude-code.git 2>&1 || echo "[WARN] claude-code-plugins already exists or failed to add"
claude plugin marketplace add https://github.com/wshobson/agents.git 2>&1 || echo "[WARN] claude-code-workflows already exists or failed to add"

Expand Down
Loading