/openmatrix:om:resumefrom openmatrix
Resumes interrupted task execution by auto-detecting session or state files and continuing from the last checkpoint.
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:debug |
| 查看状态 | /om:status |
| 用户消息 | 判断 | 结果 |
|---|---|---|
| "恢复执行" | 恢复意图 | 触发 ✓ |
| "继续刚才的任务" | 继续意图 | 触发 ✓ |
| "中断了怎么恢复" | 恢复意图 | 触发 ✓ |
| "开始新功能" | 开发意图 | /om:start |
| "为什么卡住了" | 调查意图 | /om:debug |
本 skill 是恢复流程,不调用 /om:start 或 /om:auto 完整流程。
智能恢复中断的任务执行:自动检测轻量流程或完整流程,继续执行剩余任务。# 优先检查轻量流程(根目录)
ls -la .openmatrix/feature-session.json 2>/dev/null && echo "FEATURE_SESSION" || \
# 检查完整流程(需要先获取 runId)
(cat .openmatrix/current.json 2>/dev/null && ls -la .openmatrix/*/. 2>/dev/null | head -1 && echo "STATE_JSON") || \
echo "NOT_FOUND"
| 检查结果 | 处理 |
|---|---|
FEATURE_SESSION | 执行轻量流程恢复(Step 2A) |
STATE_JSON | 执行完整流程恢复(Step 2B) |
NOT_FOUND | 提示"未找到持久化文件,请使用 /om:feature 或 /om:start 重新开始"并退出 |
cat .openmatrix/feature-session.json
解析以下信息:
sessionId - 会话 IDstatus - 当前状态(running/paused/failed)tasks - 任务列表currentTaskIndex - 当前任务索引quality - 质量等级failureCount - 各任务失败次数统计同时读取:
.openmatrix/feature-context.md - 项目上下文.openmatrix/feature-progress.md - Agent 执行进度TodoWrite({
todos: tasks.map((task, index) => ({
activeForm: `正在执行 ${task.content}`,
content: task.content,
status: index < currentTaskIndex ? "completed" :
index === currentTaskIndex ? "in_progress" : "pending"
}))
})
🔄 恢复轻量会话:${sessionId}
📊 当前状态:
- 质量等级:${quality}
- 已完成任务:${completedCount}/${totalCount}
- 当前任务:${currentTask.content}
- 失败次数:${failureCount[currentTaskIndex] || 0}
📝 已完成的决策(来自 feature-progress.md):
${显示前序任务的关键决策}
从 currentTaskIndex 位置继续:
如果当前任务是 in_progress 状态(之前失败):
AskUserQuestion: header: "继续方式", multiSelect: false
question: 当前任务之前验证失败,如何继续?
| label | description |
|---|---|
重试当前任务 | 重新执行当前任务块 |
跳过当前任务 | 标记为完成,继续下一任务(风险较高) |
重新拆分 | 返回 /om:feature 重新规划 |
如果当前任务是 pending 状态(正常恢复):
调用 Agent 执行:
Agent({
subagent_type: "general-purpose",
description: currentTask.content,
prompt: `你是实现专家。执行以下任务块。
## 项目上下文(请读取文件)
请先读取 .openmatrix/feature-context.md 了解项目上下文。
## 前序任务结果(请读取文件)
请读取 .openmatrix/feature-progress.md 了解前序 Agent 的决策和发现。
## 当前任务
- 任务名称:${currentTask.content}
- 预估文件:${currentTask.files}
- 质量等级:${quality}
## 质量要求
${quality === 'strict' ? `
- 必须使用 TDD:先写测试,再写实现
- 测试覆盖率要求:>80%
- 必须通过严格 Lint
- 必须通过安全扫描
` : quality === 'balanced' ? `
- 测试覆盖率要求:>60%
- 必须通过 Lint
- 必须通过安全扫描
` : `
- 无质量门禁要求
`}
## 禁止行为
❌ 执行 git commit(由主流程处理)
❌ 执行 git checkout/merge/pull/push/rebase/branch
❌ 修改与当前任务无关的文件
✅ 允许:git status, git diff, git log`,
run_in_background: false
})
| 质量等级 | 验证命令 |
|---|---|
strict | npm test -- --run && npm run lint && npm audit --audit-level=moderate |
balanced | npm test -- --run && npm run lint && npm audit --audit-level=moderate |
fast | 跳过验证 |
验证失败处理:
failureCount/om:resume验证通过后提交并更新 currentTaskIndex。
# 获取当前 runId
cat .openmatrix/current.json 2>/dev/null
# 读取对应目录的 state.json
cat .openmatrix/${runId}/state.json
🔄 可恢复任务
[1] TASK-001: 任务名称 (中断)
[2] TASK-003: 任务名称 (重试队列, 已重试2次)
[3] TASK-005: 任务名称 (失败: 错误信息)
选择要恢复的任务 [1-3] 或 [A] 全部: _
调用 CLI 恢复执行: openmatrix resume {taskId}
CLI 会从上次暂停点继续。
如果提供任务ID,直接恢复指定任务。 如果无参数,自动检测数据源并列出可恢复任务供选择。
| 优先级 | 数据源 | 来源 skill |
|---|---|---|
| 1 | .openmatrix/feature-session.json | /om:feature |
| 2 | .openmatrix/state.json | /om:start |
| 命令 | 用途 | 场景 |
|---|---|---|
| /om:approve | 人工决策 | plan/merge/deploy 审批, Meeting |
| /om:resume | 继续执行 | 中断、超时、失败重试 |
轻量流程:
完整流程:
同一任务失败 3 次以上:
/om:start| 文件 | 来源 | 内容 |
|---|---|---|
feature-session.json | /om:feature | 会话状态、任务列表、质量等级、失败次数 |
feature-context.md | /om:feature | 项目上下文 |
feature-progress.md | /om:feature | Agent 执行决策 |
state.json | /om:start | 全局状态、任务状态、配置 |
tasks/*.json | /om:start | 单个任务详情 |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other 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:autoUse when the user wants fully automated task execution with zero manual approvals. Triggers on AUTOMATION intent: user explicitly requests hands-free execution, wants to skip all confirmations, or needs batch processing without interruptions. Expects plan.md + tasks-input.json to already exist (generated by /om:plan). DO NOT trigger on: interactive requests, debugging, or status checks. Intent signals: user says 'fully auto', 'hands-free', 'no interruptions', 'skip approvals', or describes large batch operations./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自动检测项目可改进点并提供升级建议,用户确认后自动执行/om:debugUse when user encounters ANY technical problem and needs systematic diagnosis. Triggers on PROBLEM-EXPLORATION intent: user wants to understand WHY something failed, investigate root cause, or diagnose unexpected behavior. DO NOT trigger on: simple questions (how to do X), implementation requests (build/fix/add), or status checks. Intent signals: user seems confused about failure, asks '为什么', mentions error/issue without clear solution, wants to investigate before fixing./om:deployUse for deployment, publishing, environment setup, or creating deployment scripts. Triggers on DEPLOYMENT intent: deploy to server, Docker/K8s config, publish npm package, or generate deployment scripts. DO NOT trigger on: development tasks, debugging, or status checks.Generated from the plugin's indexed repository (bigfish1913/openmatrix) — no native marketplace selected
npx claudepluginhub p/bigfish1913-openmatrix