✳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 Mod that lets Claude directly read xcodebuild compilation errors

The author built a mod using the new mod system: when Claude's xcodebuild run via Bash fails, it automatically appends -resultBundlePath and uses xcresulttool to extract errors/warnings/test failures, so Claude sees

GGary_BBGames@Gary_BBGames
Translated

About this mod

This is a Claude Code mod aimed at users running xcodebuild with Claude. The problem is that when a Bash command fails and the output is long, Claude Code only gives the model the beginning and end, with the middle truncated, and a failing xcodebuild puts compilation errors exactly in the middle. The author gives an example: a small Swift package with three compilation errors, a 295-line log, Claude only received 10,039 characters and none of the error information; it knew which files failed but not why, so it could only grep the source and rerun with its own filtering.

The mod's approach is: append -resultBundlePath to the xcodebuild command, then use xcresulttool to read errors, warnings, and test failures from Xcode's result bundle; replace what Claude reads with a summary, which in the same test was 499 characters and included the file, line, and column of every reported error; the transcript still keeps the original output; it also shows a panel grouping errors, failed tests, warnings, and recent builds by file.

Limitations: in the author's tests it did not let Claude fix the project with fewer builds (both were three), but fixes were more efficient because it no longer had to search for errors. It can only see builds that Claude runs via Bash, not builds inside scripts, make, or fastlane; swift build is only read from logs. Source, installation instructions, and a short GIF are in the GitHub repo

Installation

See the original source for installation instructions.

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. 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]

View original source ↗

Similar projects