agentleFS
soujavasoujava/agent-skills/skills/java-conventions/SKILL.md

java-conventions

Skill10 starsChanged 4 months agoMITView on GitHub

Versioned Java coding conventions for writing, generating, or reviewing Java code. Use when the user asks about Java style, Java conventions, idiomatic Java, modern Java, Java 25, or when writing/reviewing Java code where context-specific skills do not already cover 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. Composes with framework- and architecture-specific skills; when a composed skill specifies a rule, that rule wins.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the version the user explicitly mentions.

    line 13
  2. Distinctive:

    Default to 25 if no version is found.

    line 15
  3. Distinctive:

    If a composed skill has a specific rule for the same topic, the composed skill wins.

    line 18
  4. Distinctive:

    Not build, packaging, framework, protocol, or architecture rules.

    line 29
  5. Distinctive:

    When a composed skill specifies a rule, the composed skill wins.

    line 30
  6. Distinctive:

    When a composed skill adds or refines a rule, apply it on top of these rules.

    line 36
  7. Distinctive:

    If a composed skill is silent on a topic covered here, these rules apply by default.

    line 37

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Java Conventions

Enforce versioned, idiomatic Java language conventions. This skill is the fallback baseline for syntax, style, naming, visibility, structure, methods, streams, exceptions, and comments. Build, packaging, framework, protocol, and architecture rules come from composed skills (e.g., java-cli-script, java-cli-app, microprofile-server, spring-boot-server, sdd4j-bce, migrate-to-bce).

How to Use This Skill

  1. Determine the target Java version:
    • Use the version the user explicitly mentions.
    • Otherwise, read the version from the project (pom.xml, build.gradle, module-info.java, README.md, system.properties).
    • Default to 25 if no version is found.
  2. Load the matching reference file from references/java-<version>.md.
  3. Apply the loaded conventions as the fallback baseline.
  4. If a composed skill has a specific rule for the same topic, the composed skill wins.

Bundled References

  • Java 25 — references/java-25.md

When a reference for the requested version does not yet exist, fall back to the highest bundled reference that is not newer than the target, and only use features available in the target version. If the target is higher than all bundled references, use the newest bundled reference and note that it may not cover the latest features.

Scope

  • Language-level rules only: syntax, style, naming, visibility, structure, methods, streams, exceptions, comments.
  • Not build, packaging, framework, protocol, or architecture rules.
  • When a composed skill specifies a rule, the composed skill wins; this skill is the fallback baseline.

Composition

  • This skill defines only language-level Java conventions.
  • Build, packaging, file layout, frameworks, protocols, and architecture come from the composed skill.
  • When a composed skill adds or refines a rule, apply it on top of these rules; the composed skill always specializes, never contradicts.
  • If a composed skill is silent on a topic covered here, these rules apply by default.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.