java/zb/SKILL.md
Build Java 25+ projects with zb (Zero Dependencies Builder). Use when compiling, building, packaging, or running Java projects that have no external dependencies. Triggers on "build with zb", "zb build", "compile and package", "create executable JAR", or when a .zb configuration file is present in the project. Not for projects requiring Maven/Gradle dependency management.
npx skillsauth add adambien/airails zbInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build single-module Java 25+ projects into executable JARs without Maven or Gradle.
Search for a zb.sh wrapper script in this order — stop at the first match:
zb.sh in the project root**/zb.sh within the project directory tree**/zb.sh one level above the project (sibling projects)~/bin/zb.sh or ~/.local/bin/zb.shIf zb.sh is found, skip to Step 3 (zb.sh) — the script handles jar location and execution internally.
If zb.sh is not found, continue to Step 2 to locate zb.jar manually.
Locate zb.jar in this order — stop at the first match:
zb.jar in the project root**/zb.jar within the project directory tree**/zb.jar one level above the project (sibling projects)~/bin/zb.jar or ~/.local/bin/zb.jarIf neither zb.sh nor zb.jar is found, tell the user to download from github.com/AdamBien/zb.
zb must run from the directory containing the .zb config file (or where one should be generated). In multi-module repos, this is the module subdirectory, not the repo root.
.zb files in the projectcd into the directory containing the .zb file before running zb.zb exists, run from the directory that contains src/main/javaWith zb.sh:
cd <build-directory> && <path-to-zb.sh>
With zb.jar (fallback):
cd <build-directory> && java -jar <path-to-zb.jar>
Check exit code and output. A successful build prints the number of compiled files. Common errors:
zb auto-detects sources in order:
src/main/java (Maven convention, preferred)src/.Resources auto-detected from src/main/resources or current directory.
The project must have exactly one class with a void main( method (Java 25+ unnamed main).
Optional .zb properties file in the build directory (auto-generated on first run):
sources.dir=<discovered by zb>
resources.dir=<discovered by zb>
classes.dir=<temp.dir>
jar.dir=zbo/
jar.file.name=app.jar
<discovered by zb> — auto-detect directory<temp.dir> — use temporary directory, cleaned after buildjava -jar zb.jar [sources] [classes] [jar_dir] [jar_file]
Precedence: CLI args > .zb file > defaults.
Default: zbo/app.jar — executable JAR with Main-Class manifest entry.
Run with:
java -jar zbo/app.jar
If the project has a test/ directory containing *Test.java files, ask the user if they want to run tests with /zunit.
tools
Generic, composable Java 25 code conventions — modern syntax, code style, naming, visibility, structure, methods, streams, exceptions, and documentation rules that apply across all Java contexts (single-file scripts, CLI apps, MicroProfile/Jakarta EE servers, libraries). Technology-neutral within the Java world; meant to be composed with context-specific skills (e.g. `java-cli-script`, `java-cli-app`, `microprofile-server`, `bce`). Use when writing, generating, or reviewing Java code anywhere the composed skill does not already specify style. Triggers on "Java conventions", "Java style", "Java code style", "modern Java", "Java 25", "idiomatic Java", or any request to write or review Java code where context-specific skills do not already cover style.
tools
Generic, composable architecture rules for the Boundary-Control-Entity (BCE/ECB) pattern — business components, layer responsibilities, package structure, and cross-component relationships. Technology-neutral; meant to be composed with language- or framework-specific skills (e.g. microprofile-server, web-components, aws-cdk, java-cli-app). Use when creating, generating, scaffolding, writing, or reviewing code organized as business components with boundary/control/entity layers. Triggers on "BCE", "ECB", "Boundary-Control-Entity", "business component", "BC layout", "BC structure", "boundary layer", "control layer", "entity layer", or requests to organize, package, refactor, or review code along BCE lines.
tools
Create zero-dependency, single-file executable Java scripts for system-wide use via PATH. Use when asked to create a single-file Java shell script, system utility, PATH-installed Java tool, or shebang-launched Java program without the .java extension. Triggers on "Java script", "Java utility", "PATH script", "system script", or requests for single-file Java programs installed in /usr/local/bin or similar PATH directories. Not for multi-file Java applications — use java-cli-app for those.
development
Architecture and coding rules for long-running Java MicroProfile / Jakarta EE server applications — BCE layering, business components (BC), JAX-RS resources, CDI, JSON-P, testing (unit/integration/system), and Maven project structure. Use when creating, generating, scaffolding, writing, or reviewing code, resources, entities, boundaries, or business components in MicroProfile server projects. Not for serverless deployments.