java/zb-release-pipeline/SKILL.md
Generate a GitHub Actions pipeline that builds a zb (Zero Dependencies Builder) project and publishes a GitHub Release with the produced JAR. Use whenever the user wants CI/CD, a build pipeline, a release workflow, or GitHub Actions for a zb-based Java project — phrases like "set up GitHub Actions for this zb project", "add a zb release pipeline", "create a build workflow", "automate the zb build/release", or when a project has a .zb config and needs continuous builds/releases. Trigger even if the user doesn't say "zb" explicitly, as long as the project is a zb project (a .zb file is present and there is no Maven/Gradle build).
npx skillsauth add adambien/airails zb-release-pipelineInstall 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.
Generate .github/workflows/release.yml for a zb project. The pipeline checks out the
repo, installs Java, reads the project version, downloads the latest zb.jar, builds the
project, and creates a GitHub Release with the produced JAR attached and tagged
v<version>.<run_number>.
This skill produces a workflow equivalent to the reference below — only with the project-specific paths and names auto-detected, nothing hardcoded:
- name: Build
working-directory: <module>
run: java -jar ../zb.jar
- name: Create Release
run: gh release create "v${{ steps.version.outputs.version }}.${{ github.run_number }}" ...
The build directory is where zb runs from — the directory that contains the project's
.zb config alongside the sources (src/main/java or src/).
.zb files in the repository..zb and a .zb in a module subdirectory, the build
directory is the one that also contains version.txt and the actual src/ tree.
A multi-module-style layout (e.g. zsmith/zsmith/) builds from the inner module.BUILD_DIR as the path relative to the repository root. If the build directory
is the repo root, BUILD_DIR is ...zb config in the build directoryFrom the build directory's .zb, extract:
jar.file.name (e.g. zsmith.jar) → this is the artifact file name.jar.dir (e.g. zbo/) → defaults to zbo/ if absent.Derive:
ARTIFACT_NAME = jar.file.name without the .jar suffix (used in the release title).ARTIFACT_PATH = <BUILD_DIR>/<jar.dir><jar.file.name>, normalized (no ./ prefix,
collapse //). Example: zsmith/zbo/zsmith.jar.The version step does cat <VERSION_FILE> at the repo root.
version.txt in the build directory first, then the repo root.VERSION_FILE = that file's path relative to the repo root (e.g. zsmith/version.txt
or version.txt).version.txt exists anywhere, tell the user one is required for the release tag
and offer to create one (single line, e.g. 1.0.0) in the build directory. Do not
invent a different versioning scheme.zb.jar is downloaded to the repository root. The Build step runs with
working-directory: <BUILD_DIR>, so the java -jar argument is the relative path from
the build directory back up to the root:
BUILD_DIR is . (repo root) → ZB_JAR_REF = zb.jarBUILD_DIR is one level deep (e.g. zsmith) → ZB_JAR_REF = ../zb.jarn levels deep → n repetitions of ../ then zb.jarDefault to 25 (matches the zb / Java 21+ requirement and the reference workflow). If the
project's .zb or build config pins a different release/source level, use that instead.
If unsure, ask the user; do not silently downgrade.
Read assets/release.yml (the template) and substitute:
| Placeholder | Value |
|---------------------|----------------------------------------------------|
| __JAVA_VERSION__ | resolved Java version (e.g. 25) |
| __VERSION_FILE__ | VERSION_FILE |
| __BUILD_DIR__ | BUILD_DIR |
| __ZB_JAR_REF__ | ZB_JAR_REF |
| __ARTIFACT_PATH__ | ARTIFACT_PATH |
| __ARTIFACT_NAME__ | ARTIFACT_NAME |
If BUILD_DIR is ., drop the working-directory: line entirely (a working-directory
of . is noise) rather than emitting working-directory: ..
Write the result to .github/workflows/release.yml in the repository root. Create
.github/workflows/ if it does not exist. If release.yml already exists, show the diff
and confirm before overwriting.
Summarize for the user:
main and manual workflow_dispatch.v<version>.<github.run_number>.GITHUB_TOKEN, and permissions: contents: write (already in the template) is what
lets it create releases.zb.jar release on purpose, so projects
track zb improvements without manual bumps. Do not pin a zb version unless asked.zb skill.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.