owner-clone-ai-mcp 1.28.0 → 1.28.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/domains/skills.js +37 -13
- package/package.json +1 -1
package/domains/skills.js
CHANGED
|
@@ -39,15 +39,39 @@ const tools = [
|
|
|
39
39
|
作成後は prepare_skill で実行します。
|
|
40
40
|
サーバーはDBからコンテキストを取得するのみで、AI処理はClaude Code自身が実行します。
|
|
41
41
|
|
|
42
|
-
■ prompt_template
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
■ prompt_template の書き方【実行モードによって異なる・重要】
|
|
43
|
+
テンプレートはパラメータ置換後に「ユーザーメッセージ」として処理される。
|
|
44
|
+
AIパートナー(preset_id)を指定した場合そのbase_promptがシステムプロンプトになる。
|
|
45
|
+
|
|
46
|
+
◆ prepare_skill で実行する場合(Claude Code 自律実行型)【このモードが主用途】
|
|
47
|
+
テンプレートは Claude Code が受け取る「指示書」として機能する。
|
|
48
|
+
Claude Code はエージェントとして動作するため、MCPツール呼び出し指示を書いてよい:
|
|
49
|
+
例: "STEP4: list_knowledge_items でフォルダID=xxx から全件取得して分析せよ"
|
|
50
|
+
"STEP5: search_knowledge で「キーワード」を検索して上位5件を比較せよ"
|
|
51
|
+
"STEP8: 結果を create_knowledge でフォルダID=yyy に保存せよ"
|
|
52
|
+
多段階処理・大量ナレッジ・条件分岐・複数フォルダ横断など複雑なワークフローに適している。
|
|
53
|
+
output_target / output_knowledge_folder_id は output_config として返されるが、
|
|
54
|
+
Claude Code 側で独自に create_knowledge を呼ぶ方が柔軟なため任意。
|
|
55
|
+
|
|
56
|
+
◆ invoke_skill で実行する場合(サーバー実行型)【シンプルな単発タスク向け】
|
|
57
|
+
テンプレートはサーバー側AIへの「ユーザーメッセージ」として単発で送られる。
|
|
58
|
+
サーバー側AIはテキスト処理のみ:MCPツール呼び出し・外部APIリクエスト不可。
|
|
59
|
+
ナレッジ保存は output_target + output_knowledge_folder_id で自動化できる。
|
|
60
|
+
要約・文章生成・フォーマット変換など単純なテキスト処理タスクに適している。
|
|
61
|
+
|
|
62
|
+
■ 多段階スキルで他のAIパートナーを呼び出す場合 — 実行コンテキストで方法が変わる・重要
|
|
63
|
+
不明な場合は先にユーザーへ「このスキルはClaude Code/MCPから使いますか?AIパートナーのチャットから使いますか?」と確認すること。
|
|
64
|
+
|
|
65
|
+
◆ MCP/Claude Code経由で動かす(prepare_skill)→ prompt_template に load_agent を書く【追加AI課金なし】
|
|
66
|
+
Claude Codeのセッション内で実行されるため追加AI課金は発生しない。
|
|
67
|
+
例: "STEP3: load_agent(id=<AIパートナーAのID>, query={{topic}}) でAIパートナーAの人格・ナレッジを取得し、その内容で回答を生成せよ"
|
|
68
|
+
"STEP5: load_agent(id=<AIパートナーBのID>, query={{topic}}) でAIパートナーBに切り替えて別の観点で分析せよ"
|
|
69
|
+
→ ステップごとに異なるAIパートナーを呼び分ける多段階処理も可能。
|
|
70
|
+
|
|
71
|
+
◆ AIパートナーのチャットから起動(invoke_skill)→ load_agent は使用不可。サブスキルで代替
|
|
72
|
+
load_agentはMCPセッション専用ツールのため、サーバー側実行では動作しない。
|
|
73
|
+
→ 他のAIパートナーで実行させるサブスキル(preset_id=対象AIパートナーのID)をあらかじめ create_skill で作成し、
|
|
74
|
+
そのskill_idを invoke_skill で呼ぶことで代替する。
|
|
51
75
|
|
|
52
76
|
■ パラメータの使い方
|
|
53
77
|
prompt_template 内に {{param_name}} と書くと実行時に値が置換されます(全て文字列)。
|
|
@@ -89,7 +113,7 @@ allowed_plan_ids でプランを絞り込めます([] または省略 = 全プ
|
|
|
89
113
|
name: { type: 'string', description: 'コマンド名。英数字・ハイフン・アンダースコアのみ使用すること(スペース・記号・日本語はClaude Codeから呼び出す際に問題が生じる)。例: lp-creator, email-writer' },
|
|
90
114
|
display_name: { type: 'string', description: '表示名(日本語OK)。例: LPクリエイター' },
|
|
91
115
|
description: { type: 'string', description: 'このスキルが何をするか。AIが呼び出しタイミングを判断する説明文' },
|
|
92
|
-
prompt_template: { type: 'string', description: '
|
|
116
|
+
prompt_template: { type: 'string', description: 'スキル実行時の指示テキスト。{{param_name}}形式でパラメータを埋め込み可能。prepare_skill(Claude Code自律実行)で使う場合はMCPツール呼び出し指示を含めてよい(list_knowledge_items / create_knowledge 等)。invoke_skill(サーバー実行)で使う場合はテキスト処理の指示のみ(MCP指示は動作しない)。' },
|
|
93
117
|
parameters: {
|
|
94
118
|
type: 'array',
|
|
95
119
|
description: 'パラメータ定義リスト。prompt_template内の{{}}プレースホルダーと対応させる',
|
|
@@ -141,7 +165,7 @@ is_admin_published / allowed_plan_ids はAdmin権限がある場合のみ反映
|
|
|
141
165
|
name: { type: 'string', description: 'コマンド名。英数字・ハイフン・アンダースコアのみ使用すること' },
|
|
142
166
|
display_name: { type: 'string', description: '表示名(日本語OK)' },
|
|
143
167
|
description: { type: 'string', description: 'スキルの用途説明' },
|
|
144
|
-
prompt_template: { type: 'string', description: '
|
|
168
|
+
prompt_template: { type: 'string', description: 'スキル実行時の指示テキスト。prepare_skill(Claude Code自律実行)で使う場合はMCPツール呼び出し指示を含めてよい。invoke_skill(サーバー実行)で使う場合はテキスト処理の指示のみ。' },
|
|
145
169
|
parameters: { type: 'array', items: { type: 'object' }, description: 'パラメータ定義リスト。配列全体を置き換えるため、既存パラメータも含めて全て渡すこと [{name, description, required, default_value, input_type, hidden}]' },
|
|
146
170
|
knowledge_item_ids: { type: 'array', items: { type: 'string' }, description: '参照するナレッジのID一覧(UUID文字列)。配列全体を置き換える' },
|
|
147
171
|
knowledge_folder_ids: { type: 'array', items: { type: 'string' }, description: '参照するナレッジフォルダID一覧(UUID文字列)。配列全体を置き換える' },
|
|
@@ -161,8 +185,8 @@ is_admin_published / allowed_plan_ids はAdmin権限がある場合のみ反映
|
|
|
161
185
|
},
|
|
162
186
|
{
|
|
163
187
|
name: 'delete_skill',
|
|
164
|
-
description: '
|
|
165
|
-
annotations: { destructiveHint:
|
|
188
|
+
description: 'スキルをゴミ箱へ移動します。【書き込み権限付きキーが必要】完全削除ではなくソフトデリート(ゴミ箱移動)のみ実行可能。完全削除はUIのゴミ箱画面からユーザーが手動で行う必要があります。',
|
|
189
|
+
annotations: { destructiveHint: false, idempotentHint: false },
|
|
166
190
|
inputSchema: {
|
|
167
191
|
type: 'object',
|
|
168
192
|
properties: {
|