add-ai-tools 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.ja.md ADDED
@@ -0,0 +1,194 @@
1
+ # add-ai-tools
2
+
3
+ 様々なソースからAIエージェントリソース(Skills、Rules、Agents)を単一のコマンドでインストールできる汎用CLIツールです。
4
+
5
+ **[English](./README.md)** | **[한국어](./README.ko.md)** | **[中文](./README.zh-CN.md)**
6
+
7
+ ## 概要
8
+
9
+ `add-ai-tools`はAIコーディングアシスタントリソースの管理を簡素化します。GitHubまたはBitbucketリポジトリからリソースを取得し、お好みのAIエージェントに適切な場所にインストールします。
10
+
11
+ ### 主な機能
12
+
13
+ - **マルチソース対応** - GitHub、Bitbucket、Git SSH URLからインストール
14
+ - **マルチエージェント対応** - Claude Code、Cursor、GitHub Copilot、Antigravityに対応
15
+ - **インタラクティブモード** - リソース選択をガイドするプロンプト
16
+ - **ZIPエクスポート** - リソースをポータブルなZIPアーカイブとしてエクスポート
17
+ - **スマートな重複処理** - スキップ、上書き、リネーム、バックアップ、比較オプション
18
+ - **一括インストール** - 複数のリソースを一度にインストール
19
+
20
+ ## インストール
21
+
22
+ ```bash
23
+ # グローバルインストール
24
+ npm install -g add-ai-tools
25
+
26
+ # またはnpxで直接使用
27
+ npx add-ai-tools
28
+ ```
29
+
30
+ ## クイックスタート
31
+
32
+ ### GitHubからインストール
33
+
34
+ ```bash
35
+ # GitHub省略形を使用
36
+ npx add-ai-tools owner/repo
37
+
38
+ # 完全なGitHub URLを使用
39
+ npx add-ai-tools https://github.com/owner/repo
40
+
41
+ # 特定のパスからリソースをインストール
42
+ npx add-ai-tools https://github.com/owner/repo/tree/main/skills/my-skill
43
+ ```
44
+
45
+ ### インタラクティブモード
46
+
47
+ ```bash
48
+ npx add-ai-tools
49
+ ```
50
+
51
+ インタラクティブモードは以下の手順をガイドします:
52
+ 1. AIエージェントの選択(Claude Code、Cursorなど)
53
+ 2. ソースリポジトリの入力
54
+ 3. リソースタイプの選択(Skills、Rules、Agents)
55
+ 4. インストールする特定のリソースの選択
56
+ 5. インストールスコープの選択(プロジェクトまたはグローバル)
57
+
58
+ ### ZIPとしてエクスポート
59
+
60
+ ```bash
61
+ # インタラクティブプロンプトでエクスポート
62
+ npx add-ai-tools owner/repo --zip
63
+
64
+ # プロンプトなしで全リソースをエクスポート
65
+ npx add-ai-tools owner/repo --zip -y
66
+ ```
67
+
68
+ ## 対応ソース
69
+
70
+ | 形式 | 例 | 状態 |
71
+ |------|-----|:----:|
72
+ | GitHub省略形 | `owner/repo` | ✓ |
73
+ | GitHub URL | `https://github.com/owner/repo` | ✓ |
74
+ | パス付きGitHub URL | `https://github.com/owner/repo/tree/main/skills/my-skill` | ✓ |
75
+ | Bitbucket URL | `https://bitbucket.org/workspace/repo` | ✓ |
76
+ | Git SSH (GitHub) | `git@github.com:owner/repo.git` | ✓ |
77
+ | Git SSH (Bitbucket) | `git@bitbucket.org:owner/repo.git` | ✓ |
78
+ | GitLab URL | `https://gitlab.com/owner/repo` | 近日対応予定 |
79
+
80
+ ## コマンドラインオプション
81
+
82
+ | オプション | 説明 | デフォルト |
83
+ |------------|------|-----------|
84
+ | `[source]` | リポジトリURLまたは省略形(オプション) | - |
85
+ | `--agent <agent>` | ターゲットエージェント | `claude-code` |
86
+ | `--scope <scope>` | インストールスコープ(`project`または`global`) | `project` |
87
+ | `-y, --yes` | すべての確認プロンプトをスキップ | `false` |
88
+ | `--zip` | インストールの代わりにZIPとしてリソースをエクスポート | `false` |
89
+ | `-h, --help` | ヘルプ情報を表示 | - |
90
+ | `-V, --version` | バージョン番号を表示 | - |
91
+
92
+ ### 利用可能なエージェント
93
+
94
+ - `claude-code` - Claude Code(Anthropic)
95
+ - `cursor` - Cursor IDE
96
+ - `github-copilot` - GitHub Copilot
97
+ - `antigravity` - Antigravity
98
+
99
+ ## 対応エージェントとリソース
100
+
101
+ | エージェント | Skills | Rules | Agents |
102
+ |-------------|:------:|:-----:|:------:|
103
+ | Claude Code | ✓ | ✓ | ✓ |
104
+ | Cursor | ✓ | ✓ | - |
105
+ | GitHub Copilot | ✓ | ✓ | - |
106
+ | Antigravity | ✓ | ✓ | - |
107
+
108
+ ## インストールパス
109
+
110
+ リソースはエージェント固有の場所にインストールされます:
111
+
112
+ | エージェント | プロジェクトスコープ | グローバルスコープ |
113
+ |-------------|---------------------|-------------------|
114
+ | Claude Code | `.claude/skills/`、`.claude/rules/`、`.claude/agents/` | `~/.claude/skills/`、`~/.claude/rules/`、`~/.claude/agents/` |
115
+ | Cursor | `.cursor/skills/`、`.cursor/rules/` | `~/.cursor/skills/`、`~/.cursor/rules/` |
116
+ | GitHub Copilot | `.github/skills/`、`.github/instructions/` | `~/.copilot/skills/`、`~/.copilot/instructions/` |
117
+ | Antigravity | `.agent/skills/`、`.agent/rules/` | `~/.gemini/antigravity/skills/`、`~/.gemini/antigravity/rules/` |
118
+
119
+ ## リソース構造
120
+
121
+ リソースは標準的な構造に従います:
122
+
123
+ ```
124
+ skill-name/
125
+ ├── SKILL.md # メインスキルファイル(必須)
126
+ ├── scripts/ # 実行可能なスクリプト(オプション)
127
+ ├── references/ # 参考ドキュメント(オプション)
128
+ └── assets/ # 静的アセット(オプション)
129
+ ```
130
+
131
+ このツールはリソースのインストール時に兄弟ディレクトリ(`scripts/`、`references/`、`assets/`)を自動的に処理します。
132
+
133
+ ## 重複処理
134
+
135
+ インストール先にリソースが既に存在する場合、以下を選択できます:
136
+
137
+ | アクション | 説明 |
138
+ |-----------|------|
139
+ | **スキップ** | 既存のファイルを変更せずに保持 |
140
+ | **上書き** | 新しいバージョンで置き換え |
141
+ | **リネーム** | 新しい名前で保存(例:`skill-2`、`skill-3`) |
142
+ | **バックアップ** | 置き換え前に既存ファイルの`.backup`を作成 |
143
+ | **比較** | 差分比較を表示して決定 |
144
+
145
+ 同一の内容は自動的に検出されスキップされます。
146
+
147
+ ## 使用例
148
+
149
+ ```bash
150
+ # 人気リポジトリからすべてのリソースをインストール
151
+ npx add-ai-tools vercel-labs/ai-chatbot
152
+
153
+ # グローバルスコープでCursorにインストール
154
+ npx add-ai-tools owner/repo --agent cursor --scope global
155
+
156
+ # プロンプトなしでインストール(すべてのデフォルト値を受け入れ)
157
+ npx add-ai-tools owner/repo -y
158
+
159
+ # インタラクティブモード - 引数不要
160
+ npx add-ai-tools
161
+
162
+ # 共有用にリソースをZIPとしてエクスポート
163
+ npx add-ai-tools owner/repo --zip
164
+
165
+ # プロンプトなしで全リソースをエクスポート
166
+ npx add-ai-tools owner/repo --zip -y
167
+
168
+ # Bitbucketからインストール
169
+ npx add-ai-tools https://bitbucket.org/workspace/repo
170
+
171
+ # サブディレクトリから特定のスキルをインストール
172
+ npx add-ai-tools https://github.com/owner/repo/tree/main/skills/code-review
173
+ ```
174
+
175
+ ## 動作の仕組み
176
+
177
+ 1. **ソースの解析** - 入力(省略形、URL、SSH)を解析してリポジトリを識別
178
+ 2. **リソースの取得** - Git Trees APIを使用してリポジトリ構造を効率的に取得
179
+ 3. **メタデータの解析** - リソースファイルからYAML frontmatterを抽出(名前、説明など)
180
+ 4. **重複の処理** - 既存のリソースを確認し、必要に応じてアクションをプロンプト
181
+ 5. **インストール** - 正しいエージェント固有の場所にファイルをアトミックに書き込み
182
+
183
+ ## 必要要件
184
+
185
+ - Node.js 18.0.0以上
186
+ - npmまたはpnpm
187
+
188
+ ## コントリビューション
189
+
190
+ コントリビューションを歓迎します!IssueやPull Requestをお気軽に提出してください。
191
+
192
+ ## ライセンス
193
+
194
+ MIT
package/README.ko.md ADDED
@@ -0,0 +1,194 @@
1
+ # add-ai-tools
2
+
3
+ 다양한 소스에서 AI 에이전트 리소스(Skills, Rules, Agents)를 단일 명령으로 설치하는 범용 CLI 도구입니다.
4
+
5
+ **[English](./README.md)** | **[中文](./README.zh-CN.md)** | **[日本語](./README.ja.md)**
6
+
7
+ ## 개요
8
+
9
+ `add-ai-tools`는 AI 코딩 어시스턴트 리소스 관리를 단순화합니다. GitHub, Bitbucket 저장소에서 리소스를 가져와 선호하는 AI 에이전트에 맞는 위치에 설치합니다.
10
+
11
+ ### 주요 기능
12
+
13
+ - **다중 소스 지원** - GitHub, Bitbucket, Git SSH URL에서 설치
14
+ - **다중 에이전트 지원** - Claude Code, Cursor, GitHub Copilot, Antigravity 지원
15
+ - **대화형 모드** - 쉬운 리소스 선택을 위한 가이드 프롬프트
16
+ - **ZIP 내보내기** - 휴대 가능한 ZIP 아카이브로 리소스 내보내기
17
+ - **스마트 중복 처리** - 건너뛰기, 덮어쓰기, 이름 변경, 백업, 비교 옵션
18
+ - **일괄 설치** - 여러 리소스를 한 번에 설치
19
+
20
+ ## 설치
21
+
22
+ ```bash
23
+ # 전역 설치
24
+ npm install -g add-ai-tools
25
+
26
+ # 또는 npx로 직접 사용
27
+ npx add-ai-tools
28
+ ```
29
+
30
+ ## 빠른 시작
31
+
32
+ ### GitHub에서 설치
33
+
34
+ ```bash
35
+ # GitHub 축약형 사용
36
+ npx add-ai-tools owner/repo
37
+
38
+ # 전체 GitHub URL 사용
39
+ npx add-ai-tools https://github.com/owner/repo
40
+
41
+ # 특정 경로의 리소스 설치
42
+ npx add-ai-tools https://github.com/owner/repo/tree/main/skills/my-skill
43
+ ```
44
+
45
+ ### 대화형 모드
46
+
47
+ ```bash
48
+ npx add-ai-tools
49
+ ```
50
+
51
+ 대화형 모드는 다음 단계를 안내합니다:
52
+ 1. AI 에이전트 선택 (Claude Code, Cursor 등)
53
+ 2. 소스 저장소 입력
54
+ 3. 리소스 유형 선택 (Skills, Rules, Agents)
55
+ 4. 설치할 특정 리소스 선택
56
+ 5. 설치 범위 선택 (프로젝트 또는 전역)
57
+
58
+ ### ZIP으로 내보내기
59
+
60
+ ```bash
61
+ # 대화형 프롬프트로 내보내기
62
+ npx add-ai-tools owner/repo --zip
63
+
64
+ # 프롬프트 없이 모든 리소스 내보내기
65
+ npx add-ai-tools owner/repo --zip -y
66
+ ```
67
+
68
+ ## 지원되는 소스
69
+
70
+ | 형식 | 예시 | 상태 |
71
+ |------|------|:----:|
72
+ | GitHub 축약형 | `owner/repo` | ✓ |
73
+ | GitHub URL | `https://github.com/owner/repo` | ✓ |
74
+ | 경로 포함 GitHub URL | `https://github.com/owner/repo/tree/main/skills/my-skill` | ✓ |
75
+ | Bitbucket URL | `https://bitbucket.org/workspace/repo` | ✓ |
76
+ | Git SSH (GitHub) | `git@github.com:owner/repo.git` | ✓ |
77
+ | Git SSH (Bitbucket) | `git@bitbucket.org:owner/repo.git` | ✓ |
78
+ | GitLab URL | `https://gitlab.com/owner/repo` | 준비 중 |
79
+
80
+ ## 명령줄 옵션
81
+
82
+ | 옵션 | 설명 | 기본값 |
83
+ |------|------|--------|
84
+ | `[source]` | 저장소 URL 또는 축약형 (선택사항) | - |
85
+ | `--agent <agent>` | 대상 에이전트 | `claude-code` |
86
+ | `--scope <scope>` | 설치 범위 (`project` 또는 `global`) | `project` |
87
+ | `-y, --yes` | 모든 확인 프롬프트 건너뛰기 | `false` |
88
+ | `--zip` | 설치 대신 ZIP으로 리소스 내보내기 | `false` |
89
+ | `-h, --help` | 도움말 정보 표시 | - |
90
+ | `-V, --version` | 버전 번호 표시 | - |
91
+
92
+ ### 사용 가능한 에이전트
93
+
94
+ - `claude-code` - Claude Code (Anthropic)
95
+ - `cursor` - Cursor IDE
96
+ - `github-copilot` - GitHub Copilot
97
+ - `antigravity` - Antigravity
98
+
99
+ ## 지원 에이전트 및 리소스
100
+
101
+ | 에이전트 | Skills | Rules | Agents |
102
+ |---------|:------:|:-----:|:------:|
103
+ | Claude Code | ✓ | ✓ | ✓ |
104
+ | Cursor | ✓ | ✓ | - |
105
+ | GitHub Copilot | ✓ | ✓ | - |
106
+ | Antigravity | ✓ | ✓ | - |
107
+
108
+ ## 설치 경로
109
+
110
+ 리소스는 에이전트별 위치에 설치됩니다:
111
+
112
+ | 에이전트 | 프로젝트 범위 | 전역 범위 |
113
+ |---------|--------------|----------|
114
+ | Claude Code | `.claude/skills/`, `.claude/rules/`, `.claude/agents/` | `~/.claude/skills/`, `~/.claude/rules/`, `~/.claude/agents/` |
115
+ | Cursor | `.cursor/skills/`, `.cursor/rules/` | `~/.cursor/skills/`, `~/.cursor/rules/` |
116
+ | GitHub Copilot | `.github/skills/`, `.github/instructions/` | `~/.copilot/skills/`, `~/.copilot/instructions/` |
117
+ | Antigravity | `.agent/skills/`, `.agent/rules/` | `~/.gemini/antigravity/skills/`, `~/.gemini/antigravity/rules/` |
118
+
119
+ ## 리소스 구조
120
+
121
+ 리소스는 표준 구조를 따릅니다:
122
+
123
+ ```
124
+ skill-name/
125
+ ├── SKILL.md # 메인 스킬 파일 (필수)
126
+ ├── scripts/ # 실행 가능한 스크립트 (선택)
127
+ ├── references/ # 참조 문서 (선택)
128
+ └── assets/ # 정적 자산 (선택)
129
+ ```
130
+
131
+ 이 도구는 리소스 설치 시 형제 디렉토리(`scripts/`, `references/`, `assets/`)를 자동으로 처리합니다.
132
+
133
+ ## 중복 처리
134
+
135
+ 목적지에 이미 리소스가 존재할 때 선택할 수 있는 옵션:
136
+
137
+ | 동작 | 설명 |
138
+ |------|------|
139
+ | **건너뛰기** | 기존 파일을 변경하지 않고 유지 |
140
+ | **덮어쓰기** | 새 버전으로 교체 |
141
+ | **이름 변경** | 새 이름으로 저장 (예: `skill-2`, `skill-3`) |
142
+ | **백업** | 교체 전 기존 파일의 `.backup` 생성 |
143
+ | **비교** | 차이점 비교 후 결정 |
144
+
145
+ 동일한 내용은 자동으로 감지되어 건너뜁니다.
146
+
147
+ ## 예시
148
+
149
+ ```bash
150
+ # 인기 저장소에서 모든 리소스 설치
151
+ npx add-ai-tools vercel-labs/ai-chatbot
152
+
153
+ # 전역 범위로 Cursor에 설치
154
+ npx add-ai-tools owner/repo --agent cursor --scope global
155
+
156
+ # 프롬프트 없이 설치 (모든 기본값 수락)
157
+ npx add-ai-tools owner/repo -y
158
+
159
+ # 대화형 모드 - 인자 필요 없음
160
+ npx add-ai-tools
161
+
162
+ # 공유를 위해 리소스를 ZIP으로 내보내기
163
+ npx add-ai-tools owner/repo --zip
164
+
165
+ # 프롬프트 없이 모든 리소스 내보내기
166
+ npx add-ai-tools owner/repo --zip -y
167
+
168
+ # Bitbucket에서 설치
169
+ npx add-ai-tools https://bitbucket.org/workspace/repo
170
+
171
+ # 하위 디렉토리에서 특정 스킬 설치
172
+ npx add-ai-tools https://github.com/owner/repo/tree/main/skills/code-review
173
+ ```
174
+
175
+ ## 작동 방식
176
+
177
+ 1. **소스 파싱** - 입력(축약형, URL, SSH)을 파싱하여 저장소 식별
178
+ 2. **리소스 가져오기** - Git Trees API를 사용하여 저장소 구조를 효율적으로 가져오기
179
+ 3. **메타데이터 파싱** - 리소스 파일에서 YAML frontmatter 추출 (이름, 설명 등)
180
+ 4. **중복 처리** - 기존 리소스 확인 및 필요시 동작 프롬프트
181
+ 5. **설치** - 올바른 에이전트별 위치에 파일을 원자적으로 쓰기
182
+
183
+ ## 요구 사항
184
+
185
+ - Node.js 18.0.0 이상
186
+ - npm 또는 pnpm
187
+
188
+ ## 기여
189
+
190
+ 기여를 환영합니다! 이슈와 풀 리퀘스트를 자유롭게 제출해 주세요.
191
+
192
+ ## 라이선스
193
+
194
+ MIT
package/README.md CHANGED
@@ -1,11 +1,30 @@
1
1
  # add-ai-tools
