From general
Analyzes staged changes and recent commit history to generate a well-formatted commit message that matches the project's existing commit style. Produces the commit command ready to run.
How this skill is triggered — by the user, by Claude, or both
Slash command
/general:git-commitThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generates a commit message that matches the style of this project's existing commits. Always learns from the actual git log before writing — never applies a generic format blindly.
Generates a commit message that matches the style of this project's existing commits. Always learns from the actual git log before writing — never applies a generic format blindly.
git log --oneline -20
Analyze the last 20 commits to detect:
feat: ...), imperative short phrases (Add ...), ticket-prefixed (JIRA-123: ...), or customMatch whatever style the project uses. Do not impose Conventional Commits if the project doesn't use them.
git diff --cached --stat
git diff --cached
Identify:
If $ARGUMENTS provides context about the purpose, use it.
Write a commit message following the detected project style:
Subject line rules (always apply):
Body (include if the project uses bodies, or if the change is complex):
Trailers (match project conventions):
Closes #123, Fixes #456, Refs #789Produce the staged diff summary and the ready-to-run commit command:
## Staged Changes
<summary from git diff --cached --stat>
## Commit Message
```
git commit -m "$(cat <<'EOF'
<subject line>
<body>
EOF
)"
Copy and run the command above, or confirm and I'll run it for you.
## Customizing Your Style
To lock in a specific format, add a `.commitstyle` file to your repo root:
format: conventional # conventional | imperative | ticket-prefix ticket-prefix: PROJ # e.g., PROJ-123: subject max-subject-length: 72 use-body: true trailers: Closes, Refs
When `.commitstyle` exists, it takes precedence over inferred style.
## Examples
### Conventional Commits style
feat(auth): add refresh token rotation
Rotate refresh tokens on each use to limit the blast radius of token theft. Previous tokens are immediately invalidated.
Closes #234
### Imperative short-phrase style
Add refresh token rotation to auth flow
### Ticket-prefixed style
AUTH-89: Add refresh token rotation
Rotates tokens on each use and invalidates previous tokens immediately.
npx claudepluginhub bobmaertz/prompt-library --plugin generalGenerates conventional git commit messages by analyzing staged changes, categorizing types like feat/fix, adding scopes, and matching project history style.
Drafts Conventional Commits messages for staged git changes. Proposes a type-scoped subject line, waits for user approval, then commits.
Generates conventional commit messages from staged git changes by analyzing diffs, classifying commit types, detecting breaking changes, and formatting per Conventional Commits spec.