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

Claude に xcodebuild のコンパイルエラーを直接読ませる Claude Code Mod

作者は新しい mod システムを使って mod を作った:Claude が Bash 経由で xcodebuild を実行して失敗したとき、自動的に -resultBundlePath を追加し、xcresulttool でエラー/警告/テスト失敗を抽出し、Claude が見る内容を

GGary_BBGames@Gary_BBGames
翻訳済み

この mod について

これは Claude で xcodebuild を実行するユーザー向けの Claude Code mod です。問題は、Bash コマンドが失敗し出力が長い場合、Claude Code はモデルに先頭と末尾だけを与え、中間は切り捨てられることです。そして失敗した xcodebuild はまさにコンパイルエラーを中間に置きます。作者の例:3 つのコンパイルエラーがある小さな Swift パッケージ、295 行のログで、Claude は 10,039 文字しか受け取らず、エラー情報を一切含んでいませんでした。どのファイルが失敗したかは分かっても理由は分からず、ソースを grep して独自のフィルタで再実行するしかありませんでした。

この mod の方法は:xcodebuild コマンドに -resultBundlePath を追加し、次に xcresulttool で Xcode の result bundle からエラー、警告、テスト失敗を読み取る;Claude が読む内容を要約で置き換える。同じテストでは要約は 499 文字で、報告された各エラーのファイル、行、列を含んでいた;トランスクリプトには元の出力がまだ残る;ファイルごとにエラー、失敗テスト、警告、最近のビルドをグループ化して表示するパネルも表示する。

制限:作者のテストでは、Claude がより少ないビルド回数でプロジェクトを修正することはなかった(どちらも 3 回)が、エラーを検索する必要がなくなったため修正はより効率的だった。Claude が Bash 経由で実行するビルドしか見えず、スクリプト、make、fastlane 内のビルドは見えない;swift build はログから読み取るだけ。ソース、インストール手順、短い GIF は GitHub リポジトリにある

インストール

インストール方法は元のソースをご確認ください。

原文 / 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. It: - 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. It doesn't: It didn't make Claude fix the project in fewer builds in my test (three either way) but it does make it fix the issues more efficiently as it doesn't need to search the errors. 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]

元のソースを見る ↗

関連作品