2
2
 
3
- Install AI agent resources (Skills, Rules, Agents) from various sources with a single command.
3
+ A universal CLI tool for installing AI agent resources (Skills, Rules, Agents) from various sources with a single command.
4
+
5
+ **[한국어](./README.ko.md)** | **[中文](./README.zh-CN.md)** | **[日本語](./README.ja.md)**
6
+
7
+ ## Overview
8
+
9
+ `add-ai-tools` simplifies the process of managing AI coding assistant resources. It fetches resources from GitHub or Bitbucket repositories and installs them to the appropriate location for your preferred AI agent.
10
+
11
+ ### Key Features
12
+
13
+ - **Multi-Source Support** - Install from GitHub, Bitbucket, or Git SSH URLs
14
+ - **Multi-Agent Support** - Works with Claude Code, Cursor, GitHub Copilot, and Antigravity
15
+ - **Interactive Mode** - Guided prompts for easy resource selection
16
+ - **ZIP Export** - Export resources as portable ZIP archives
17
+ - **Smart Duplicate Handling** - Skip, overwrite, rename, backup, or compare duplicates
18
+ - **Batch Installation** - Install multiple resources at once
4
19
 
5
20
  ## Installation
6
21
 
7
22
  ```bash
23
+ # Install globally
8
24
  npm install -g add-ai-tools
25
+
26
+ # Or use directly with npx
27
+ npx add-ai-tools
9
28
  ```
