Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
markdown-lint:
name: Markdown Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v19
with:
globs: "**/*.md"

shellcheck:
name: ShellCheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ludeeus/action-shellcheck@2.0.0
with:
scandir: "."
additional_files: "verify_setup.sh"

link-check:
name: Link Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: lycheeverse/lychee-action@v2
with:
args: "--no-progress --config .lychee.toml **/*.md"
fail: true
24 changes: 24 additions & 0 deletions .lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Lychee link checker configuration
# https://lychee.cli.rs/usage/config/

# Exclude URLs with placeholder text like <your-username>
exclude = [
"<your-username>",
"127\\.0\\.0\\.1",
]

# Accept 200 and 429 (rate limiting) as valid
accept = [200, 429]

# Don't check mailto links
include_mail = false

# Retry failed requests
max_retries = 3

# Timeout per request (seconds)
timeout = 20

# Skip external links to avoid flaky CI from network issues.
# External URLs are manually verified during PR review.
offline = true
13 changes: 13 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Markdownlint configuration
# https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml

# MD013 - Line length: disabled because markdown with URLs, tables, and
# language switcher links regularly exceeds 80 characters.
MD013: false

# MD041 - First line should be a heading: disabled because i18n files
# start with a language switcher blockquote.
MD041: false

# MD060 - Table column style: disabled to allow compact table formatting.
MD060: false
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
> **Language / 語言:** English | [한국어](i18n/ko/README.md) | [日本語](i18n/ja/README.md) | [繁體中文](i18n/zh-TW/README.md) | [简体中文](i18n/zh-CN/README.md)

# unity-claude-code-skill

A **Claude Code Custom Skill** that guides users through setting up Claude Code
Expand All @@ -23,16 +25,20 @@ troubleshooting for both **Windows** and **macOS**.

## Repo Structure

```
```text
unity-claude-code-skill/
├── SKILL.md # Core skill instructions (auto-loaded by Claude Code)
├── README.md # This file
├── LICENSE # MIT
├── scripts/
│ ├── verify_setup.sh # macOS/Linux prerequisite checker
│ └── verify_setup.ps1 # Windows prerequisite checker
└── references/
└── troubleshooting.md # Common issues & fixes
├── verify_setup.sh # macOS/Linux prerequisite checker
├── verify_setup.ps1 # Windows prerequisite checker
├── troubleshooting.md # Common issues & fixes
├── .github/workflows/ci.yml # CI: markdown lint, shellcheck, link check
└── i18n/ # Translations
├── ko/ # 한국어 (Korean)
├── ja/ # 日本語 (Japanese)
├── zh-TW/ # 繁體中文 (Traditional Chinese)
└── zh-CN/ # 简体中文 (Simplified Chinese)
```

## Quick Install
Expand Down Expand Up @@ -75,11 +81,13 @@ Claude Code will automatically load this skill and walk you through the process.
After setup, you can verify everything is in place:

**macOS/Linux:**

```bash
bash ~/.claude/skills/unity-claude-code-setup/scripts/verify_setup.sh
```

**Windows (PowerShell):**

```powershell
. "$env:USERPROFILE\.claude\skills\unity-claude-code-setup\scripts\verify_setup.ps1"
```
Expand Down
26 changes: 19 additions & 7 deletions SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,21 @@ Before either path, make sure these are in place:
Claude Code requires a paid Anthropic plan (Pro, Max, Team, or Enterprise).

**macOS / Linux:**

```bash
curl -fsSL https://claude.ai/install.sh | bash
```

**Windows (PowerShell):**

```powershell
irm https://claude.ai/install.ps1 | iex
```

> Windows also requires **Git for Windows** to be installed.

**Verify:**

```bash
claude --version
```
Expand All @@ -70,7 +74,7 @@ After first launch, run `claude` and follow the browser prompts to authenticate.
In Unity, go to **Window > Package Manager**, click **+**, choose
**Add package by name**, and enter:

```
```text
com.unity.ai.assistant
```

Expand All @@ -91,6 +95,7 @@ In Unity's **Project Settings > AI > Unity MCP > Integrations**, find
**Option 2 – Manual:**

Run in terminal:

```bash
claude mcp add unity-mcp -- <RELAY_PATH> --mcp
```
Expand All @@ -113,7 +118,8 @@ Previously approved clients reconnect automatically.
### A5. Test

In Claude Code, try:
```

```text
Read the Unity console messages and summarize any warnings or errors.
```

Expand All @@ -128,23 +134,27 @@ If Claude can invoke `Unity_ReadConsole`, the setup is complete.
Coplay's MCP server requires Python ≥ 3.11.

**Verify:**

```bash
python3 --version # macOS/Linux
python --version # Windows
```

If not installed:

- macOS: `brew install python@3.11`
- Windows: download from https://www.python.org/downloads/
- Windows: download from <https://www.python.org/downloads/>

### B2. Install the Coplay Unity package

1. Open your Unity project.
2. **Window > Package Manager > + > Add package from git URL**
3. Enter:
```

```text
https://github.com/CoplayDev/unity-plugin.git#beta
```

4. Ensure Coplay is enabled and running in the Editor.

