ClaudePatcher: 72-command domain CLI for Minecraft mods as agent reference case
Context
I maintain an open-source tool called ClaudePatcher — a fat-jar (~14,000 lines, single-file, ASM-based) that has effectively become a CLI API through which Claude (in agent mode) patches jars, analyzes bytecode, resolves SRG obfuscation names, and validates Forge Minecraft modpacks.
72 commands total, including: ref-check, mixin-check, null-scan, tag-audit, mega-audit, lang-patch, entity-dims, scan-method, api, event-scan, accessor-audit, jar-merge, registry-trace, recompute-frames, try-wrap, checkcast-guard, inject-point-validate, rewire-call, remove-call, add-field, boxing-scan, mixin-audit, and more.
Why it's interesting for the Claude Code team
- It's a concrete, non-trivial example of an agent-friendly CLI: every command has deterministic stdout, colorized but grep-parseable output, exit codes,
--flags, and a single-file 130 KBCLAUDE.mddocumenting every command with examples. - During a real session we found and fixed 6 real bugs in it that were silently giving wrong answers to Claude: e.g.
srgcommand only searchedclient-*-srg.jar, missing private methods infmlcore-*.jar— Claude got "not found" forModLoader.dispatchAndHandleErrorwhich cost two iterations before we decompiled the Sponge MixinMixinPlatformAgentDefaultto find the real registration path was MANIFEST.MF, notmods.toml. PlusmethodExistsByNameInHierarchyBFS opaque at MC classes (~30–50 false WARN per modpack),ref-checkmissed supertype/descriptor/InvokeDynamic refs,event-scanonly readvisibleAnnotations(missed CLASS-retention Kotlin/Proguard builds),isInsideTryCatchwas O(N²) on InsnList (~3 billionindexOfcalls on a 350-mod pack). - These are the kind of subtle correctness/perf bugs that specifically hurt agent workflows — an agent can't easily tell if a tool is lying vs. really returning no hits.
Requests (low → high commitment)
- Consider linking it as a community example of "how to build an expert CLI for Claude Code / Agent SDK." Happy to write a blog post / guide.
- Consider upstream contributions / feedback on agent-CLI design patterns that emerge from it.
- Open to licensing / relocating to a more visible home if that's useful.
Not a bug — a suggestion. Happy to follow up via any channel
Follow-up to #41927 (3 weeks ago, still open)
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