一键导入
hook-routing-worker
Hook enhancements — updatedInput for bash safety prefixes, suppressOutput for verbose blocks, denial-based routing feedback
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Hook enhancements — updatedInput for bash safety prefixes, suppressOutput for verbose blocks, denial-based routing feedback
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Agent frontmatter enhancements — disallowedTools, mcpServers scoping, fork_eligible field
Context management — pre-compact persistence, threshold alignment, microcompact/circuit breaker detection
Hook system optimization — async conversion, consolidation, deduplication, new hook events
Memory index discipline — cap enforcement, pruning, archival, health reporting
Prompt assembler optimization — sorting, memoization, cache-break detection, integration tests
Compresses and merges CLAUDE.md and rules files to fit under the 40K character cap
| name | hook-routing-worker |
| description | Hook enhancements — updatedInput for bash safety prefixes, suppressOutput for verbose blocks, denial-based routing feedback |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Features that add hook input/output capabilities (updatedInput, suppressOutput), enhance denial-based routing feedback, or integrate hooks with the routing system.
Read the feature description carefully. Understand the hook protocol fields being added and how they integrate with the routing system.
Read source files. Before modifying:
.claude/lib/routing/denial-feedback-reader.cjs for denial feedback patternsAGENTS.md for CC dangerous patterns referenceWrite tests first (red). Create test file at tests/hooks/<descriptive-name>.test.cjs. Tests must cover:
Implement changes.
updatedInput: Return in hookSpecificOutput when the hook modifies the command (e.g., prepending safety prefixes). Must not appear when no modification needed.suppressOutput: Return true when verbose block messages should not inflate context. Only on block events, never on allow.getDenialFeedback() from denial-feedback-reader.cjs. Handle missing/corrupted log gracefully..claude/lib/routing/.Run tests (green). All tests pass.
Run lint.
pnpm lint
npx prettier --check <modified-files>
{
"salientSummary": "bash-command-validator now returns updatedInput.command with safety prefix for multi-line scripts. suppressOutput:true on blocks. 22 tests.",
"whatWasImplemented": "updatedInput logic: detect multi-line commands missing set -e, prepend set -euo pipefail. suppressOutput:true on exit-2 blocks only. Denial feedback integration tested with seeded logs.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{ "command": "node --test tests/hooks/bash-updated-input.test.cjs", "exitCode": 0, "observation": "22 tests passing" },
{ "command": "pnpm lint", "exitCode": 0, "observation": "0 errors" }
]
}
}