java-code-reviewer
- Repo stars 1,006
- Author updated Live
- Author repo openinference
- Domain
- AI
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @Arize-ai · no license declared
- Token usage
- Lean
- Setup complexity
- Plug-and-play
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Network behavior
- External requests
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: java-code-reviewer
description: > Review a Java OpenInference instrumentation package against the project's established patterns…
category: ai
runtime: no special runtime
---
# java-code-reviewer output preview
## PART A: Task fit
- Use case: > Review a Java OpenInference instrumentation package against the project's established patterns and conventions. Report findings with file paths and line numbers, organized by severity (Critical / High / Medium / Low). makes outbound network calls. Works with Claude Code, Cursor, Cline and 23 more..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Workflow / Section 1: Gradle Setup / Section 2: Testing Patterns” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “> Review a Java OpenInference instrumentation package against the project's established patterns and conventions. Report findings with file paths and line numbers, organized by severity (Critical / High / Medium / Low). makes outbound network calls. Works with Claude Code, Cursor, Cline and 23 more.”.
- **02** When the source has headings, the agent prioritizes “Workflow / Section 1: Gradle Setup / Section 2: Testing Patterns” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files; may access external network resources; usually needs no extra API key.
## Running Rules
- read files, write/modify files; may access external network resources; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files.
Start with a small task and check whether the result follows “Workflow / Section 1: Gradle Setup / Section 2: Testing Patterns”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: java-code-reviewer
description: > Review a Java OpenInference instrumentation package against the project's established patterns…
category: ai
source: Arize-ai/openinference
---
# java-code-reviewer
## When to use
- > Review a Java OpenInference instrumentation package against the project's established patterns and conventions. Repo…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Workflow / Section 1: Gradle Setup / Section 2: Testing Patterns” and keep inference separate from source facts.
- read files, write/modify files; may access external network resources; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "java-code-reviewer" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Workflow / Section 1: Gradle Setup / Section 2: Testing Patterns
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files | may access external network resources
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} Java Code Reviewer for OpenInference Instrumentors
Review a Java OpenInference instrumentation package against the project's established patterns and conventions. Report findings with file paths and line numbers, organized by severity (Critical / High / Medium / Low).
Workflow
Step 1: Identify the package to review
- Ask the user which instrumentor to review if not already clear from context
- The package lives under
java/instrumentation/openinference-instrumentation-<name>/ - Read the instrumentor source,
build.gradle, andsrc/test/directory
Step 2: Use the instrumented library source as ground truth
Before flagging any finding, verify it against the actual library code. Do NOT assume how the instrumented library works — read it. Do NOT present findings without having read the library source first.
- Find the library version from
java/build.gradleextblock - Check
~/.gradle/caches/modules-2/files-2.1/for cached sources - If not cached, download the sources jar from Maven Central (
repo1.maven.org). Some libraries split across multiple artifacts — checkbuild.gradledependency declarations and fetch all relevant ones. - If you cannot obtain the source through any means, explicitly tell the user you were unable to verify against the library source before presenting findings.
- Calibrate severity by what the library actually does: a bug on a common code path is High/Critical; an edge case for a type that can't appear at runtime is Low
Step 3: Run all review sections below
Step 4: Present findings in a severity table, list what's working well, then ask
the user: fix issues, run tests (./gradlew :instrumentation:...:test), or done.
Section 1: Gradle Setup
Read the instrumentor's build.gradle and the root java/build.gradle.
- Instrumented library must be
compileOnly(notimplementation) — High openinference-instrumentationmust beapi- Version constants should be in root
extblock, not hardcoded — Medium - Module must be in
java/settings.gradle— Critical if missing - Run
cd java && ./gradlew spotlessCheck(Palantir Java Format)
Section 2: Testing Patterns
Exhaustive attribute assertions
This is the most important testing pattern. Tests must verify ALL span attributes, not spot-check a few. The remove-and-verify pattern catches both unexpected additions and silent removals:
Map<String, Object> attributes = new HashMap<>();
span.getAttributes().forEach((key, value) -> attributes.put(key.getKey(), value));
assertThat(attributes.remove("openinference.span.kind")).isEqualTo("LLM");
assertThat(attributes.remove("llm.model_name")).isEqualTo("gpt-4");
// ... remove and assert all remaining attributes ...
assertThat(attributes).isEmpty(); // Nothing unexpected left
Missing emptiness check — High.
Other required test coverage
- Error handling: exception -> span has
StatusCode.ERROR+ recorded exception — High - Context attribute propagation: session_id, user_id, metadata, tags
- TraceConfig masking: verify
hideInputMessagesetc. actually suppress attributes - Missing test files entirely — Critical
Section 3: OpenInference Semantic Conventions
Read SemanticConventions.java for the full attribute catalog:
java/openinference-semantic-conventions/src/main/java/com/arize/semconv/trace/SemanticConventions.java
Also read the spec files under spec/ (semantic_conventions.md, traces.md,
llm_spans.md, embedding_spans.md, tool_calling.md) for expected behavior.
For the library type being reviewed, verify the instrumentor sets all applicable attributes. Key checks:
- Every span needs
OPENINFERENCE_SPAN_KIND,INPUT_VALUE+INPUT_MIME_TYPE,OUTPUT_VALUE+OUTPUT_MIME_TYPE. Missing MIME type when value is set — High - All attributes should use constants from
SemanticConventions, not hardcoded strings — Medium - Read
TraceConfig.javafor the full list of hide flags; verify each is respected where applicable — Medium if missing
Section 4: Span Lifecycle and Hierarchy
span.end()must ALWAYS be called — Critical if missingScopefromcontext.makeCurrent()must be closed (try-with-resources) — High- For multi-span instrumentors: verify parent-child nesting and shared
traceId - The instrumentor should use
OITracer(not rawTracer) to get TraceConfig support
Presenting Results
Organize findings into a table:
| Severity | Section | Finding | Location |
|---|---|---|---|
| Critical | 4 | span.end() not called in error path | SomeListener.java:142 |
| High | 2 | Tests don't verify all span attributes | SomeTest.java:85 |
| ... | ... | ... | ... |
Then list what's working well — positive findings help the user understand what doesn't need to change.
Decide Fit First
Design Intent
How To Use It
Boundaries And Review