From git
Configure git policies for the current project (commit confirmation, message format, co-authored-by)
How this skill is triggered — by the user, by Claude, or both
Slash command
/git:policy-setupThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Configure git policies for the current project or task. This skill sets up rules that determine how git operations (commits, messages, confirmations) should be handled, enabling consistent enforcement across work sessions.
Configure git policies for the current project or task. This skill sets up rules that determine how git operations (commits, messages, confirmations) should be handled, enabling consistent enforcement across work sessions.
Before gathering preferences, check if .claude/git-policy.json already exists:
If file exists, read current settings and ask whether to create new or edit existing:
Q: "Git policy already configured. What would you like to do?"
Header: "Policy Found"
Options:
- "Edit existing policy"
- "Create new policy (overwrite)"
If "Edit existing policy" selected:
Current policy:
- Commit confirmation: enabled
- Message format: custom [PROJ-123]
- Co-Authored-By: name only
Q: "Which policy would you like to change?"
Header: "Edit Policy"
Options:
- "Commit confirmation (currently: enabled)"
- "Message format (currently: custom [PROJ-123])"
- "Co-Authored-By (currently: name only)"
- "All settings (reconfigure everything)"
If "Create new policy" or file doesn't exist, proceed to Step 1.
Use AskUserQuestion to gather policy preferences. Present clear choices for each policy:
Commit Confirmation Policy
Commit Message Format Policy
Co-Authored-By Policy
Store policy configuration in .claude/git-policy.json:
{
"version": "1.0",
"projectType": "private" | "personal",
"policies": {
"commitConfirmation": {
"enabled": true | false
},
"commitMessageFormat": {
"ticketMethod": "none" | "no_ticket" | "branch" | "custom",
"currentTicket": "PROJ-123"
},
"coAuthoredBy": {
"method": "no" | "yes_no_email" | "yes_with_email"
}
},
"createdAt": "2026-03-04",
"appliedAt": null
}
Summarize configured policies to the user:
What it does: Requires explicit user confirmation before executing commit/push operations.
When to enable:
When to disable:
Determines ticket/reference structure in commit messages. Conventional Commits (feat:, fix:, docs:) are always required.
Options:
none - Ticket excluded
feat: add loginno_ticket - Explicit non-ticket flag
[NT] feat: add loginbranch - Auto-extract from branch name
feature/PROJ-123-login[PROJ-123] feat: add logincustom - User provides custom ticket reference
PROJ-123[PROJ-123] feat: add loginAdds collaborator attribution to commits.
Options:
no - Skip Co-Authored-By
yes_no_email - Include without email
Co-Authored-By: [MODEL_NAME]yes_with_email - Include with email
Co-Authored-By: [MODEL_NAME] <[MODEL_EMAIL]>Once configured, git-policy-enforcement skill will:
For detailed policy patterns and enforcement rules:
references/policy-definitions.md - Complete policy specificationsnpx claudepluginhub harry-jk/claude-plugin --plugin gitManages Git commit workflow using Conventional Commits format with safety protocols. Creates, validates, executes commits; handles hooks, PRs, and safety checks before operations.
Enforces Git workflow standards including Conventional Commits, branch naming, and PR merge strategies for team collaboration.
Guides conventional commit messages, explicit git staging workflows, logical change grouping, and best practices with issue linking. Useful for git add, commit, or staging tasks.