一键导入
artclaw-tool-executor
ArtClaw Tool Executor - 执行 ArtClaw Tool Manager 中的工具。当用户请求运行工具时,根据工具类型选择正确的执行方式。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
ArtClaw Tool Executor - 执行 ArtClaw Tool Manager 中的工具。当用户请求运行工具时,根据工具类型选择正确的执行方式。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
ArtClaw Tool Creator - AI 引导创建自定义 DCC 工具。支持三种创建方式:包装 Skill、编写脚本、组合工具。
Capture UE viewport screenshots (color, depth, normal buffers) and build AI analysis context. Use when AI needs to: (1) take a screenshot of the current viewport, (2) capture depth/normal maps alongside color, (3) analyze scene composition/lighting/performance visually, (4) get viewport image + camera transform for scene analysis. NOT for: runtime game screenshots, cinematic rendering, Sequencer captures.
ComfyUI 缺失自定义节点自动检测与安装。 Use when AI needs to: (1) install missing custom nodes for a workflow, (2) check if required nodes are available, (3) search and install node packages from ComfyUI registry. ComfyUI only (run_python).
从 SD 内置 30 个 PBR 材质逆向分析的材质配方库。包含 7 个类别配方 + 3 个通用功能配方, 涵盖混凝土/金属/瓷砖/砖墙/布料/木材/有机物的节点图结构、管线设计和制作逻辑。 Use when AI needs to: (1) choose appropriate nodes for a material type, (2) reference professional material graph structure, (3) understand common SD material building patterns, (4) select texture sources for different material categories, (5) plan a material pipeline before building. Substance Designer only (run_python).
Manage ArtClaw skills: list, execute, install, uninstall, update, publish, rename, and create new skills. Use when AI needs to: (1) install/uninstall/update skills, (2) publish user skills to source repository, (3) list available skills and their info, (4) create new skills with AI-generated code, (5) rename or reorganize skills. All operations via Python API in DCC (run_ue_python or run_python). NOT for: OpenClaw CLI skill commands, ClawHub marketplace publishing.
Unity Editor AI agent context and routing skill for ArtClaw Bridge. Use when AI needs to: (1) understand how to operate Unity Editor via ArtClaw MCP, (2) determine which Unity sub-skill to load for a task, (3) get project and environment context (Unity version, project path, connection status), (4) understand the run_unity_python execution model and C# code format. NOT for: direct Unity operations — load the specific skill (unity-scene-ops, unity-gameobject-ops, unity-asset-ops, unity-component-ops, unity-editor-control) for actual operations.
| name | artclaw-tool-executor |
| description | ArtClaw Tool Executor - 执行 ArtClaw Tool Manager 中的工具。当用户请求运行工具时,根据工具类型选择正确的执行方式。 |
| metadata | {"artclaw":{"version":"1.0.0","author":"ArtClaw","target-dccs":[],"source":"official"}} |
当用户在 ArtClaw Tool Manager 中点击「运行」或发送 /run tool:{id} 时激活。
消息包含以下任一特征:
请帮我运行工具 + [当前正在配置 Tool: ...]/run tool:{id}先通过 Tool Manager API 获取工具信息:
import requests, json
resp = requests.get("http://localhost:9876/api/v1/tools/{tool_id_url_encoded}")
tool = resp.json()["data"]
manifest = tool["manifest"]
impl_type = manifest["implementation"]["type"] # script / skill_wrapper / composite
target_dccs = manifest.get("targetDCCs", [])
agent_hint = manifest.get("agentHint", "")
每个工具的 manifest.json 定义了完整的执行契约,Agent 必须遵循:
string/number/boolean/select/image/object/arrayoptions 列表范围内min/max 范围如果 manifest 中有 agentHint 字段,优先遵循其指引。它可能包含:
如果 manifest 有 defaultFilters,工具执行范围受此约束:
path[].pattern 定义了文件路径 glob 规则(支持 $project_root 等变量)Manifest 中的 triggers 定义自动触发场景,Agent 不需要手动处理(由 Trigger Engine 管理),但应了解工具的触发上下文以便在对话中解释。
| 条件 | 执行方式 |
|---|---|
impl_type == "script" 且 targetDCCs 为空或仅含 "general" | 调用 execute API(本地执行) |
impl_type == "script" 且 targetDCCs 含真实 DCC | 调用 execute API(DCC 执行) |
impl_type == "skill_wrapper" | 在对话中引导:读取被包装的 Skill,按 Skill 指引操作 |
impl_type == "composite" | 在对话中引导:按管线顺序执行各子工具 |
当 Agent 需要直接在 DCC 中执行代码时(如 skill_wrapper 执行),必须使用正确的 MCP tool name:
| DCC | MCP Tool Name |
|---|---|
ue5 | run_ue_python(⚠️ 不是 run_python!) |
| 其他所有 DCC | run_python |
import requests, json, urllib.parse
tool_id = "official/artclaw-skill-compliance-checker" # 示例
encoded_id = urllib.parse.quote(tool_id, safe="")
params = {"key": "value"} # 用户填写的参数
resp = requests.post(
f"http://localhost:9876/api/v1/tools/{encoded_id}/execute",
json={"parameters": params},
timeout=120
)
result = resp.json()
用 exec 工具执行(Agent 没有 requests 时的替代方案):
curl -s -X POST "http://localhost:9876/api/v1/tools/{encoded_id}/execute" \
-H "Content-Type: application/json" \
-d '{"parameters": {}}'
Execute API 返回格式:
{
"success": true,
"data": {
"action": "executed",
"exit_code": 0,
"stdout": "...",
"stderr": "...",
"success": true
}
}
exit_code == 0 且 success == true:执行成功,向用户展示 stdout 结果exit_code != 0:执行失败,展示 stderr 错误信息当消息中包含 <!--artclaw:params {...}--> 格式时:
当前参数值 作为实际参数调用 API<!--artclaw:params {...}--> 回填,不要执行如果 manifest 中有 agentHint 字段,优先遵循其指引。它可能包含:
AI 在调用工具 Execute API 前,应按以下规则预处理参数:
| DCC | 正确格式 | 示例 | 常见错误 |
|---|---|---|---|
| UE | /Game/路径/资产名(不含 .uasset) | /Game/Props/SM_Chair | D:\Project\Content\Props\SM_Chair.uasset |
| Blender | 对象 name(唯一标识) | Cube.001 | bpy.data.objects["Cube"] |
| Maya | DAG 路径或短名 | |group1|pCube1 | — |
AI 应做的事:
/Game/... 格式(去掉 Content/ 前缀和 .uasset 后缀).ObjectName 后缀(如 /Game/.../MI_Foo.MI_Foo)→ 去掉 .ObjectName| 场景 | AI 应做的事 |
|---|---|
| 用户用换行分隔多个路径 | 转换为逗号分隔 |
| 用户说"选中的 XX" | 告知工具会自动读取选中对象,无需手动填路径 |
| 用户说"文件夹下所有 XX" | 如工具不支持目录扫描,提示先选中资产或列出路径 |
| 场景 | AI 应做的事 |
|---|---|
| number 参数但用户给文字 | 转换(如 "一千" → 1000) |
| boolean 参数但用户说 "是/否" | 转换为 true/false |
| select 参数但用户值不在 options 里 | 列出可选项供选择 |
| manifest 特征 | 策略 |
|---|---|
| 有路径参数且 description 含"逗号分隔" | 工具自带批处理 → 一次传入多个 |
| 路径参数不支持多值 | AI 需循环调用 → 每次传一个 |
defaultFilters.typeFilter.source == "selection" | 提示用户先选中目标 |
defaultFilters.typeFilter.source == "parameter" | 必须手动传入路径 |
// ✅ 工具自带批处理(参数支持逗号分隔)
{
"id": "mesh_paths",
"description": "Mesh 资产路径,多个用逗号分隔",
"type": "string"
}
// → AI 一次传入所有路径
// ❌ 工具不支持批处理(单路径参数)
{
"id": "material_instance_path",
"description": "材质实例 UE 路径",
"type": "string"
}
// → AI 如需处理多个,循环调用
| 字段 | 含义 | AI 应展示 |
|---|---|---|
success: true + message | 成功 | 展示 message |
success: true + data | 成功 | 格式化 data 中关键信息 |
success: false + error | 失败 | 展示 error + 建议修复方案 |
dry_run: true | 预演模式 | 展示 report,告知未实际执行 |
modified_assets: [...] | 已修改资产列表 | 提醒用户保存 |
| error | 含义 | AI 建议 |
|---|---|---|
NO_INPUT | 未指定目标且无选中 | "请在 Content Browser 中选中要处理的资产" |
DCC_NOT_CONNECTED | DCC 未连接 | "请先打开 UE/Maya 并启动 ArtClaw Bridge 插件" |
EXECUTION_TIMEOUT | 超时 | "处理数据量可能过大,建议减少处理数量" |
MISSING_INPUT | 必填参数缺失 | 列出缺失参数名 |
AI 在调用 Execute API 前应完成:
required=true 参数有值select 类型参数值在 options 范围内number 类型参数值在 min/max 范围内agentHint,已阅读并遵循dry_run 参数已确认(首次建议 true 预览)| 错误 | 原因 | 解决 |
|---|---|---|
DCC_NOT_CONNECTED | 工具需要 DCC 但未连接 | 提示用户启动对应 DCC |
ENTRY_NOT_FOUND | 脚本文件缺失 | 检查 tool_path 目录 |
EXECUTION_TIMEOUT | 脚本超时(120s) | 建议用户检查脚本逻辑 |
TOOL_NOT_FOUND | tool_id 错误 | 检查 URL 编码是否正确 |
openclaw skills check — 用 Tool Manager API