10
29
 
11
30
  ## Quick Start
@@ -16,10 +35,10 @@ npm install -g add-ai-tools
16
35
  # Using GitHub shorthand
17
36
  npx add-ai-tools owner/repo
18
37
 
19
- # Using GitHub URL
38
+ # Using full GitHub URL
20
39
  npx add-ai-tools https://github.com/owner/repo
21
40
 
22
- # Install specific resource
41
+ # Install specific resource from a path
23
42
  npx add-ai-tools https://github.com/owner/repo/tree/main/skills/my-skill
24
43
  ```
25
44
 
@@ -29,41 +48,55 @@ npx add-ai-tools https://github.com/owner/repo/tree/main/skills/my-skill
29
48
  npx add-ai-tools
30
49
  ```
31
50
 
32
- Follow the prompts to select agent, resource type, and resources to install.
51
+ The interactive mode guides you through:
52
+ 1. Selecting your AI agent (Claude Code, Cursor, etc.)
53
+ 2. Entering the source repository
54
+ 3. Choosing resource types (Skills, Rules, Agents)
55
+ 4. Selecting specific resources to install
56
+ 5. Choosing installation scope (project or global)
33
57
 
34
58
  ### Export as ZIP
35
59
 
36
60
  ```bash
37
- # Export from GitHub source (with prompts)
61
+ # Export with interactive prompts
38
62
  npx add-ai-tools owner/repo --zip
39
63
 
40
- # Interactive source input
41
- npx add-ai-tools --zip
42
-
43
64
  # Export all resources without prompts
44
65
  npx add-ai-tools owner/repo --zip -y
45
66
  ```
