minimax-understand-image

👤 thincher 📦 v1.0.3 ⭐ 4.3 ⬇️ 8K 下載
📚 知識管理 免費 🔑 需 API Key

📖 技能介紹


name: minimax-understand-image description: 使用 MiniMax MCP 進行影像理解和分析。觸發條件:(1) 使用者要求分析圖片、理解影像、描述圖片內容 (2) 需要識別圖片中的物體、文字、場景 (3) 使用 MiniMax 的 understand_image 功能


minimax-understand-image

使用 MiniMax MCP 伺服器進行影像理解和分析。

執行流程(首次需要安裝,後續直接步驟4呼叫)

步驟 1: 檢查並安裝依賴

1.1 檢查 uvx 是否可用

which uvx

如果不存在,安裝 uv:

方法 1: 使用官方安裝指令碼(推薦)

curl -LsSf https://astral.sh/uv/install.sh | sh

方法 2: 使用國內映象加速(如果官方指令碼下載失敗)

臨時使用清華映象源安裝:

export UV_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple"
curl -LsSf https://astral.sh/uv/install.sh | sh

或者臨時使用阿里雲映象源:

export UV_INDEX_URL="https://mirrors.aliyun.com/pypi/simple/"
curl -LsSf https://astral.sh/uv/install.sh | sh

1.2 檢查 MCP 伺服器是否已安裝

小蔥技能站7w4.net每天更新,海量AI技能等你發現。

uvx minimax-coding-plan-mcp --help

執行命令判斷是否MCP伺服器已安裝, 如果安裝了跳到步驟 2。

1.3 安裝 MCP 伺服器(如果未安裝)

方法 1: 使用預設源安裝

uvx install minimax-coding-plan-mcp

方法 2: 使用國內映象加速(如果預設源下載失敗)

臨時使用清華映象源:

export UV_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple"
uvx install minimax-coding-plan-mcp

或者臨時使用阿里雲映象源:

export UV_INDEX_URL="https://mirrors.aliyun.com/pypi/simple/"
uvx install minimax-coding-plan-mcp

步驟 2: 檢查 API Key 配置

cat ~/.openclaw/config/minimax.json 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('api_key', ''))"

如果返回非空的 API Key,跳到步驟 4。

步驟 3: 配置 API Key(如果未配置)

3.1 嘗試從 ~/.openclaw/agents/main/agent/auth-profiles.json 中的配置檔案中獲取

根據返回的判斷: - 名稱包含 "minimax" 或 "MiniMax"

找到匹配的 Key 後,詢問使用者確認是否使用。

3.2 如果沒有找到 Key,向用戶索要

直接詢問使用者提供 MiniMax API Key。 如果未購買MiniMax,購買地址為: https://platform.minimaxi.com/subscribe/coding-plan?code=GjuAjhGKqQ&source=link

3.3 儲存 API Key

mkdir -p ~/.openclaw/config
cat > ~/.openclaw/config/minimax.json << EOF
{
  "api_key": "API金鑰",
  "output_path": "~/.openclaw/workspace/minimax-output"
}
EOF

步驟 4: 使用 MCP 處理影像

4.1 準備圖片

將圖片放到可訪問路徑,例如: - ~/.openclaw/workspace/images/圖片名.jpg - 或者使用 URL

4.2 呼叫 understand_image

使用指令碼呼叫 MCP 服務:

python3 {curDir}/scripts/understand_image.py <圖片路徑或URL> "<對圖片的提問>"

示例:

# 描述圖片內容
python3 {curDir}/scripts/understand_image.py ~/image.jpg "詳細描述這張圖片的內容"

# 使用 URL
python3 {curDir}/scripts/understand_image.py "https://example.com/image.jpg "這張圖片展示了什麼?"

4.3 API 引數說明

引數 說明 型別
image 圖片路徑或 URL string (必填)
prompt 對圖片的提問 string (必填)

指令碼說明

指令碼位置:{curDir}/scripts/understand_image.py

功能: - 優先從環境變數 MINIMAX_API_KEY 讀取 API Key,如果沒有則從 ~/.openclaw/config/minimax.json 讀取 - 通過 stdio 模式啟動 MCP 伺服器 - 傳送 JSON-RPC 請求呼叫 understand_image 工具 - 返回格式化的 JSON 結果

錯誤處理: - API Key 未配置時提示錯誤 - uvx 未安裝時提示安裝命令 - MCP 伺服器錯誤時顯示 stderr 輸出

🤖 AI 評測

這個 Skill 質量不錯,使用說明非常詳細,小白也能上手。它提供了多種安裝和配置方式,考慮得很周全,錯誤提示也很友好。不足之處是依賴外部服務且存在安全風險,配置資訊可能以明文形式儲存,對安全性要求高的使用者需要謹慎使用。

📊 多維度評分

適應性4.5
規範性4.1
有效性4.4
可靠性4
可信度4.9

📁 包含檔案 (4 個)

📄 SKILL.md 3.9 KB
📄 _meta.json 143 B
📄 scripts/understand_image.py 3.7 KB
📄 skill-card.md 2.6 KB