Blackbox
將編碼任務委託給 Blackbox AI CLI 代理。這是一個多模型代理,內置評判器(judge),可通過多個大語言模型(LLM)運行任務並選擇最佳結果。需要安裝 blackbox CLI 並擁有 Blackbox AI API 密鑰。
技能元數據
| 來源 | 可選 — 使用 hermes skills install official/autonomous-ai-agents/blackbox 安裝 |
| 路徑 | optional-skills/autonomous-ai-agents/blackbox |
| 版本 | 1.0.0 |
| 作者 | Hermes Agent (Nous Research) |
| 許可證 | MIT |
| 標籤 | Coding-Agent, Blackbox, Multi-Agent, Judge, Multi-Model |
| 相關技能 | claude-code, codex, hermes-agent |
參考:完整 SKILL.md
信息
以下是 Hermes 在觸發此技能時加載的完整技能定義。這是技能激活時代理所看到的指令。
Blackbox CLI
通過 Hermes 終端將編碼任務委託給 Blackbox AI。Blackbox 是一個多模型編碼代理 CLI,它將任務分發給多個 LLM(Claude、Codex、Gemini、Blackbox Pro),並使用評判器選擇最佳實現方案。
該 CLI 是開源的(GPL-3.0,TypeScript,fork 自 Gemini CLI),支持交互式會話、非交互式一次性任務、檢查點(checkpointing)、MCP 以及視覺模型切換。
前提條件
- 已安裝 Node.js 20+
- 已安裝 Blackbox CLI:
npm install -g @blackboxai/cli - 或從源碼安裝:
git clone https://github.com/blackboxaicode/cli.git
cd cli && npm install && npm install -g . - 來自 app.blackbox.ai/dashboard 的 API 密鑰
- 已完成配置:運行
blackbox configure並輸入你的 API 密鑰 - 在終端調用中使用
pty=true— Blackbox CLI 是一個交互式終端應用
一次性任務 (One-Shot Tasks)
terminal(command="blackbox --prompt 'Add JWT authentication with refresh tokens to the Express API'", workdir="/path/to/project", pty=true)
用於快速臨時工作:
terminal(command="cd $(mktemp -d) && git init && blackbox --prompt 'Build a REST API for todos with SQLite'", pty=true)
後臺模式(長時間任務)
對於需要數分鐘的任務,請使用後臺模式以便監控進度:
# Start in background with PTY
terminal(command="blackbox --prompt 'Refactor the auth module to use OAuth 2.0'", workdir="~/project", background=true, pty=true)
# Returns session_id
# Monitor progress
process(action="poll", session_id="<id>")
process(action="log", session_id="<id>")
# Send input if Blackbox asks a question
process(action="submit", session_id="<id>", data="yes")
# Kill if needed
process(action="kill", session_id="<id>")
檢查點與恢復
Blackbox CLI 內置了對暫停和恢復任務的檢查點支持:
# After a task completes, Blackbox shows a checkpoint tag
# Resume with a follow-up task:
terminal(command="blackbox --resume-checkpoint 'task-abc123-2026-03-06' --prompt 'Now add rate limiting to the endpoints'", workdir="~/project", pty=true)
會話命令
在交互式會話期間,使用以下命令:
| 命令 | 效果 |
|---|---|
/compress | 壓縮對話歷史以節省 token |
/clear | 清除歷史並重新開始 |
/stats | 查看當前 token 使用情況 |
Ctrl+C | 取消當前操作 |
PR 審查
克隆到臨時目錄以避免修改工作樹:
terminal(command="REVIEW=$(mktemp -d) && git clone https://github.com/user/repo.git $REVIEW && cd $REVIEW && gh pr checkout 42 && blackbox --prompt 'Review this PR against main. Check for bugs, security issues, and code quality.'", pty=true)
並行工作
為獨立任務啟動多個 Blackbox 實例:
terminal(command="blackbox --prompt 'Fix the login bug'", workdir="/tmp/issue-1", background=true, pty=true)
terminal(command="blackbox --prompt 'Add unit tests for auth'", workdir="/tmp/issue-2", background=true, pty=true)
# Monitor all
process(action="list")
多模型模式
Blackbox 的獨特功能是通過多個模型運行同一任務並評判結果。通過 blackbox configure 配置要使用的模型 — 選擇多個提供商以啟用主席/評判器工作流,其中 CLI 會評估不同模型的輸出並選擇最佳的一個。
關鍵標誌 (Flags)
| 標誌 | 效果 |
|---|---|
--prompt "task" | 非交互式一次性執行 |
--resume-checkpoint "tag" | 從保存的檢查點恢復 |
--yolo | 自動批准所有操作和模型切換 |
blackbox session | 啟動交互式聊天會話 |
blackbox configure | 更改設置、提供商、模型 |
blackbox info | 顯示系統信息 |
視覺支持
Blackbox 會自動檢測輸入中的圖像,並可切換到多模態分析。VLM 模式:
"once"— 僅針對當前查詢切換模型"session"— 在整個會話期間切換"persist"— 保持在當前模型(不切換)
Token 限制
通過 .blackboxcli/settings.json 控制 token 使用量:
{
"sessionTokenLimit": 32000
}
規則
- 始終使用
pty=true— Blackbox CLI 是一個交互式終端應用,如果沒有 PTY 將會掛起 - 使用
workdir— 讓代理專注於正確的目錄 - 長時間任務使用後臺模式 — 使用
background=true並通過process工具監控 - 不要干擾 — 使用
poll/log監控,不要因為會話速度慢而終止它們 - 報告結果 — 完成後,檢查更改內容並向用戶總結
- 積分需付費 — Blackbox 使用基於積分的系統;多模型模式消耗積分更快
- 檢查前提條件 — 在嘗試委託之前,驗證
blackboxCLI 是否已安裝