46
67
 
47
68
  ## Supported Sources
48
69
 
49
- | Format | Example |
50
- |--------|---------|
51
- | GitHub shorthand | `owner/repo` |
52
- | GitHub URL | `https://github.com/owner/repo` |
53
- | GitHub URL with path | `https://github.com/owner/repo/tree/main/skills/my-skill` |
54
- | GitLab URL | `https://gitlab.com/owner/repo` |
55
- | Git SSH | `git@github.com:owner/repo.git` |
70
+ | Format | Example | Status |
71
+ |--------|---------|:------:|
72
+ | GitHub shorthand | `owner/repo` | ✓ |
73
+ | GitHub URL | `https://github.com/owner/repo` | ✓ |
74
+ | GitHub URL with path | `https://github.com/owner/repo/tree/main/skills/my-skill` | ✓ |
75
+ | Bitbucket URL | `https://bitbucket.org/workspace/repo` | ✓ |
76
+ | Git SSH (GitHub) | `git@github.com:owner/repo.git` | ✓ |
77
+ | Git SSH (Bitbucket) | `git@bitbucket.org:owner/repo.git` | ✓ |
78
+ | GitLab URL | `https://gitlab.com/owner/repo` | Coming Soon |
56
79
 
57
- ## Options
80
+ ## Command Line Options
58
81
 
