Skip to content
Development
Skill

/java-commit

Generates a Conventional Commits message for staged Java changes. Use when user asks to "write a commit message", "help me commit", "what should my commit say", "summarize my changes", "draft a commit", or "create commit message".

From plugin
claude-java-plugins
1726 skills6 agents5 commands

Claude Code

$ npx -y skills add ducpm2303/claude-java-plugins --skill java-commit --agent claude-code

SKILL.md

java-commit.SKILL.md
description: Generates a Conventional Commits message for staged Java changes. Use when user asks to "write a commit message", "help me commit", "what should my commit say", "summarize my changes", "draft a commit", or "create commit message".
argument-hint: "[leave empty to use git diff, or describe the change]"

Generate a git commit message for the current Java changes. Use the Conventional Commits format tailored to Java/Spring projects.

Step 1 — Gather context

Run (or ask Claude to run): `git diff --staged --stat` to see which files changed. If nothing is staged, check `git diff --stat` for unstaged changes.

Step 2 — Analyse the changes

Based on the changed files, determine:

  • **Type of change**: feat, fix, refactor, test, docs, chore, perf, security
  • **Scope**: the Java package, module, or layer affected (e.g., `service`, `controller`, `repository`, `security`)
  • **What changed**: specific class names, method names, or behaviours

Step 3 — Generate commit message

Use this format:

<type>(<scope>): <imperative summary under 72 chars>

[optional body — what changed and why, not how]

[optional footer — breaking changes, issue references]

Java-specific type rules:

  • `feat`: new class, method, endpoint, or feature
  • `fix`: bug fix in logic, null check, exception handling
  • `refactor`: extract method, rename, restructure — no behaviour change
  • `perf`: N+1 fix, index added, caching, virtual threads
  • `test`: new or updated JUnit/Mockito/Testcontainers tests
  • `security`: OWASP fix, auth change, secret handling improvement
  • `chore`: dependency update, build config, version bump

Java-specific scope examples:

  • `user-service`, `order-controller`, `payment-repository`
  • `auth`, `security`, `jpa`, `api`, `dto`
  • `pom`, `gradle`, `ci`

Examples:

feat(user-service): add findByEmail with case-insensitive search

Adds UserService.findByEmail() using Spring Data derived query.
Returns Optional<User> to handle missing users without null checks.
fix(order-controller): return 404 when order not found instead of 500

Previously threw NullPointerException when order ID did not exist.
Now throws ResourceNotFoundException mapped to 404 by GlobalExceptionHandler.
perf(product-repository): fix N+1 query with @EntityGraph on findAll

Each product was triggering a separate query for its category.
Added @EntityGraph(attributePaths = "category") to load in one JOIN.
refactor(auth-service): replace field injection with constructor injection

Removes @Autowired field injection on JwtTokenProvider and UserDetailsService.
Constructor injection makes dependencies explicit and improves testability.

Step 4 — Output

Provide: 1. The commit message (ready to copy) 2. The git command: `git commit -m "$(cat <<'EOF'\n[message]\nEOF\n)"`

If multiple logical changes are staged together, suggest splitting into separate commits.

Read more
@ducpm2303
Ships withclaude-java-plugins

A Claude Code plugin marketplace with 3 focused plugins for Java developers. All plugins support Java 8 through Java 21 and tailor advice to your target Java version.

1726 skills6 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
17
Star history of ducpm2303/claude-java-plugins on GitHub, a chart by star-history.com

Other skills on claude-java-plugins.

java-adr

java-adr

Creates, lists, and manages Architecture Decision Records for Java projects. Use when user asks to "create an ADR", "document…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc11d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about java-commit.

Which coding agents can use java-commit?
java-commit installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.