marketplace/bundles/pm-dev-java/skills/java-null-safety/SKILL.md
JSpecify null safety annotations with @NullMarked, @Nullable, and package-level configuration
npx skillsauth add cuioss/plan-marshall java-null-safetyInstall 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.
REFERENCE MODE: This skill provides reference material. Load specific standards on-demand based on current task.
Null safety standards using JSpecify annotations for consistent, compiler-verifiable null contracts.
This skill requires JSpecify annotations:
org.jspecify:jspecify (NullMarked, Nullable, NonNull)<dependency>
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
</dependency>
Important: Load this standard for any null safety work — package configuration, annotations, API return types.
Read: standards/null-safety-core.md
This provides rules for:
@NullMarked package-level configuration with package-info.java syntax@NullMarked, @Nullable, @NonNull)@Nullable returns)Load for implementation work — writing null-safe code, collections, testing, migration:
Read: standards/null-safety-patterns.md
This provides rules for:
@NullMarked| Rule | Guidance |
|------|----------|
| Package default | Always add @NullMarked to package-info.java |
| Return types | Never use @Nullable — use Optional<T> instead |
| Parameters | Use @Nullable sparingly; prefer method overloads |
| API boundaries | Objects.requireNonNull() for defensive checks |
| Collections | List<@Nullable String> for nullable elements |
package-info.java — starting point for new packages with @NullMarked:
Read: templates/package-info.java.tmpl
Replace ${YEAR}, ${PACKAGE}, and ${PACKAGE_DESCRIPTION} with actual values. The import-after-package ordering is critical — see standards/null-safety-core.md for why.
@NullMarked in package-info.java@Nullable used for return types (use Optional instead)pm-dev-java:junit-core skill)pm-dev-java:java-core - Core Java patternspm-dev-java:java-lombok - Lombok patterns (interop with null safety)development
Domain-owned OpenRewrite log-line finding parser for the java-cui domain — parses the
development
Domain-owned OpenRewrite marker detection for the java-cui domain — scans Java/Kotlin sources for cui-rewrite TODO markers, categorizes them by recipe, and fails the gate on any detected marker
development
Operator control surface for the marshalld build server — enrol/drop a project in the machine-global registry (the opt-in enable signal and anti-laundering wall), manage the daemon lifecycle (start, stop, drain, status, install, upgrade) version-pinned to the verified bundle copy, and inspect the daemon's per-project interaction-audit log (read-only)
tools
The tiny build-consumption client for the marshalld build server — submit a build job, bounded long-poll for its result, ping the daemon identity, and preflight registry-plus-liveness in one call; consumption only, never provisioning or enrolment