feat: PreToolUse hook for CLI-first multi-tool support#17
Merged
Conversation
Like RTK's hook system, ICM now installs a PreToolUse hook that auto-allows `icm` CLI commands in Claude Code (no permission prompts). Changes: - New icm-pretool.sh: PreToolUse hook (matcher: Bash, auto-allow icm) - icm init --mode hook now installs both PreToolUse + PostToolUse hooks - Updated CLI/skill instructions to prefer CLI over MCP - Enhanced CLAUDE.md template with full command reference This makes ICM CLI-first: works with all AI tools (claude, codex, gemini, vibe, opencode) without requiring MCP support.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
icm-pretool.shPreToolUse hook: auto-allowsicmCLI commands in Claude Code (no permission prompts)icm init --mode hooknow installs both PreToolUse (auto-allow) + PostToolUse (auto-extract)Why
The MCP server is fragile across tools. CLI is universal — works with claude, codex, gemini, vibe, opencode, wshm, and any tool that can run bash. The PreToolUse hook makes CLI usage seamless (no permission prompts), just like RTK does for token savings.
Architecture
Test plan
icm init --mode hookinstalls both hooks in settings.jsonicmcommands auto-allowed (no permission prompt in Claude Code)