terlar/nix-config/git-commit
Claude Code and agent skill by terlar/nix-config
- community
Checking that the SKILL.md file is still in the repository.
Use this skill whenever the user wants to commit changes, stage files, write a commit message, or run git commit — even if they just say "commit this", "save my changes", or "make a commit". Guides writing well-structured commit messages following the Conventional Commits specification, enforcing scope rules from .conform.yaml, protecting main/master branches, and ensuring clean staging hygiene before every commit.
Install
npx vskill@latest install terlar/nix-config/git-commitSKILL.md
Branching rules
- Check current branch: Always determine the current branch (e.g.,
git branch --show-current) before writing or executing a commit.
- Protect main/master: If the current branch is
mainormaster,
halt and explicitly ask the user for permission before proceeding with the commit.
- Prefer feature branches: When asked to commit on
mainormaster,
actively suggest creating a new feature branch (e.g., git checkout -b <type>/<brief-description>) as the preferred alternative.
Commit message structure
Types
Use exactly one of: build, chore, ci, docs, feat, fix, perf, refactor, style, test
feat- adds a new featurefix- fixes a bug- All other types - use the one that best describes the change
Subject line rules
- Type and description are required; scope is optional
- Description must immediately follow the type/scope prefix
- Write in imperative mood:
add,fix,update,remove,rename - Limit description to 72 characters unless
.conform.yaml
specifies different limits — check it first
- Lowercase the entire subject line
- Do not end with punctuation
- ASCII only: no emojis, em dashes, or other non-standard characters
Scope rules
Always check `.conform.yaml` first (if present in the repo root):
- If
conventional.scopesis defined, only use scopes from that list - If the change doesn't fit any existing scope, ask the user whether to
add a new scope; if they agree, add it to .conform.yaml before committing
- If
header.lengthordescriptionLengthare set, use those limits - If no
.conform.yamlexists, use the name of the most directly affected
component: module name, directory, or logical area
- Omit scope when a change is genuinely cross-cutting
Body rules
- Leave one blank line between subject and body
- Use bullet points starting with
- - Capitalise the first letter of each bullet point
- Write each bullet in imperative mood
- Keep bullet points short and clear
- ASCII only: no emojis, em dashes, or other non-standard characters
- Omit the body entirely if it adds no useful detail beyond the subject
Breaking changes
- Append
!to the type/scope for breaking changes:feat!:or
feat(scope)!:
- Add a
BREAKING CHANGE: <description>footer separated from the body by a
blank line
- The footer must describe what breaks and how to migrate
Atomicity
- Each commit must represent one logical change
- If unrelated changes are present in the working tree, split them into
separate commits before staging
Staging hygiene
Before writing the commit message:
- Stage only files that were explicitly changed during the session; never
stage unrelated pre-existing modifications
- Avoid
git add .orgit add -Aunless every change in the working tree
is intentional and part of this commit
- Run
git diff --stagedand confirm the staged diff matches the intended
change before proceeding
Rebase rules
- Always pass
--committer-date-is-author-datewhen rebasing — this preserves
the original author date so history isn't rewritten with the rebase timestamp
GPG signing failures
- If
git commitfails with "Bad PIN" from the GPG agent, retry the commit
immediately. The "Bad PIN" error typically means a mistyped passphrase; a retry will prompt for the passphrase again.
- Do not change the commit message or staging between retries — reuse the
exact same commit command.
- If retry fails again with "Bad PIN", ask the user to unlock their GPG key
first (e.g., gpg --card-status or echo test | gpg --sign) before retrying the commit.
Examples
Good subject lines:
Good commit with body:
Breaking change commit:
Body-less commit (body would add no value):
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingmodules/home/profiles/user/terje/programs/opencode/skills/git-commit/SKILL.md
Popularity
- Repository stars
- 104
- Repository forks
- 5
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/terlar/nix-config/git-commit)