59
82
  | Option | Description | Default |
60
83
  |--------|-------------|---------|
61
- | `--agent <agent>` | Target agent (`claude-code`, `cursor`, `github-copilot`, `antigravity`) | `claude-code` |
62
- | `--scope <scope>` | Installation scope (`project`, `global`) | `project` |
63
- | `-y, --yes` | Skip confirmation prompts | `false` |
64
- | `--zip` | Export resources as ZIP | `false` |
84
+ | `[source]` | Repository URL or shorthand (optional) | - |
85
+ | `--agent <agent>` | Target agent | `claude-code` |
86
+ | `--scope <scope>` | Installation scope (`project` or `global`) | `project` |
87
+ | `-y, --yes` | Skip all confirmation prompts | `false` |
88
+ | `--zip` | Export resources as ZIP instead of installing | `false` |
89
+ | `-h, --help` | Display help information | - |
90
+ | `-V, --version` | Display version number | - |
91
+
92
+ ### Available Agents
65
93
 
66
- ## Supported Agents
94
+ - `claude-code` - Claude Code (Anthropic)
95
+ - `cursor` - Cursor IDE
96
+ - `github-copilot` - GitHub Copilot
97
+ - `antigravity` - Antigravity
98
+
99
+ ## Supported Agents & Resources
67
100
 
