Skip to main content
skill CX Codex

git-commit · decebals — Claude Code skill: what it does, how to install

git-commit generates Conventional Commits messages for Java codebases based on staged changes inspected with git diff.

MIT 264 installs ★ 778 updated 2026-09-06

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add decebals/claude-code-java --skill git-commit -a claude-code
Open on GitHub

What git-commit does

The skill guides the coding agent to produce commit messages formatted to the Conventional Commits specification. It scans git diff --staged, identifies appropriate change types like feat, fix, or build, and selects scopes tailored to Java modules or components such as api and plugin-loader.

To save context tokens, it inspects staged diff stats before reading full file diffs. Changes must be added to the Git index beforehand; unstaged files are ignored during message creation. The subject remains under 50 characters in the imperative mood, while breaking updates trigger a dedicated BREAKING CHANGE footer.

What it helps with

  • generate structured Conventional Commits messages from staged diffs
  • set appropriate module scopes and change types for Java projects
  • document breaking API changes with standard footers
  • link commit messages to relevant issue trackers

Example prompts for the agent

  • Commit staged changes
  • Create a commit for the plugin-loader fix
  • Commit this refactoring in the core module

How to install git-commit

1Skills CLI (Vercel)

npx skills add decebals/claude-code-java --skill git-commit -a claude-code

2Manually: put the files in place

~/.claude/skills/git-commit/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/git-commit/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about git-commit

How do I install git-commit in Claude Code?

Run npx skills add decebals/claude-code-java --skill git-commit -a claude-code in your terminal. Alternatively, place the skill definition file at ~/.claude/skills/git-commit/SKILL.md.

What does git-commit do?

It analyzes indexed Git changes and writes clean commit messages conforming to the Conventional Commits specification with Java-oriented scopes.

Which commit types are supported?

The skill recognizes feat, fix, refactor, test, docs, perf, build for Maven and Gradle updates, and chore for maintenance.

Source text

SKILL.md · MIT
---
name: git-commit
description: Generate conventional commit messages for Java projects. Use when user says "commit", "create commit", "commit changes", or after completing code changes that need to be committed.
license: MIT
---

# Git Commit Message Skill

Generate conventional, informative commit messages for Java projects.

## When to Use
- After making code changes
- User says "commit this" / "commit changes" / "create commit"
- Before creating PRs

## Format Standard

Use Conventional Commits format:
```
<type>(<scope>): <subject>

<body>

<footer>
```

### Types (Java context)
- **feat**: New feature (new API, new functionality)
- **fix**: Bug fix
- **refactor**: Code refactoring (no functional change)
- **test**: Add/update tests
- **docs**: Documentation only
- **perf**: Performance improvement
- **build**: Maven/Gradle changes
- **chore**: Maintenance (dependency updates, etc)

### Scope Examples (Java specific)
- Module name: `core`, `api`, `plugin-loader`
- Component: `PluginManager`, `ExtensionFactory`
- Area: `lifecycle`, `dependencies`, `security`

### Subject Rules
- Imperative mood: "Add support" not "Added support"
- No period at end
- Max 50 chars
- Lowercase after type

### Body (optional but recommended)
- Explain WHAT and WHY, not HOW
- Wrap at 72 chars
- Reference issues: "Fixes #123" / "Relates to #456"

## Examples

### Simple fix
```
fix(plugin-loader): prevent NPE when plugin directory is missing

Check for null before accessing plugin directory to avoid
NullPointerException during initialization.

Fixes #234
```

### Feature with breaking change
```
feat(api): add support for plugin dependencies versioning

BREAKING CHANGE: PluginDescriptor now requires semantic versioning
format (x.y.z) instead of free-form version strings.

Closes #567
```

### Refactoring
```
refactor(core): extract plugin validation logic

Move validation logic from PluginManager to separate
PluginValidator class for better testability and separation
of concerns.
```

### Test addition
```
test(plugin-loader): add integration tests for plugin loading

Add comprehensive integration tests covering:
- Loading from directory
- Loading from JAR
- Error handling for invalid plugins
```

### Build/dependency update
```
build(deps): upgrade Spring Boot to 3.2.1

Update Spring Boot from 3.1.0 to 3.2.1 for security patches
and performance improvements.
```

## Workflow

1. **Analyze changes** using `git diff --staged`
2. **Identify scope** from modified files
3. **Determine type** based on change nature
4. **Generate message** following format
5. **Execute commit**: `git commit -m "message"`

## Token Optimization

- Read staged changes ONCE: `git diff --staged --stat` + targeted file diffs
- Don't read entire files unless necessary
- Use concise body - aim for 2-3 lines max
- Batch multiple small changes into logical commits

## Anti-patterns

❌ Avoid:
- "fix stuff" / "update code" / "changes"
- "WIP" commits (unless explicitly requested)
- Mixing unrelated changes (use separate commits)
- Over-detailed technical implementation in message

✅ Good commits:
- Single logical change
- Clear, searchable subject
- References issues when applicable
- Explains business value

## Integration with GitHub

After commit, suggest next steps:
- "Push changes?" 
- "Create PR for issue #X?"
- "Continue with next task?"

## Common Patterns for Java Projects

### Adding new functionality
```
feat(extension): add support for prioritized extensions

Allow extensions to specify priority order for execution.
Extensions with higher priority run first.

Closes #123
```

### Fixing bugs
```
fix(classloader): resolve resource lookup in nested JARs

ClassLoader.getResource() was failing for resources in
JARs loaded from plugin JARs (nested JARs). Fixed by
implementing proper resource resolution chain.

Fixes #456
```

