/openmatrix:om:autofrom openmatrix
Executes tasks fully automatically with zero manual approvals. Reads existing plan.md and tasks-input.json, splits tasks via CLI, then runs each subagent task. Skips all confirmations and interruptions.
Ships in openmatrix. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
AI 应根据用户语义判断意图:
| 用户意图 | 应调用 |
|---|---|
| 需要交互确认 | /om:start |
| 需要生成技术方案 | /om:plan |
| 调查问题 | /om:debug |
| 查看状态 | /om:status |
| 用户消息 | 判断 | 结果 |
|---|---|---|
| "全自动执行" | 全自动意图 | 触发 |
| "不要问我直接做" | 无中断意图 | 触发 |
| "批量重构跳过确认" | 批量自动化 | 触发 |
| "交互式执行" | 需要确认 | /om:start |
| "生成技术方案" | 方案生成 | /om:plan |
| "查看执行状态" | 状态检查 | /om:status |
Step 5 使用 Agent 工具执行子任务。
相关技能: /om:brainstorm (需求探索) | /om:plan (方案生成) | /om:start (交互式执行) | /om:status (状态查看) | /om:report (报告)
Step 1: 初始化 .openmatrix 目录
Step 2: 验证前置条件(plan.md + tasks-input.json 必须已存在)
Step 3: 调用 openmatrix start --tasks-json --mode auto ← 必须完成,不可跳过
Step 4: 从 CLI 返回结果中读取 subagentTasks 列表 ← 必须完成
Step 4.5: 质量门禁检查(调用 om:gate --checkpoint breakdown)← 自动模式:失败写入 Meeting
Step 5: 逐个执行 subagentTasks(调用 Agent 工具) ← 只有这步才能写代码
Step 5.5: 任务完成节点 gate 检查(关键任务) ← 自动模式:失败写入 Meeting
违反以下任一规则将导致任务执行失败:
执行时不要请求用户确认任何操作。
## 红旗警告 - 停止并检查这些想法意味着你在找借口:
| 想法 | 真相 |
|---|---|
| "全自动不需要检查" | 全自动更需要状态持久化 |
| "跳过 CLI 调用更快" | CLI 是唯一正确的入口 |
| "我不需要验证状态" | 上下文压缩会丢失状态 |
| "直接用 Bash 写代码" | 业务代码必须通过 Agent |
| "忘记任务顺序没关系" | 用 openmatrix step 重新获取 |
| "这个歧义不重要" | 所有歧义都写入 Meeting |
本 Skill 只做执行,不做方案生成。如果 plan.md 或 tasks-input.json 不存在,自动调用 /om:plan 生成。
检查 .openmatrix/ 目录是否存在,不存在则初始化:
openmatrix start --init-only
获取当前 runId:
cat .openmatrix/current.json 2>/dev/null || echo '{"runId":"run-default"}'
读取 .openmatrix/${runId}/state.json,如果 status === 'running',提示用户先完成或暂停。
先获取当前 runId:
cat .openmatrix/current.json 2>/dev/null || echo '{"runId":"run-default"}'
检查 plan.md 和 tasks-input.json 是否已存在(使用 runId):
cat .openmatrix/${runId}/tasks-input.json 2>/dev/null || echo "NOT_FOUND"
cat .openmatrix/${runId}/plan.md 2>/dev/null || echo "NOT_FOUND"
或通过 CLI 检查(推荐):
openmatrix status --json | jq '.files'
| 情况 | 处理方式 |
|---|---|
| 两个都存在 | 读取内容,继续 Step 3 |
| 只有 tasks-input.json | 继续执行(plan.md 可选) |
不存在,有 $ARGUMENTS | 自动调用 /om:plan 生成方案(传入参数) |
| 不存在,无参数 | 提示用户先执行 /om:plan |
注意: auto 不询问任何问题,直接执行。质量级别通过
--quality参数指定(默认 balanced)。@ 语法说明:
@tasks-input.json表示 CLI 自动从当前 runId 目录读取文件。CLI 会检测.openmatrix/current.json获取 runId,然后读取.openmatrix/{runId}/tasks-input.json。
CLI 文件读取规则:
tasks-input.json → 通过 --tasks-json @tasks-input.json 参数传递plan.md → 自动读取,无需参数(CLI 通过 stateManager.getPlan() 从 .openmatrix/{runId}/plan.md 自动加载)这是最关键的步骤。必须执行以下命令,不能跳过:
# 多 Agent 并行模式(推荐,速度快)
openmatrix start --tasks-json @tasks-input.json --quality <质量等级> --mode auto --parallel --json
# 单 Agent 串行模式(上下文连贯)
openmatrix start --tasks-json @tasks-input.json --quality <质量等级> --mode auto --single-agent --json
如果启用了 E2E 测试,加上 --e2e-tests:
openmatrix start --tasks-json @tasks-input.json --quality strict --mode auto --parallel --e2e-tests --json
此命令会:
.openmatrix/tasks/ 目录subagentTasks 列表CLI 返回的 JSON 中 subagentTasks 数组包含每个待执行任务:
{
"subagentTasks": [
{
"subagent_type": "Plan",
"description": "简短描述",
"prompt": "完整执行提示词",
"taskId": "TASK-001",
"agentType": "planner",
"timeout": 300000
}
]
}
调用 om:gate 检查任务列表与 goals 的对齐度:
Skill 工具: skill = "om:gate", args = "--checkpoint breakdown"
全自动模式 gate 处理策略:
| 对齐度评分 | 处理方式 |
|---|---|
| >= 90 | 继续执行(对齐度良好) |
| 70-89 | 记录到 Meeting + 继续执行 |
| 50-69 | 记录到 Meeting + 继续执行 |
| < 50 | 记录到 Meeting + 继续执行 |
全自动模式特点:
Meeting 记录:
openmatrix meeting --create --reason "gate检查: 任务拆分对齐度 ${score}/100, 差距: ${gaps}" --severity medium
文件持久化循环(防止上下文压缩丢失状态):
# 每个 Agent 完成后执行:
openmatrix complete TASK-XXX --success --summary "决策: xxx; 文件: xxx"
# 提交验证(防止 commit 静默失败):
git status --porcelain
# 如果有未提交文件 → 必须手动提交:
git add . && git commit -m "feat(TASK-XXX): 任务标题"
openmatrix step --json # 获取下一个任务 + 检查是否全部完成
openmatrix step 从磁盘读取真实状态,不依赖上下文记忆。
Agent 输出中可能包含歧义报告(JSON 格式):
当 Agent 输出包含以下标记时,表示检测到歧义:
<AMBIGUITY_REPORT>
{
"ambiguities": [
{
"type": "missing_info" | "conflicting_req" | "unclear_scope" | "tech_choice" | "edge_case",
"severity": "critical" | "high" | "medium" | "low",
"description": "歧义描述",
"suggestions": ["建议1", "建议2"]
}
],
"overallSeverity": "critical" | "high" | "medium" | "low"
}
</AMBIGUITY_REPORT>
在 /om:auto 全自动模式下,所有歧义写入 Meeting 继续执行,不中断流程:
| 严重程度 | 处理方式 |
|---|---|
| Critical | Meeting + 继续执行其他任务 |
| High | Meeting + 继续执行其他任务 |
| Medium | Meeting + 继续执行其他任务 |
| Low | Meeting + 继续执行其他任务 |
全自动模式特点:
Meeting 处理流程:
openmatrix meeting --create --task TASK-XXX --reason "歧义: ${description}" --severity ${overallSeverity}
openmatrix step --json
执行完成后提示用户:
检测到 N 个歧义记录,请使用 /om:meeting 统一处理
Agent({
subagent_type: task.subagent_type,
description: task.description,
prompt: task.prompt + "\n\n⚠️ 完成后请输出简短摘要(不超过3行):\n1. 关键决策\n2. 创建/修改的文件\n3. 对后续任务的建议\n\n🚫 **禁止执行以下 Git 命令**:\n- ❌ git commit — 所有提交统一通过 openmatrix complete 执行\n- ❌ git checkout — 不要切换分支\n- ❌ git merge — 不要合并其他分支\n- ❌ git pull — 不要拉取远程更新\n- ❌ git push — 不要推送代码\n- ❌ git rebase — 不要变基\n- ❌ git branch — 不要创建/删除分支\n\n✅ 允许:git status, git diff, git log",
isolation: task.isolation,
run_in_background: false
})
每个 Agent 完成后:
openmatrix complete TASK-XXX --success --summary "决策: xxx; 文件: xxx"
对于关键任务(high complexity),调用 om:gate 检查:
Skill 工具: skill = "om:gate", args = "TASK-XXX --checkpoint completion"
全自动模式 gate 处理策略:
| 对齐度评分 | 处理方式 |
|---|---|
| >= 90 | 任务完成,继续下一个任务 |
| < 90 | 记录到 Meeting + 继续下一个任务 |
全自动模式特点:
Meeting 记录:
openmatrix meeting --create --task TASK-XXX --reason "gate检查: 任务完成对齐度 ${score}/100, 差距: ${gaps}" --severity low
注意: openmatrix complete 会自动执行以下操作:
🔄 同步 Worktree 改动 - 如果 Agent 在 worktree 中工作,自动将改动同步到主工作树
📝 更新上下文 - 将执行摘要写入全局 context.md
✅ 标记完成 - 更新任务状态并触发 Git 提交
获取下一个任务(必须执行,防止上下文压缩丢失):
openmatrix step --json
返回值解析:
| status | 含义 | 后续操作 |
|---|---|---|
next | 有下一个任务 | 继续执行返回的 subagent 配置 |
done | 所有任务完成 | 进入最终提交 |
blocked | 无可执行任务 | 直接跳过,继续执行其他任务 |
中断恢复: 如果会话中断,再次执行 /om:auto 时:
openmatrix step --jsonstatus: "next" → 从返回的任务继续执行status: "done" → 所有任务已完成status: "blocked" → 有阻塞任务需要处理Agent 上下文共享机制 (Agent Memory):
每个 Agent 执行时会自动接收前序 Agent 的上下文信息(通过 context.md 文件)。
Agent-1 完成 → 写入 context.md → Agent-2 读取 Agent-1 的上下文 → 写入 context.md → ...
所有任务完成后,执行最终 Git 提交:
git add . && git commit -m "$(cat <<'EOF'
feat: 任务标题
改动点1
改动点2
影响范围: 模块名
文件改动: 文件1, 文件2
Co-Authored-By: OpenMatrix https://github.com/bigfish1913/openmatrix
EOF
)"
Git 提交格式规范(所有提交必须遵守):
<type>(TASK-XXX): 简短描述
改动点1
改动点2
影响范围: 模块名
文件改动: 文件1, 文件2
Co-Authored-By: OpenMatrix https://github.com/bigfish1913/openmatrix
type 映射: feat(新功能) / fix(修复) / test(测试) / refactor(重构) / docs(文档) 禁止使用 emoji,使用纯文本格式
$ARGUMENTS /om:auto /om:auto "实现用户登录功能" /om:auto --quality fast ## 流程定位需求 → brainstorm (澄清需求) → plan (生成方案) → auto (全自动执行) → end
auto 和 start 在同一位置,区别在于:
前置条件(同 start):
.openmatrix/{runId}/plan.md — 技术方案(由 /om:plan 生成).openmatrix/{runId}/tasks-input.json — 结构化元数据(由 /om:plan 生成)CLI 自动通过 current.json 定位当前 runId。
如果前置条件不满足,自动调用 /om:plan 生成。
Step 1: 初始化 → Step 2: 验证前置条件
→ Step 3: openmatrix start --tasks-json --mode auto (必须)
→ Step 4: 读取 subagentTasks
→ Step 5: Agent 逐个执行 (只有这里写代码)
| 级别 | TDD | 覆盖率 | Lint | 安全扫描 |
|---|---|---|---|---|
| strict | Y | >80% | Y | Y |
| balanced | N | >60% | Y | Y |
| fast | N | 无要求 | N | N |
<type>(TASK-XXX): 简短描述
改动点1 / 改动点2
影响范围: 模块名
文件改动: 文件1, 文件2
Co-Authored-By: OpenMatrix https://github.com/bigfish1913/openmatrix
type: feat/fix/test/refactor/docs。禁止 emoji。
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (bigfish1913/openmatrix) — no native marketplace selected
npx claudepluginhub p/bigfish1913-openmatrixOther plugins' skills for the same job
20 skills in this plugin
/om:approveUse when handling pending approvals including plan review, merge confirmation, deploy approval, and blocked task decisions during OpenMatrix execution. Triggers on APPROVAL intent: user wants to review and approve pending items, handle merge conflicts, or confirm deploy. DO NOT trigger on: starting tasks, debugging, or status checks. Intent signals: user mentions 'approve', 'review plan', 'confirm merge', 'approve deploy', or refers to pending approval actions./om:brainstormUse when the user wants to explore requirements, design alternatives, or validate ideas before implementation. Triggers on CLARIFICATION/DESIGN intent: user needs to clarify unclear requirements, explore multiple approaches, or design architecture before coding. DO NOT trigger on: simple implementation requests (clear path), status checks, or pure information queries. Intent signals: user says 'how should I', mentions multiple options/uncertainties, describes complex system from scratch, or task scope is ambiguous./check