68
101
  | Agent | Skills | Rules | Agents |
69
102
  |-------|:------:|:-----:|:------:|
@@ -74,49 +107,88 @@ npx add-ai-tools owner/repo --zip -y
74
107
 
75
108
  ## Installation Paths
76
109
 
77
- Resources are installed to the appropriate location for each agent:
110
+ Resources are installed to agent-specific locations:
78
111
 
79
112
  | Agent | Project Scope | Global Scope |
80
113
  |-------|---------------|--------------|
81
- | Claude Code | `.claude/` | `~/.claude/` |
82
- | Cursor | `.cursor/` | `~/.cursor/` |
83
- | GitHub Copilot | `.github/` | `~/.copilot/` |
84
- | Antigravity | `.agent/` | `~/.gemini/antigravity/` |
114
+ | Claude Code | `.claude/skills/`, `.claude/rules/`, `.claude/agents/` | `~/.claude/skills/`, `~/.claude/rules/`, `~/.claude/agents/` |
115
+ | Cursor | `.cursor/skills/`, `.cursor/rules/` | `~/.cursor/skills/`, `~/.cursor/rules/` |
116
+ | GitHub Copilot | `.github/skills/`, `.github/instructions/` | `~/.copilot/skills/`, `~/.copilot/instructions/` |
117
+ | Antigravity | `.agent/skills/`, `.agent/rules/` | `~/.gemini/antigravity/skills/`, `~/.gemini/antigravity/rules/` |
118
+
119
+ ## Resource Structure
120
+
121
+ Resources follow a standard structure:
122
+
123
+ ```
124
+ skill-name/
125
+ ├── SKILL.md # Main skill file (required)
126
+ ├── scripts/ # Executable scripts (optional)
127
+ ├── references/ # Reference documentation (optional)
128
+ └── assets/ # Static assets (optional)
129
+ ```
130
+
131
+ The tool automatically handles sibling directories (`scripts/`, `references/`, `assets/`) when installing resources.
85
132
 
86
133
  ## Duplicate Handling
87
134
 
88
- When a resource already exists, you can choose to:
135
+ When a resource already exists at the destination, you can choose:
89
136
 
90
- - **Skip** - Keep existing file
91
- - **Overwrite** - Replace with new version
92
- - **Rename** - Save as new name (e.g., `skill-2`)
93
- - **Backup** - Backup existing file before replacing
94
- - **Compare** - View diff and decide
137
+ | Action | Description |
138
+ |--------|-------------|
139
+ | **Skip** | Keep the existing file unchanged |
140
+ | **Overwrite** | Replace with the new version |
141
+ | **Rename** | Save with a new name (e.g., `skill-2`, `skill-3`) |
142
+ | **Backup** | Create a `.backup` of existing file before replacing |
143
+ | **Compare** | View a diff comparison and decide |
95
144
 
96
- Identical content is automatically skipped.
145
+ Identical content is automatically detected and skipped.
97
146
 
98
147
  ## Examples
99
148
 
100
149
  ```bash
101
- # Install all resources from a repo to Claude Code
150
+ # Install all resources from a popular repo
102
151
  npx add-ai-tools vercel-labs/ai-chatbot
103
152
 
104
153
  # Install to Cursor with global scope
105
154
  npx add-ai-tools owner/repo --agent cursor --scope global
106
155
 
107
- # Install without prompts
156
+ # Install without any prompts (accept all defaults)
108
157
  npx add-ai-tools owner/repo -y
109
158
 
110
- # Interactive mode
159
+ # Interactive mode - no arguments needed
111
160
  npx add-ai-tools
112
161
 
113
- # Export resources as ZIP from GitHub
162
+ # Export resources as ZIP for sharing
114
163
  npx add-ai-tools owner/repo --zip
115
164
 
116
165
  # Export all resources without prompts
117
166
  npx add-ai-tools owner/repo --zip -y
167
+
168
+ # Install from Bitbucket
169
+ npx add-ai-tools https://bitbucket.org/workspace/repo
170
+
171
+ # Install specific skill from a subdirectory
172
+ npx add-ai-tools https://github.com/owner/repo/tree/main/skills/code-review
118
173
  ```
