让 AI Agent 在对话框中直接驱动本地 ClawHeart,执行安全审计、技能鉴定和 Agent 凭据治理。当用户提出“扫描 AI 安全”等意图时,调用 clawheart CLI。
你可以通过 clawheart 命令行调用本机 ClawHeart 服务做 AI 安全审计、技能鉴定、Agent 凭据治理。
前置:用户机器需要安装 ClawHeart CLI(
clawheart-cli或clawheart,PATH 中可执行)。 若which clawheart失败,引导用户访问 https://clawheart.live 下载,或跑curl -fsSL clawheart.live/install.sh | sh。
用户意图(关键词举例)命令"扫描安全 / AI 风险 / 检查我的配置"clawheart scan --json"看看本地的技能 / SKILL.md / Agent 装了什么"clawheart skills list --json"技能有恶意吗 / 鉴定一下技能"clawheart skills scan --all --json"我装了哪些 Agent / Claude / Codex / Cursor 在哪"clawheart agents list --json"MCP server 有哪些"clawheart agents mcp --json"我的 Provider / API key 配置"clawheart providers list --json"ClawHeart 整机状态 / 代理在跑吗"clawheart status --json"引导我设置 / 第一次用"clawheart init --json 然后状态机交互"备份技能 / 打包技能"clawheart skills backup --json
所有命令返回顶层 JSON:
json
{ "ok": true, "data": { ... } }
{ "ok": false, "error": "..." }
data 的 schema 因命令而异, 用户友好的摘要文本不在 JSON 里 —— 你需要根据 data 用自然语言重述。
clawheart scan --jsondata.results 里筛 outcome=fail 的项目id + description + detail + remediationclawheart skills scan --all --jsondata 数组中 blocked: true 或 score < 60 的技能clawheart skills backup <id> 备份后删除)clawheart agents list --jsondata 数组里每个 Agent 的 id + agent_name + config_path + mcp_servers 简洁报给用户~/.clawheart-v2/ 文件 — 必须通过 CLI若 clawheart 命令找不到:
ClawHeart CLI 似乎没装。访问 https://clawheart.live 下载,或运行:
macOS / Linux:
curl -fsSL https://clawheart.live/install.sh | shWindows:
iwr https://clawheart.live/install.ps1 -useb | iex
text
clawheart scan [--category=<C>] [--ids=<ID,...>] [--json]
clawheart skills {list,scan <id>|--all,backup [<ids>]} [--json]
clawheart agents {list,mcp [--agent=<id>],rescan} [--json]
clawheart providers {list,add,import,overwrite <id>} [--json]
clawheart status [--json]
clawheart init [--reset] [--json]
clawheart --version