✳ClaudeModsClaude Code mod directory
☰
● 0 online · Views 0 times
+ Submit a project
← Back to projects
Reddit posts · Development & debugging / Tools & integrations / Workflows & CI

Claude Code Xcode Build Error Extraction mod

An extension developed by the author for Claude Code's new mod system: replaces truncated logs by extracting compiler errors from the middle of failed xcodebuild logs, letting Claude read the error file, line, and column directly.

GGary_BBGames@Gary_BBGames
Translated

About this mod

This mod targets a pain point when Claude Code invokes xcodebuild: when Bash command output is too long, Claude Code only passes the beginning and end to the model, cutting off the middle, and failed xcodebuild conveniently places compilation errors in the middle. In the author's test, a Swift package with only three compilation errors produced a 295-line log; Claude received 10,039 characters but not a single error message, only knowing which files failed and not why, and had to grep the source and re-filter build output itself. The mod appends -resultBundlePath to the xcodebuild command, then uses xcresulttool to read errors, warnings, and test failures from Xcode's result bundle, replacing what Claude reads with a summary—in the same test it dropped to 499 characters and included the file, line, and column of every error; the transcript still retains the raw output. There is also a panel that displays errors, failed tests, warnings, and recent builds grouped by file. Limitations: it does not reduce the number of builds needed to fix issues (three in the test), but it saves digging through logs and searching; it can only see builds Claude runs via Bash, not builds inside scripts, make, or fastlane; swift build can only be read from logs. Source code and installation instructions are on GitHub (MIT).

Installation

Check the author's README for the marketplace and plugin name first. Commands may change as the repository evolves.

参见 https://github.com/griches/claude-xcode-mod 的安装说明
Original text / 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]

View original source ↗

Similar projects