✳ClaudeModsClaude Code mod ディレクトリ
☰
● 0 人がオンライン ・閲覧 0 回
+ 作品を投稿
← 作品一覧へ
Reddit の投稿 · 開発・デバッグ / ツール・連携 / ワークフロー・CI

Claude Code Xcode ビルドエラー抽出 mod

作者が Claude Code の新しい mod システム向けに開発した拡張機能:xcodebuild の失敗ログ中央にあるコンパイラエラーを抽出し、切り詰められたログの代わりにすることで、Claude がエラーのファイル、行、列を直接読めるようにする。

GGary_BBGames@Gary_BBGames
翻訳済み

この mod について

この mod は、Claude Code が xcodebuild を呼び出す際の痛点に対処する:Bash コマンドの出力が長すぎると、Claude Code は先頭と末尾だけをモデルに渡し、中央部分を切り捨てるが、失敗した xcodebuild はちょうどコンパイルエラーを中央に置く。作者のテストでは、コンパイルエラーが3つだけの Swift パッケージのログが295行に達し、Claude は10,039文字を受け取ったがエラーメッセージは1つもなく、どのファイルが失敗したかだけを知り、理由はわからず、自分でソースを grep し、ビルド出力を再フィルタリングするしかなかった。mod の方法は、xcodebuild コマンドに -resultBundlePath を付加し、次に xcresulttool を使って Xcode の result bundle からエラー、警告、テスト失敗を読み取り、Claude が読む内容を要約で置き換える——同じテストでは499文字に減り、各エラーのファイル、行、列が含まれる;transcript は生の出力を保持したまま。また、エラー、失敗テスト、警告、最近のビルドをファイルごとにグループ化して表示するパネルもある。限界:修正に必要なビルド回数を減らすものではない(テストではいずれも3回)が、ログをめくって検索する手間は省ける;Claude が Bash 経由で実行したビルドしか見えず、スクリプト、make、fastlane 内のビルドは見えない;swift build はログからしか読み取れない。ソースコードとインストール手順は GitHub(MIT)にある。

インストール

まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。

参见 https://github.com/griches/claude-xcode-mod 的安装说明
原文 / README

I built a mod for Claude Code with the new mod system. It's for anyone who lets Claude run xcodebuild. When a Bash command fails with long output, Claude Code gives the model the start and the end and cuts out the middle. A failing xcodebuild puts the compiler errors in the middle. On a small Swift package with three compile errors, the log was 295 lines and Claude received 10,039 characters, none of them an error message. It knew which files failed but not why, so it grepped the source and re-ran the build through its own filter. What the mod does: Appends -resultBundlePath to the xcodebuild command and reads errors, warnings and test failures from Xcode's result bundle with xcresulttool. Replaces what Claude reads with a summary: in the same test, 499 characters with every reported error's file, line and column. The transcript keeps the raw output. Shows a pane with errors grouped by file, failed tests, warnings and recent builds. What it doesn't do: It didn't make Claude fix the project in fewer builds in my test (three either way) but it did make you fix it more efficiently as it didn't need to go through the logs and search. It only sees builds Claude runs through Bash, not builds inside scripts, make or fastlane. swift build is read from the log only. Source, install instructions and a short GIF: https://github.com/griches/claude-xcode-mod (MIT) Happy to answer questions about the mod API, since there isn't much written about it yet. submitted by /u/Gary_BBGames [link] [comments]

元のソースを見る ↗

関連作品