From osdu
Execute build/test commands and return structured summaries. Use for Maven, Node, or Python builds during dependency remediation. Use when the user says "build", "compile", "test", "verify", "run tests", "maven verify", "unit tests", or "build summary". Not for: deployment, CI/CD pipeline management, or code generation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/osdu:build-runnerThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Execute build commands and return concise summaries to preserve main agent context during dependency remediation.
Execute build commands and return concise summaries to preserve main agent context during dependency remediation.
When running builds, the output can be 5,000+ lines. This skill:
This preserves the main agent's context for decision-making across multiple build cycles. The @osdu agent spawns build-runner as a sub-agent for exactly this reason.
Projects are found in the OSDU workspace:
$OSDU_WORKSPACE/<service-name>/ (regular clone)$OSDU_WORKSPACE/<service-name>/master/ (worktree clone)The javatest.py script is part of this plugin at skills/maven/scripts/javatest.py.
Check if the service exists in the workspace:
OSDU_WORKSPACE="${OSDU_WORKSPACE:-$(pwd)}"
ls "$OSDU_WORKSPACE/<service-name>/pom.xml" 2>/dev/null || \
ls "$OSDU_WORKSPACE/<service-name>/master/pom.xml" 2>/dev/null
If the project is not found, use the clone skill to clone it first, then continue with the build.
java --version 2>/dev/null && mvn --version 2>/dev/null
If build tools are missing, stop and use the setup skill to install them.
| System | Detection | Preferred Tool | Fallback |
|---|---|---|---|
| Maven (OSDU) | pom.xml + OSDU structure | javatest.py | mvn directly |
| Maven (generic) | pom.xml | — | mvn compile/test/verify |
| Node | package.json | — | npm test, npm run build |
| Python | pyproject.toml | — | pytest, pip install |
Use the javatest.py script for reliable, cross-platform execution with automatic profile handling.
# Use the javatest.py script from the maven skill
uv run skills/maven/scripts/javatest.py --project <name> --validate
# Compile only
uv run skills/maven/scripts/javatest.py --project <name> --compile
# Run tests
uv run skills/maven/scripts/javatest.py --project <name> --test
# Package
uv run skills/maven/scripts/javatest.py --project <name> --package
If script not found: Fall back to generic Maven commands (see below).
Key features:
--validate automatically detects shared modules and builds with ALL profilesWhen to use --validate:
When building in a bare clone + worktree layout, the git-commit-id Maven plugin fails because it can't find .git/. Always add this flag for worktree builds:
-Dmaven.gitcommitid.skip=true
Detect worktree layout by checking if .git is a file (not a directory):
# If .git is a file → worktree layout → skip git-commit-id
[ -f .git ] && GIT_SKIP="-Dmaven.gitcommitid.skip=true" || GIT_SKIP=""
# Compile only
cd <project-path> && mvn compile -q $GIT_SKIP 2>&1
# Compile + unit tests
cd <project-path> && mvn test -q $GIT_SKIP 2>&1
# Full build with all tests
cd <project-path> && mvn verify -q $GIT_SKIP 2>&1
cd <project-path> && npm test 2>&1
cd <project-path> && npm run build 2>&1
cd <project-path> && pytest 2>&1
cd <project-path> && pip install -e . 2>&1
ALWAYS respond with this exact structure:
Build: <project-name>
Command: <command-run>
Status: PASSED | FAILED
Duration: <time>
Tests: <passed> passed, <failed> failed, <skipped> skipped
Failures (if any):
- <TestClass>#<method>: <brief error, max 100 chars>
Compilation Errors (if any):
- <file>:<line>: <brief error>
Build: partition
Command: javatest.py --project partition --validate
Status: PASSED
Duration: 2m 15s
Tests: 147 passed, 0 failed, 2 skipped
Profiles validated: core, azure, gc, aws, ibm
Build: partition
Command: javatest.py --project partition --validate
Status: FAILED
Duration: 1m 42s
Tests: 145 passed, 2 failed, 2 skipped
Failures:
- AuthServiceTest#testLogin: NullPointerException at AuthService.java:42
- UserRepoTest#testSave: AssertionError - expected 1 but was 0
Build: partition
Command: javatest.py --project partition --compile
Status: FAILED
Duration: 0m 23s
Compilation Errors:
- src/main/java/AuthService.java:42: cannot find symbol - method getUser()
- src/main/java/UserRepo.java:15: incompatible types
Look for these patterns:
BUILD SUCCESS or BUILD FAILURE — overall statusTests run: X, Failures: Y, Errors: Z, Skipped: W — test counts[ERROR] lines — compilation or test errorsTime elapsed: — durationExtract from surefire reports or console output:
npx claudepluginhub danielscholl/claude-osdu --plugin osduDetects the project's build system (npm, yarn, pnpm, pip, poetry, gradle, maven, cargo, go, make) and runs build/test commands. Useful for automating project setup and continuous integration.
Guides Maven build lifecycles (default, clean, site), phases, goals, profiles, and customization via XML for Java projects. Includes common commands and bindings.
Provides Maven-specific conventions for running tests, building, managing dependencies, and project structure when pom.xml is present.