From oh-my-agent
Manages OMA hooks pipeline: checks status, enables/disables, sets profile (strict/balanced/fast), configures native/derived events, triggers, lanes, and safety policies. Outputs status tables; persists to hooks.json.
How this command is triggered — by the user, by Claude, or both
Slash command
/oh-my-agent:hooksThe summary Claude sees in its command listing — used to decide when to auto-load this command
运行 oma 钩子管道管理器。 输入: $ARGUMENTS 协议: 1. 解析请求的操作: - `status` - `on` / `off` - `profile <strict|balanced|fast>` - `events` 2. 管理原生事件触发器: - `session-start` - `stage-transition` - `pre-verify` - `post-verify` - `checkpoint-save` - `blocker-raised` - `session-stop` 3. 管理派生信号(可选、状态驱动): - `context-drift` - `risk-spike` - `loop-stall` - `token-burst` - `blocker-repeat` 4. 构建确定性执行通道: - `P0-safety`(权限/风险护栏) - `P1-quality`(测试/文档/验收检查) - `P2-optimization`(上下文压缩/性能提示) 5. 强制执行效率控制: - 每个事件的幂等键 - 重复触发器的去抖动窗口 - 每个通道的超时预算 - 重复失败后的冷却 6. 强制执行...
运行 oma 钩子管道管理器。
输入: $ARGUMENTS
协议:
statuson / offprofile <strict|balanced|fast>eventssession-startstage-transitionpre-verifypost-verifycheckpoint-saveblocker-raisedsession-stopcontext-driftrisk-spikeloop-stalltoken-burstblocker-repeatP0-safety(权限/风险护栏)P1-quality(测试/文档/验收检查)P2-optimization(上下文压缩/性能提示).oma/state/hooks.json。建议的 hooks.json 格式:
{
"enabled": true,
"profile": "balanced",
"native_events": ["session-start", "stage-transition", "pre-verify", "post-verify", "checkpoint-save", "blocker-raised", "session-stop"],
"derived_signals": {
"context-drift": true,
"risk-spike": true,
"loop-stall": true,
"token-burst": false,
"blocker-repeat": true
},
"lanes": {
"P0-safety": { "timeout_ms": 400, "debounce_ms": 0 },
"P1-quality": { "timeout_ms": 800, "debounce_ms": 200 },
"P2-optimization": { "timeout_ms": 600, "debounce_ms": 500 }
},
"team_safety": {
"disable_side_effects_for_worker_sessions": true
},
"updated_at": "",
"source": "oma:hooks"
}
输出格式:
| 通道 | 目的 | 超时 | 去抖动 |
|---|
| 触发器 | 已启用 | 通道 | 说明 |
|---|
npx claudepluginhub sswym/oh-my-agent --plugin oh-my-agent/os-hooksManages AI Team OS hooks in Claude Code projects — view status, install configuration via CLI, or remove with confirmation. Displays event lists and verification.
/add-hookAdds or updates hooks.json with a new hook configuration for automated plugin behavior at lifecycle events like PreToolUse or SessionStart. Requires event type; optional matcher and --plugin.
/create-hookScaffolds, debugs, validates, and analyzes Claude Code hooks with built-in templates and conflict detection.
/hookify-helpDisplays Hookify system overview covering event types (bash, file, stop, prompt, all), rule file format, commands (/hookify, /hookify-list, /hookify-configure), and regex pattern tips.
/create-hookCreates new hooks via structured workflow: Iron Law tests first, brainstorm, security design, scaffold, validate. Supports --skip-brainstorm, --plugin, --event flags.
/new-hookCreates and configures Claude Code hooks from a natural language description, setting up events, matchers, and shell commands for workflow automation, notifications, formatting, and behavior control.