119
174
 
175
+ ## How It Works
176
+
177
+ 1. **Parse Source** - The tool parses your input (shorthand, URL, or SSH) to identify the repository
178
+ 2. **Fetch Resources** - Uses the Git Trees API for efficient fetching of repository structure
179
+ 3. **Parse Metadata** - Extracts YAML frontmatter from resource files (name, description, etc.)
180
+ 4. **Handle Duplicates** - Checks for existing resources and prompts for action if needed
181
+ 5. **Install** - Writes files atomically to the correct agent-specific location
182
+
183
+ ## Requirements
184
+
185
+ - Node.js 18.0.0 or higher
186
+ - npm or pnpm
187
+
188
+ ## Contributing
189
+
190
+ Contributions are welcome! Please feel free to submit issues and pull requests.
191
+
120
192
  ## License
121
193
 
122
194
  MIT
@@ -0,0 +1,194 @@
1
+ # add-ai-tools
2
+
3
+ 一个通用的 CLI 工具,可以从各种来源一键安装 AI 代理资源(Skills、Rules、Agents)。
4
+
5
+ **[English](./README.md)** | **[한국어](./README.ko.md)** | **[日本語](./README.ja.md)**
6
+
7
+ ## 概述
8
+
9
+ `add-ai-tools` 简化了 AI 编码助手资源的管理流程。它可以从 GitHub 或 Bitbucket 仓库获取资源,并安装到您首选的 AI 代理对应的位置。
10
+
11
+ ### 主要特性
12
+
13
+ - **多来源支持** - 支持从 GitHub、Bitbucket 或 Git SSH URL 安装
14
+ - **多代理支持** - 兼容 Claude Code、Cursor、GitHub Copilot 和 Antigravity
15
+ - **交互模式** - 引导式提示,轻松选择资源
16
+ - **ZIP 导出** - 将资源导出为便携的 ZIP 归档
17
+ - **智能重复处理** - 支持跳过、覆盖、重命名、备份或比较重复文件
18
+ - **批量安装** - 一次安装多个资源
19
+
20
+ ## 安装
21
+
22
+ ```bash
23
+ # 全局安装
24
+ npm install -g add-ai-tools
25
+
26
+ # 或使用 npx 直接运行
27
+ npx add-ai-tools
28
+ ```
29
+
30
+ ## 快速开始
31
+
32
+ ### 从 GitHub 安装
33
+
34
+ ```bash
35
+ # 使用 GitHub 简写
36
+ npx add-ai-tools owner/repo
37
+
38
+ # 使用完整 GitHub URL
39
+ npx add-ai-tools https://github.com/owner/repo
40
+
41
+ # 从特定路径安装资源
42
+ npx add-ai-tools https://github.com/owner/repo/tree/main/skills/my-skill
43
+ ```
44
+
45
+ ### 交互模式
46
+
47
+ ```bash
48
+ npx add-ai-tools
49
+ ```
50
+
51
+ 交互模式将引导您完成以下步骤:
52
+ 1. 选择您的 AI 代理(Claude Code、Cursor 等)
53
+ 2. 输入源仓库地址
54
+ 3. 选择资源类型(Skills、Rules、Agents)
55
+ 4. 选择要安装的具体资源
56
+ 5. 选择安装范围(项目级或全局)
57
+
58
+ ### 导出为 ZIP
59
+
60
+ ```bash
61
+ # 使用交互式提示导出
62
+ npx add-ai-tools owner/repo --zip
63
+
64
+ # 无提示导出所有资源
65
+ npx add-ai-tools owner/repo --zip -y
66
+ ```
67
+
68
+ ## 支持的来源
69
+
70
+ | 格式 | 示例 | 状态 |
71
+ |------|------|:----:|
72
+ | GitHub 简写 | `owner/repo` | ✓ |
73
+ | GitHub URL | `https://github.com/owner/repo` | ✓ |
74
+ | 带路径的 GitHub URL | `https://github.com/owner/repo/tree/main/skills/my-skill` | ✓ |
75
+ | Bitbucket URL | `https://bitbucket.org/workspace/repo` | ✓ |
76
+ | Git SSH (GitHub) | `git@github.com:owner/repo.git` | ✓ |
77
+ | Git SSH (Bitbucket) | `git@bitbucket.org:owner/repo.git` | ✓ |
78
+ | GitLab URL | `https://gitlab.com/owner/repo` | 即将推出 |
79
+
80
+ ## 命令行选项
81
+
82
+ | 选项 | 描述 | 默认值 |
83
+ |------|------|--------|
84
+ | `[source]` | 仓库 URL 或简写(可选) | - |
85
+ | `--agent <agent>` | 目标代理 | `claude-code` |
86
+ | `--scope <scope>` | 安装范围(`project` 或 `global`) | `project` |
87
+ | `-y, --yes` | 跳过所有确认提示 | `false` |
88
+ | `--zip` | 导出为 ZIP 而非安装 | `false` |
89
+ | `-h, --help` | 显示帮助信息 | - |
90
+ | `-V, --version` | 显示版本号 | - |
91
+
92
+ ### 可用代理
93
+
94
+ - `claude-code` - Claude Code(Anthropic)
95
+ - `cursor` - Cursor IDE
96
+ - `github-copilot` - GitHub Copilot
97
+ - `antigravity` - Antigravity
98
+
99
+ ## 支持的代理和资源
100
+
101
+ | 代理 | Skills | Rules | Agents |
102
+ |------|:------:|:-----:|:------:|
103
+ | Claude Code | ✓ | ✓ | ✓ |
104
+ | Cursor | ✓ | ✓ | - |
105
+ | GitHub Copilot | ✓ | ✓ | - |
106
+ | Antigravity | ✓ | ✓ | - |
107
+
108
+ ## 安装路径
109
+
110
+ 资源将安装到代理特定的位置:
111
+
112
+ | 代理 | 项目范围 | 全局范围 |
113
+ |------|----------|----------|
114
+ | Claude Code | `.claude/skills/`、`.claude/rules/`、`.claude/agents/` | `~/.claude/skills/`、`~/.claude/rules/`、`~/.claude/agents/` |
115
+ | Cursor | `.cursor/skills/`、`.cursor/rules/` | `~/.cursor/skills/`、`~/.cursor/rules/` |
116
+ | GitHub Copilot | `.github/skills/`、`.github/instructions/` | `~/.copilot/skills/`、`~/.copilot/instructions/` |
117
+ | Antigravity | `.agent/skills/`、`.agent/rules/` | `~/.gemini/antigravity/skills/`、`~/.gemini/antigravity/rules/` |
118
+
119
+ ## 资源结构
120
+
121
+ 资源遵循标准结构:
122
+
123
+ ```
124
+ skill-name/
125
+ ├── SKILL.md # 主要技能文件(必需)
126
+ ├── scripts/ # 可执行脚本(可选)
127
+ ├── references/ # 参考文档(可选)
128
+ └── assets/ # 静态资源(可选)
129
+ ```
130
+
131
+ 该工具在安装资源时会自动处理同级目录(`scripts/`、`references/`、`assets/`)。
132
+
133
+ ## 重复处理
134
+
135
+ 当目标位置已存在资源时,您可以选择:
136
+
137
+ | 操作 | 描述 |
138
+ |------|------|
139
+ | **跳过** | 保持现有文件不变 |
140
+ | **覆盖** | 用新版本替换 |
141
+ | **重命名** | 以新名称保存(如 `skill-2`、`skill-3`) |
142
+ | **备份** | 替换前创建现有文件的 `.backup` |
143
+ | **比较** | 查看差异对比后决定 |
144
+
145
+ 相同内容会自动检测并跳过。
146
+
147
+ ## 示例
148
+
149
+ ```bash
150
+ # 从热门仓库安装所有资源
151
+ npx add-ai-tools vercel-labs/ai-chatbot
152
+
153
+ # 以全局范围安装到 Cursor
154
+ npx add-ai-tools owner/repo --agent cursor --scope global
155
+
156
+ # 无提示安装(接受所有默认值)
157
+ npx add-ai-tools owner/repo -y
158
+
159
+ # 交互模式 - 无需参数
160
+ npx add-ai-tools
161
+
162
+ # 导出资源为 ZIP 以便分享
163
+ npx add-ai-tools owner/repo --zip
164
+
165
+ # 无提示导出所有资源
166
+ npx add-ai-tools owner/repo --zip -y
167
+
168
+ # 从 Bitbucket 安装
169
+ npx add-ai-tools https://bitbucket.org/workspace/repo
170
+
171
+ # 从子目录安装特定技能
172
+ npx add-ai-tools https://github.com/owner/repo/tree/main/skills/code-review
173
+ ```
174
+
175
+ ## 工作原理
176
+
177
+ 1. **解析来源** - 解析您的输入(简写、URL 或 SSH)以识别仓库
178
+ 2. **获取资源** - 使用 Git Trees API 高效获取仓库结构
179
+ 3. **解析元数据** - 从资源文件中提取 YAML frontmatter(名称、描述等)
180
+ 4. **处理重复** - 检查现有资源,必要时提示操作
181
+ 5. **安装** - 原子性地将文件写入正确的代理特定位置
182
+
183
+ ## 系统要求
184
+
185
+ - Node.js 18.0.0 或更高版本
186
+ - npm 或 pnpm
187
+
188
+ ## 贡献
189
+
190
+ 欢迎贡献!请随时提交 Issue 和 Pull Request。
191
+
192
+ ## 许可证
193
+
194
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "add-ai-tools",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Universal AI agent resource installer CLI",
5
5
  "type": "module",
6
6
  "bin": {