ClaudePatcher: 72-command domain CLI for Minecraft mods as agent reference case

Resolved 💬 1 comment Opened Apr 24, 2026 by mosquss Closed May 28, 2026

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 KB CLAUDE.md documenting 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. srg command only searched client-*-srg.jar, missing private methods in fmlcore-*.jar — Claude got "not found" for ModLoader.dispatchAndHandleError which cost two iterations before we decompiled the Sponge Mixin MixinPlatformAgentDefault to find the real registration path was MANIFEST.MF, not mods.toml. Plus methodExistsByNameInHierarchy BFS opaque at MC classes (~30–50 false WARN per modpack), ref-check missed supertype/descriptor/InvokeDynamic refs, event-scan only read visibleAnnotations (missed CLASS-retention Kotlin/Proguard builds), isInsideTryCatch was O(N²) on InsnList (~3 billion indexOf calls 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)

  1. 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.
  2. Consider upstream contributions / feedback on agent-CLI design patterns that emerge from it.
  3. 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)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