Add /cc:<command> to forward Claude Code slash commands (v0.1.20)#32
Merged
Conversation
Iris's own commands use the `/` namespace (/help, /status, …), so Claude Code's own slash commands could not be invoked through Iris. Add a `/cc:` escape: a message like `/cc:mycommand arg` strips the prefix and forwards `/mycommand arg` to the session's Claude process via the existing forwardToClaude path. Custom commands and skills (.claude/commands/*.md) are expanded by Claude in stream-json mode, so they work. Built-in interactive commands (/context, /compact, …) are not available in headless mode and will not do anything — documented in /help and the usage hint. Verified in dev (DM + channel mention): `/cc:iris-cctest` ran a custom command and returned its output. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughAdds /cc: Command Forwarding
🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
概要
Iris 自身のコマンドは
/名前空間(/help/status…)を使うため、Claude Code 側のスラッシュコマンドを Iris 経由で叩けませんでした。/cc:エスケープを追加します。/cc:mycommand argのように送ると、Iris は/cc:を剥がして/mycommand argを既存のforwardToClaude経路でセッションの Claude プロセスへ転送します。仕様
.claude/commands/*.md)は stream-json モードで Claude が展開するため 動作する。/context/compact/clear/cost等)は headless モードで利用不可のため 何も起きない(/helpと usage hint に明記)。/cc:helpは Iris の/helpではなく Claude の/helpを転送)。検証
/cc:iris-cctestを送り、Claude が展開・実行してコマンド本文どおりの出力を返すことを確認。pnpm verify全通過、122 tests pass(/cc:の挙動テスト 4 件追加)。🤖 Generated with Claude Code
Summary by CodeRabbit
/cc:<command> [args]to forward custom commands directly to Claude Code./cc:<command>syntax and clarify headless limitations./cc:helphandling so it forwards correctly rather than triggering Iris’s own help flow./cc:without a command, it now returns a clear usage/help message./cc:behavior in both README.md and README.ja.md./cc:<command>forwarding and/cc:usage behavior.