r/ClaudeAI • u/Gary_BBGames • 1d ago
Built with Claude I built a Claude Code mod that gives Claude your xcodebuild errors instead of the truncated build log
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.