一键导入
oc-router
Route and process incoming user messages from the web chat queue. Use internally when oc-poll detects new messages. Do NOT invoke directly.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Route and process incoming user messages from the web chat queue. Use internally when oc-poll detects new messages. Do NOT invoke directly.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Robust, line-based file editing. Replace a range of lines in a file with new content by line number instead of exact string matching. Use when the user says 'robust-edit', '/robust-edit', 'replace lines', 'edit lines N to M', or when character-level matching with the Edit tool keeps failing on multi-line changes or uncertain whitespace.
Review code changes for quality, security, and correctness. Use when the user says "review this PR", "review these changes", "check my code", "look at what I changed", or after implementing a feature. Produces a severity-organized report.
Diagnose and fix context window issues. Use when Claude seems confused, forgetful, slow, or the user says "context is full", "you forgot", "you're repeating yourself", "start fresh", or "why are you ignoring my instructions".
Structured git workflow for commits, branches, and PRs. Use when the user says "commit", "create a PR", "new branch", "prepare for review", "ship this", or "push my changes". Safe, conventional git operations with checkpoints.
Deep interview to reach shared understanding before building. Use when starting a complex feature, when requirements are unclear, or when the user says "grill me", "interview me", "ask me questions", "let's figure this out", or "grill me lightly" for a quick version.
Approval gate for dangerous operations. Use internally before executing destructive commands, file deletions, git pushes, or external API calls from the web chat. Do NOT invoke directly.
| name | oc-router |
| description | Route and process incoming user messages from the web chat queue. Use internally when oc-poll detects new messages. Do NOT invoke directly. |
| user-invocable | false |
| allowed-tools | Read Write Edit Bash Grep Glob WebFetch WebSearch |
You are processing an incoming message from the clawed-back web chat. Your job is to understand the user's intent, execute it, and send back a response.
cd $PROJECT_ROOT/.claude/skills/oc-poll/scripts && python queue_manager.py read
This returns JSON like:
{"id": 5, "timestamp": 1700000000.0, "type": "text", "content": "what's in report.pdf?", "metadata": "{\"attachments\": [\"abc123.pdf\"]}", "processed": 1}
If no message, stop.
Read data/sessions/conversation.json for conversation history and context.
Based on the message content, handle it appropriately:
General conversation — Respond directly using your knowledge and capabilities. You ARE Claude — answer questions, write code, analyze problems, just like a normal conversation.
File analysis — If attachments are present, resolve the file path with cd $PROJECT_ROOT/.claude/skills/oc-poll/scripts && python file_manager.py get <file_id>, then Read the file at the returned path. Legacy uploads may still be in data/uploads/.
Tool requests — If the user asks you to do something (run code, search the web, create files, etc.), do it using your available tools. For dangerous operations (deleting files, running destructive commands, pushing to git), check with the approval gate first.
Automation requests — If the user wants to schedule something ("remind me", "every hour check", "at 9am tomorrow"), use CronCreate or note it for the oc-automate skill.
Voice messages — Type will be voice. The content is already transcribed. Process the text normally.
Webhook payloads — Type will be webhook. The content is a JSON payload. Route to the appropriate handler.
Approval responses — If the user says "yes", "approve", "no", "deny" and there's a pending approval in the session, resolve it. If the approval has a workflow_id, follow the chain logic:
data/sessions/workflows.json (step → executed), then automatically queue the next step's approval. Show progress (Step N/M).workflows.json. Send: "Workflow complete — all steps approved and executed."workflows.json. Send: "Workflow cancelled at step N/M."workflow_id: Single gate — resolve as before (execute or deny, remove from pending).After handling the message, write your response to the queue:
cd $PROJECT_ROOT/.claude/skills/oc-poll/scripts && python queue_manager.py write '{"content": "<your response>", "type": "text"}'
Update data/sessions/conversation.json with the new message pair and any state changes.
cd $PROJECT_ROOT/.claude/skills/oc-poll/scripts && python queue_manager.py ack <message_id>
This marks the message as processed=2. The SSE stream automatically emits a read_receipt event — the user sees a green checkmark in the web UI. No extra work needed.
Note: queue_manager.py read (Step 1) already sets processed=1, which also triggers a read receipt. The ack confirms full processing.
data/files/YYYY/MM/DD/). Use python .claude/skills/oc-poll/scripts/file_manager.py get <file_id> to resolve paths. Legacy files may be in data/uploads/.file_manager.py store, share it with file_manager.py share, and send the markdown link in your response. See /oc-files skill for details.