with one click
ds-java-review
Review Java code with Tiger Style constraints and Java idioms.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Review Java code with Tiger Style constraints and Java idioms.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Design a target architecture for a new system — module boundaries, dependency rules, seams, and build order — from its requirements. Reports a blueprint; changes nothing.
Analyze an existing codebase's architecture and produce a sequenced refactoring plan — assess module boundaries, dependency structure, and layering, then lay out ordered, risk-tagged steps. Language-agnostic. Reports a plan; changes nothing.
Turn a goal or another command's output into an ordered task roadmap.
Find the root cause of a failure with the scientific method — reproduce, isolate, fix, then prove it.
Interview the user relentlessly about a plan or design until reaching shared understanding.
Run an extremely strict maintainability + single-source-of-truth review of code changes — abstraction quality, file sprawl, spaghetti-condition growth, and duplicate/competing implementations. Reports findings by default; `--fix` applies the mechanical, unambiguous ones — structural/code-judo restructurings rest on judgment and stay reported.
| name | ds-java-review |
| description | Review Java code with Tiger Style constraints and Java idioms. |
| disable-model-invocation | true |
Applies to: Java 21+ (LTS). Backend services, APIs, CLIs.
Scan the invocation for the --no-tiger, --fix, and --full flags. Treat every other argument as review scope (files or directories); if no scope is given, review the changed files on the current branch.
--no-tiger present → skip the Tiger Style section; run Java Idioms, Performance, Security, and Testing only.--no-tiger absent → run all sections (default).--fix → after reporting, apply only the violations whose fix is mechanical and unambiguous (a rename to the idiom, a missing error check the review is certain about). Anything that changes logic or rests on an unverified assumption — especially security and correctness findings — stays report-only. After applying, re-run any build/test/lint check already in the loop and revert any fix that breaks it — or that touched more than the intended mechanical edit. End with a summary of what was applied and what was left.--full → review the entire codebase instead of just the branch's changes. Explicit positional scope still wins; --full only replaces the no-scope default.Example: /ds-java-review --no-tiger src/main/ src/test/ reviews both trees without Tiger Style.
Use the checklist as a lens, not a scorecard: reason about the actual change, report real violations anchored to file:line, and flag issues even when they aren't listed. Don't manufacture findings to fill a category. Report only violations — no praise, no summary.
Skip this section entirely if --no-tiger was passed. Otherwise it is mandatory.
Objects.requireNonNull, guard clauses, assert for internal invariants) — don't demand checks in trivial getters or thin wrapperscatch blocks, no swallowed errorsrecord for immutable data carriers instead of hand-written boilerplate classessealed interfaces/classes with exhaustive switch pattern matching for closed hierarchies; switch expressions over statement chainsfinal fields, List.of/Map.of/unmodifiable collections; internal mutable collections not exposedOptional used only as a return type — not as a field or parameter; no .get() without a presence checknull returned for collections/arrays/strings — return an empty value; references treated as non-null by default and validated at boundaries (Objects.requireNonNull)finally on AutoCloseablecatch (Exception)/Throwable catch-all unless re-raising; cause preserved (new X("ctx", e))map/filter — and a plain loop preferred where a stream would be contortedvar only where the right-hand side makes the type obviousThread.ofVirtual/Executors.newVirtualThreadPerTaskExecutor, final in 21), not a tuned bounded platform-thread pool — virtual threads aren't pooled; on 21–23 a synchronized block held across a blocking call pins the carrier (use ReentrantLock), which JDK 24+ removes (JEP 491)static mutable shared state; constants are static finalIdiom-level checks only — for a ranked, costed optimization plan, use /ds-perf-plan.
String concatenation in loops → StringBuilder)new ArrayList<>(n), new HashMap<>(n))String.format) — use PreparedStatement parameters or the ORMRuntime.exec/ProcessBuilder with unsanitized inputassertThrows, not just the happy path@ParameterizedTest) rather than copy-pasted@TempDir; no Thread.sleep to coordinate — await latches/futures with a timeoutRead the target version from the build (release in Gradle/Maven, or the toolchain). Run the checklist above for every project. If it targets Java 25 or newer, also read 25.md in this skill directory and apply its checks on top. If the version can't be determined, run the base and note that version-specific checks were skipped.
<file>:<line>: <severity>: <problem>. <fix>.
Severity levels: critical (correctness/security), major (reliability/performance), minor (idiom/style).
Skip formatting nits unless they affect correctness or readability significantly.