### Dependency updates
```
build(deps): bump slf4j from 1.7.30 to 2.0.9

Updates SLF4J to latest stable version. No API changes
required as we use only stable APIs.
```

### Documentation improvements
```
docs(readme): add plugin development quickstart guide

Add step-by-step guide for creating first plugin:
- Project setup
- Implementing Plugin interface
- Building and testing
```

### Performance optimizations
```
perf(plugin-loader): cache plugin descriptors

Cache parsed plugin descriptors to avoid repeated I/O
and parsing. Reduces plugin loading time by ~40%.

Related to #789
```

## Multi-file Changes

When changes span multiple components:

```
refactor(core): reorganize plugin lifecycle management

- Extract lifecycle state machine to separate class
- Move validation logic to validators package
- Update tests to reflect new structure

This refactoring improves testability and separation
of concerns without changing external APIs.

Related to #111, #222
```

## Breaking Changes

Always use BREAKING CHANGE footer:

```
feat(api)!: replace Plugin.start() with Plugin.initialize()

BREAKING CHANGE: The Plugin.start() method has been renamed
to Plugin.initialize() for better semantic clarity. All
plugin implementations must update their code.

Migration guide: Replace @Override start() with @Override
initialize() in all Plugin implementations.

Closes #999
```

## Quick Reference Card

| Change Type | Type | Example Scope |
|-------------|------|---------------|
| New feature | feat | api, core, loader |
| Bug fix | fix | plugin-loader, lifecycle |
| Refactoring | refactor | core, utils |
| Tests | test | integration, unit |
| Docs | docs | readme, javadoc |
| Build | build | maven, deps |
| Performance | perf | classloader, cache |
| Maintenance | chore | ci, tooling |

## References

- [Conventional Commits Specification](https://www.conventionalcommits.org/)

© decebals · MIT · decebals/claude-code-java

Similar skills

All skills for Git and GitHub →

git-commit by other authors comes first.

git-commit official github A GitHub Copilot skill that turns a working diff into a commit: it reads the changes, stages the related files, writes a Conventional Commits message and runs git commit. CX Codex +1 47,165installs git-commit fvadicamo Writes git commits in Conventional Commits format with a type, a required scope and a short subject. Useful when the agent commits on your behalf. CX Codex +1 324installs git-commit ThinkInAIXYZ git-commit generates commit messages following Conventional Commits — type, scope, and subject. The agent reads staged changes via git diff --staged and proposes a message. CX Codex +1 1installs git-commit ilteoood git-commit — a skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode that reads the diff and builds a Conventional Commits message automatically. CX Codex +1 624installs git-commit nimbalyst The git-commit skill prepares a commit proposal in Nimbalyst’s interactive widget. Use it after clicking “Commit with AI” or explicitly requesting a smart commit. CX Codex +1 ★ 2,096repo stars git-commit-helper davila7 Reads git diff --staged and drafts a commit message following Conventional Commits. It fires after every Bash tool call and appends a line to ~/.claude/git-commit-helper.log. CX Codex +1 7,093installs git-commit-workflow laurigates The git-commit-workflow Claude Code skill defines commit-message and staging rules. It helps split related edits into focused commits and review staged changes. CX Codex +1 161installs create_git_diff_commit danielmiessler create_git_diff_commit generates git add and git commit commands from a repository diff using Conventional Commits. GP ChatGPT ★ 44,690repo stars git-conventional-commit-messages PatrickJS The git-conventional-commit-messages Cursor rule shapes Git commit messages around Conventional Commits. Use it when an agent needs consistent types, scopes, bodies, and footers. CX Codex +1 ★ 41,178repo stars speckit.git.commit alfredoperez speckit.git.commit is a Claude Code command that stages and commits changes after Spec Kit commands, according to project configuration. CX Codex +1 ★ 110repo stars java-mcp-server-generator official github The java-mcp-server-generator skill creates a Java or Spring Boot MCP server for exposing code, APIs, or databases to AI agents. Use it when you need a project scaffold with tests. CX Codex +1 8,800installs

From the same set18

The whole set →
performance-smell-detection performance-smell-detection flags code-level performance smells in Java, covering streams, collections, boxing, and regex compiled inside loops. Helps during code reviews of performance-critical paths. CX Codex +1 361installs test-quality test-quality — a skill that writes high-quality Java unit tests using JUnit 5 and AssertJ. Enable it to add tests to your code or improve test coverage. CX Codex +1 356installs api-contract-review api-contract-review is a Claude Code skill that checks REST API contracts for HTTP semantics, versioning, and compatibility. Run it on a request to review an API or before releasing API changes. CX Codex +1 329installs maven-dependency-audit maven-dependency-audit is a skill that checks Maven dependencies for outdated versions, conflicts and known CVEs. Run it before a release or after a security advisory lands. CX Codex +1 322installs jpa-patterns jpa-patterns teaches coding agents to fix N+1 queries, resolve LazyInitializationException, and manage Spring JPA transactions cleanly. CX Codex +1 313installs logging-patterns The logging-patterns skill shapes Java logging with SLF4J, JSON records, and MDC context. Use it when an agent must trace requests or inspect application logs. CX Codex +1 313installs changelog-generator changelog-generator builds changelogs from conventional commits and helps prepare a release entry. It is aimed at Java projects with a git history. CX Codex +1 265installs issue-triage Automate GitHub issue triage: sort incoming tasks by type (bugs, features, questions), assign priority labels, and flag duplicates. Use during backlog cleanup, weekly reviews, or after returning from time off. CX Codex +1 254installs

Project sponsors

Companies that keep this analytics open