No slash command · from git-plugin
Creates local commits with conventional messages, pre-commit hooks, and auto-detected GitHub issue references. Use when the user says "commit", "save my work", or "stage and commit".
Ships in git-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
| Use this skill when... | Use the alternative when... |
|---|---|
| Creating a local commit with conventional message and pre-commit hooks | Use git-push afterwards to send the commit to remote |
Auto-detecting related GitHub issues and inserting Refs #N references | Use github-issue-autodetect to study the detection patterns themselves |
| Staging and committing without pushing or opening a PR | Use git-commit-push-pr to chain commit + push + PR creation in one step |
| Applying repo conventions (humble tone, logical grouping) to a single commit | Use git-commit-workflow for the broader staging + message convention guidance |
Create local commits with proper conventional messages and issue references.
Trigger phrases:
Context signals:
git status shows modified/untracked files# Check branch and status
git branch --show-current
git status --porcelain=v2 --branch
# View changes
git diff --stat # Unstaged
git diff --cached --stat # Already staged
Explicit staging (preferred):
git add src/feature.ts
git add tests/feature.test.ts
git status --porcelain # Verify
Modified tracked files:
git add -u # Stage all modified tracked files
If .pre-commit-config.yaml exists:
pre-commit run --all-files
# If hooks modify files (formatters), re-stage:
git add -u
pre-commit run --all-files # Should pass now
Scan open issues for matches (see github-issue-autodetect skill):
gh issue list --state open --json number,title,labels --limit 30
Match staged changes to issues by:
IMPORTANT: Use HEREDOC directly in the git commit command.
git commit -m "$(cat <<'EOF'
type(scope): concise description
Optional body explaining the change.
Refs #123
Co-Authored-By: Claude <model name> <[email protected]>
EOF
)"
The scope is required. Write type(scope): … — docs(readme): update install steps, never a bare docs: update install steps. The Conventional Commits spec lets you omit the scope; this house convention does not (.claude/rules/conventional-commits.md). Take it from the component or plugin the change touches.
Use the exact Co-Authored-By line the harness provides for the current
session — do not copy a model name from this example.
Inside a quoted heredoc (<<'EOF'), backticks, $, and \ are already literal — never backslash-escape them. A reflexive \`` produces a literal backslash in the commit message that survives into git logand needs an--amend` to clean up.
For trailer conventions (Co-authored-by, Signed-off-by, BREAKING CHANGE, Release-As), see git-commit-trailers skill.
| Type | Use Case | Version Bump |
|---|---|---|
feat | New feature | Minor |
fix | Bug fix | Patch |
perf | Performance improvement | Patch |
refactor | Code restructuring | None |
docs | Documentation | None |
test | Adding tests | None |
chore | Maintenance, deps | None |
ci | CI/CD config | None |
build | Build system, deps | None |
See Conventional Commits Standards for complete reference.
Commit messages use Refs #N only. A closing keyword (Fixes #N, Closes #N)
in a commit message closes the issue when the commit lands on the default
branch, whatever the PR body says; under squash with COMMIT_MESSAGES every
branch commit message lands in the squash body. Put closing keywords in the
PR body. The no-closing-keywords commit-msg hook rejects them here.
| Where | Keyword | Effect |
|---|---|---|
| Commit message | Refs #N | Links without closing |
| PR body | Fixes #N / Closes #N | Closes the issue when the PR merges |
On success, report:
Created commit: abc1234
Message: feat(auth): add OAuth2 support
Refs #123
Ready for: push to remote, create PR, or continue working
This skill creates local commits only. For remote operations:
Common compositions:
Before building further on an existing PR branch (an additional in-session
request continuing earlier work), invoke /git:pr-sync-check first. If the
verdict is anything other than in_sync / no_pr / no_remote — e.g.
pr_merged or behind — stop and reconcile (branch off the updated default, or
git pull --rebase) before committing. See .claude/rules/pr-branch-sync.md.
No changes to commit:
Nothing to commit. Working tree clean.
Pre-commit hook fails:
# Fix the issue, then:
git add -u
pre-commit run --all-files
# Then commit
Merge conflict markers:
Cannot commit: unresolved merge conflicts in <file>
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub laurigates/claude-plugins --plugin git-plugin52 skills in this plugin
/deadbranchdeadbranch CLI for stale-branch cleanup — dry-run preview, TUI or non-interactive delete, protects main/develop/WIP. Use when asked to clean up branches, prune branches, or remove stale branches./external-pr-trustAuthorship as a precondition of merging — bot vs stranger classification, what a merge executes, the merge-guard hook. Use when bulk-merging PRs, or when a merge is denied for a non-self author./gh-cli-agenticgh CLI commands with JSON output for agents. Use when querying PRs, issues, runs, or repo metadata; inspecting PR checks; fetching failed CI logs; or mapping a github.com URL to an API call.Other plugins' skills for the same job