### B3. Add Coplay MCP to Claude Code
Expand All @@ -155,7 +165,7 @@ claude mcp add \
--transport stdio \
coplay-mcp \
--env MCP_TOOL_TIMEOUT=720000 \
-- uvx --python ">=3.11" coplay-mcp-server@latest
-- uvx --python ">=3.11" coplay-mcp-server@1.5.5
```

> On Windows, run this in PowerShell. If `uvx` is not found, install it with
Expand All @@ -172,12 +182,14 @@ You should see `coplay-mcp` in the list.
### B5. Test

Open your Unity project, then in Claude Code:
```

```text
List all open Unity editors
```

Then try:
```

```text
Create a red cube at position (0, 1, 0) in the current Unity scene
```

Expand Down
109 changes: 109 additions & 0 deletions i18n/ja/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
> **Language / 言語:** [English](../../README.md) | [한국어](../ko/README.md) | **日本語** | [繁體中文](../zh-TW/README.md) | [简体中文](../zh-CN/README.md)

# unity-claude-code-skill

Unity Editor を MCP(Model Context Protocol)経由で Claude Code に接続するための **Claude Code カスタムスキル** です。

> **Claude Code スキルとは?**
> スキルとは、関連するタスクが発生した際に Claude Code が自動的に読み込む、ファイルシステムベースの指示セットです。`SKILL.md` ファイルと、オプションのスクリプトや参照資料を含むフォルダとして構成されます。詳細は
> [Claude Code Custom Skills ドキュメント](https://code.claude.com/docs/en/skills)
> をご覧ください。

## このスキルの機能

ユーザーが Claude Code と Unity の接続に関する質問をすると、このスキルが以下の手順をステップバイステップでガイドします:

- **Path A – Unity Official MCP**(`com.unity.ai.assistant`)— Unity 6+ 向け
- **Path B – Coplay MCP**(コミュニティ)— Unity 2022+ 向け

**Windows** と **macOS** の両方について、インストール、設定、接続の承認、動作確認、トラブルシューティングをカバーしています。

## リポジトリ構成

```text
unity-claude-code-skill/
├── SKILL.md # コアスキル指示(Claude Code が自動読み込み)
├── README.md # このファイル
├── LICENSE # MIT
├── scripts/
│ ├── verify_setup.sh # macOS/Linux 前提条件チェッカー
│ └── verify_setup.ps1 # Windows 前提条件チェッカー
└── references/
└── troubleshooting.md # よくある問題と解決策
```

## クイックインストール

### オプション 1: Claude Code スキルディレクトリにクローン

```bash
# ユーザーレベルのスキル(すべてのプロジェクトで利用可能)
git clone https://github.com/<your-username>/unity-claude-code-skill.git \
~/.claude/skills/unity-claude-code-setup

# またはプロジェクトレベルのスキル(このプロジェクトのみで利用可能)
git clone https://github.com/<your-username>/unity-claude-code-skill.git \
.claude/skills/unity-claude-code-setup
```

### オプション 2: SKILL.md のみコピー

スクリプトなしでコア指示のみが必要な場合:

```bash
mkdir -p ~/.claude/skills/unity-claude-code-setup
curl -o ~/.claude/skills/unity-claude-code-setup/SKILL.md \
https://raw.githubusercontent.com/<your-username>/unity-claude-code-skill/main/SKILL.md
```

## 使い方

インストール後は、Claude Code に自然に話しかけるだけです:

- *「Claude Code と Unity の連携を設定して」*
- *「Unity プロジェクトを MCP 経由で Claude Code に接続したい」*
- *「Unity 用の Coplay MCP をインストールするには?」*
- *「Windows で Unity MCP をセットアップして」*

Claude Code がこのスキルを自動的に読み込み、手順を案内します。

### 検証スクリプトの実行

セットアップ後、すべてが正しく配置されているか確認できます:

**macOS/Linux:**

```bash
bash ~/.claude/skills/unity-claude-code-setup/scripts/verify_setup.sh
```

**Windows (PowerShell):**

```powershell
. "$env:USERPROFILE\.claude\skills\unity-claude-code-setup\scripts\verify_setup.ps1"
```

## 前提条件

| ツール | 必要なパス | インストール |
|------|-------------|---------|
| Claude Code | 両方のパス | `curl -fsSL https://claude.ai/install.sh \| bash`(macOS/Linux)または `irm https://claude.ai/install.ps1 \| iex`(Windows) |
| Unity 6+ | Path A | [unity.com](https://unity.com/download) |
| Unity 2022+ | Path B | [unity.com](https://unity.com/download) |
| Python ≥ 3.11 | Path B のみ | [python.org](https://www.python.org/downloads/) |
| Git for Windows | Windows のみ | [git-scm.com](https://git-scm.com/download/win) |

## 主要リソース

- [Unity Official MCP ドキュメント](https://docs.unity3d.com/Packages/com.unity.ai.assistant@2.0/manual/unity-mcp-get-started.html)
- [Coplay MCP + Claude Code ガイド](https://docs.coplay.dev/coplay-mcp/claude-code-guide)
- [Claude Code MCP ドキュメント](https://code.claude.com/docs/en/mcp)
- [CoplayDev/unity-mcp(GitHub)](https://github.com/CoplayDev/unity-mcp)

## コントリビューション

プルリクエスト歓迎です! 手順が古くなっている箇所を見つけたり、Linux や他の MCP クライアント(Cursor、Windsurf など)のサポートを追加したい場合は、Issue を作成するかプルリクエストを送ってください。

## ライセンス

MIT — [LICENSE](../../LICENSE) を参照してください。
Loading
Loading