一键导入
oc-session
Load and save conversation session state. Use internally when processing messages to maintain context across the chat. Do NOT invoke directly.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Load and save conversation session state. Use internally when processing messages to maintain context across the chat. 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-session |
| description | Load and save conversation session state. Use internally when processing messages to maintain context across the chat. Do NOT invoke directly. |
| user-invocable | false |
| allowed-tools | Read Write Bash(python*) |
Manages conversation state so Claude Code maintains context across messages received through the web chat queue.
Session state is stored at: $PROJECT_ROOT/data/sessions/conversation.json
{
"last_updated": 1700000000.0,
"message_count": 42,
"summary": "User is working on a Python data pipeline. Recently asked about pandas performance.",
"recent_messages": [
{"role": "user", "content": "...", "timestamp": 1700000000.0},
{"role": "assistant", "content": "...", "timestamp": 1700000001.0}
],
"user_preferences": {},
"active_tasks": [],
"pending_approvals": []
}
Read data/sessions/conversation.json. If it doesn't exist, start fresh.
After processing each message:
recent_messagesrecent_messages (sliding window)summary if the conversation topic shifted — this summary survives the windowlast_updated timestampThe summary field is your long-term memory. Update it when:
Keep the summary under 500 characters. Focus on: what the user is working on, key decisions made, and stated preferences.
Track ongoing work the user mentioned:
{"task": "fix the login bug", "status": "in_progress", "created": 1700000000.0}
Track operations waiting for user approval:
{"id": "abc123", "action": "bash", "command": "rm -rf old/", "requested": 1700000000.0}
For workflow chain approvals, the object also includes workflow_id, workflow_name, step, and total_steps. See /oc-approve for details.
Multi-step approval chains are tracked in a separate file: data/sessions/workflows.json. This file persists across crashes and restarts. See /oc-approve for the full schema and lifecycle. The session's pending_approvals list handles individual step approvals; workflows.json tracks the overall chain state.