用途
omc-help 是 oh-my-claudecode(OMC)插件的使用指南,用于说明 OMC 的工作方式、魔法关键词、首次配置流程,并提供基于本地记录的用量分析与个性化改进建议。
主要能力
自动行为
使用 OMC 不需要学习任何命令,它会以自动激活的智能行为增强 Claude Code:
- 给出复杂任务时:并行化并委派给专职智能体
- 请求规划时:启动规划访谈
- 需要彻底完成时:持续执行直至验证完成
- 处理 UI/前端时:启用设计感知
- 说 "stop" 或 "cancel" 时:智能停止当前操作
魔法关键词(可选快捷方式)
可在请求中自然加入以下词以获得显式控制:
- ralph:持久模式,示例 "ralph: fix all the bugs"
- ralplan:迭代规划,示例 "ralplan this feature"
- ulw:最大并行度,示例 "ulw refactor the API"
- plan:规划访谈,示例 "plan the new endpoints"
ralph 模式已自动包含 ultrawork 的并行执行,无需再组合关键词。
停止操作
直接说 "stop"、"cancel" 或 "abort",系统会根据上下文判断要停止的内容。
首次配置
若尚未配置 OMC,执行:
/oh-my-claudecode:omc-setup
这是唯一需要知道的命令,它会下载配置并完成设置。
2.x 用户
旧命令仍然可用:/ralph、/ultrawork、/omc-plan 等与之前功能完全一致,但如今已不再必需,因为一切都是自动的。
用量分析
分析你的 oh-my-claudecode 使用情况并获取定制化改进建议(此功能取代了原先的 /oh-my-claudecode:learn-about-omc 技能)。
它会:
- 读取 ~/.omc/state/token-tracking.jsonl 的 token 跟踪数据
- 读取 .omc/state/session-history.json 的会话历史
- 分析智能体使用模式
- 识别未被充分利用的功能
- 推荐配置变更
使用方式
第一步:收集数据
# Check for token tracking data
TOKEN_FILE="$HOME/.omc/state/token-tracking.jsonl"
SESSION_FILE=".omc/state/session-history.json"
CONFIG_FILE="$HOME/.claude/.omc-config.json"
echo "Analyzing OMC Usage..."
echo ""
# Check what data is available
HAS_TOKENS=false
HAS_SESSIONS=false
HAS_CONFIG=false
if [[ -f "$TOKEN_FILE" ]]; then
HAS_TOKENS=true
TOKEN_COUNT=$(wc -l < "$TOKEN_FILE")
echo "Token records found: $TOKEN_COUNT"
fi
if [[ -f "$SESSION_FILE" ]]; then
HAS_SESSIONS=true
SESSION_COUNT=$(cat "$SESSION_FILE" | jq '.sessions | length' 2>/dev/null || echo "0")
echo "Sessions found: $SESSION_COUNT"
fi
if [[ -f "$CONFIG_FILE" ]]; then
HAS_CONFIG=true
DEFAULT_MODE=$(cat "$CONFIG_FILE" | jq -r '.defaultExecutionMode // "not set"')
echo "Default execution mode: $DEFAULT_MODE"
fi
第二步:分析智能体使用(若存在 token 数据)
if [[ "$HAS_TOKENS" == "true" ]]; then
echo ""
echo "TOP AGENTS BY USAGE:"
cat "$TOKEN_FILE" | jq -r '.agentName // "main"' | sort | uniq -c | sort -rn | head -10
echo ""
echo "MODEL DISTRIBUTION:"
cat "$TOKEN_FILE" | jq -r '.modelName' | sort | uniq -c | sort -rn
fi
第三步:生成建议
根据发现的模式输出建议,例如:
- 若 Opus 使用率高(>40%)且未使用 Sonnet:"Consider using Sonnet for routine tasks to save tokens"
- 若未使用 pipeline:"Try /pipeline for code review workflows"
- 若未使用 security-reviewer:"Use security-reviewer after auth/API changes"
- 若未设置 defaultExecutionMode:"Set defaultExecutionMode in /omc-setup for consistent behavior"
第四步:输出报告
报告包含:token 汇总(总量、按模型)、最常使用的智能体、未被充分利用的功能、个性化建议。
示例输出:
📊 Your OMC Usage Analysis
TOKEN SUMMARY:
- Total records: 1,234
- By Model: opus 45%, sonnet 40%, haiku 15%
TOP AGENTS:
1. executor (234 uses)
2. architect (89 uses)
3. explore (67 uses)
UNDERUTILIZED FEATURES:
- sonnet: 0 uses (could save ~30% on routine tasks)
- pipeline: 0 uses (great for review workflows)
RECOMMENDATIONS:
1. Set defaultExecutionMode: "sonnet" to save tokens
2. Try /pipeline review for PR reviews
3. Use explore agent before architect to save context
优雅降级
若未找到数据:
📊 Limited Usage Data Available
No token tracking found. To enable tracking:
1. Ensure ~/.omc/state/ directory exists
2. Run any OMC command to start tracking
Tip: Run /omc-setup to configure OMC properly.
适用场景
- 首次使用 OMC,需要了解其自动行为与魔法关键词
- 完成 OMC 首次配置
- 2.x 老用户确认旧命令的兼容情况
- 希望基于本地 token 与会话记录分析自身使用模式并获取改进建议
限制
- 用量分析依赖本地文件 ~/.omc/state/token-tracking.jsonl、.omc/state/session-history.json 与 ~/.claude/.omc-config.json;文件缺失时只能输出有限的降级提示
- 具体支持的模型名称、默认配置项取值等细节以实际配置与文档为准,资料未完整给出
更多帮助
- README:https://github.com/Yeachan-Heo/oh-my-claudecode
- Issues:https://github.com/Yeachan-Heo/oh-my-claudecode/issues
- 版本:4.2.3