git-commit
Skill50 starsChanged 16 days agoMITView on GitHub
Create standardized git commits with Conventional Commits. Use when the user asks to commit changes, generate a commit message, or at the end of an implementation. Analyzes the actual diff to determine type, scope, and message. Supports logical file grouping and work item references (GitHub Issues and Azure DevOps). Do not use for branch creation (use git-branch), push, or pull requests (use pull-request).
- Reads credentials
We split this skill into the rules it gives an agent
15 rules. 0 are common, 11 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 123 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 83
If the diff contains logically distinct changes, group them into separate commits:
- Distinctive: line 94
If all changes are part of the same logical unit, stage everything:
- Distinctive: line 116
Before committing, check if the current branch is the integration branch:
- Distinctive: line 128
If the current branch matches the integration branch:
- Distinctive: line 137
If the user chooses [B]:
- Distinctive: line 144
After switching, continue the commit flow on the new branch.
- Distinctive: line 146
If the user chooses [C], proceed with the commit.
- Very specific: line 152
Every agent-generated commit must include the co-authorship trailer as the last -m:
- Distinctive: line 174
Always reference the task or issue when available:
- Very specific: line 200
NEVER: run --force or reset --hard without explicit user request
- Very specific: line 201
NEVER: use --no-verify to skip hooks without explicit user request
- Very specific: line 203
If a commit fails due to hooks, fix the issue and create a new commit (do not use --amend automatically)
- Distinctive: line 204
If the hook fails repeatedly, inform the user about the error and wait for instructions
- Distinctive: line 267
Commit messages like "fix", "update", "misc", or "WIP"
- Distinctive: line 270
No work item reference when one is available
“Common” is measured: kept by at least 6 in 10 of the 123 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git Commit — Conventional Commits for SDD
Format
<type>[optional scope]: <description>
[optional body]
[optional footer]References: Conventional Commits and How to Write a Git Commit Message.
Commit Types
| Type | Usage |
feat | New feature |
fix | Bug fix |
docs | Documentation-only change |
style | Formatting, semicolons, whitespace (no logic change) |
refactor | Refactoring without behavior change |
perf | Performance improvement |
test | Adding or fixing tests |
build | Build system or external dependencies |
ci | CI/CD configuration |
chore | General maintenance (scripts, configs) |
revert | Revert a previous commit |
Mapping to SDD Artifacts
| SDD Artifact | Likely type |
docs/features/**/spec.md | docs |
docs/architecture/decisions/*.md (ADR) | docs |
tasks.md, work items | docs or chore |
| Implementation code | feat, fix, refactor, perf |
| Tests | test |
Agents, skills, instructions (.github/) | chore or ci |
Breaking Changes
# ! marker after type/scope
feat!: remove deprecated endpoint
# Or BREAKING CHANGE footer
feat(api): allow extensible configuration
BREAKING CHANGE: behavior of the `extends` key changedWorkflow
1. Analyze Diff
# If there are staged files, use staged diff
git diff --staged --stat
git diff --staged
# If nothing is staged, use working tree
git diff --stat
git diff
# Check overall status
git status --porcelainDetermine from the diff:
- Type: What kind of change is this? (see table above)
- Scope: Which module/area was affected? (e.g.,
auth,api,docs,spec) - Description: One-line summary of what changed
2. Group and Stage (if needed)
If the diff contains logically distinct changes, group them into separate commits:
# Group by logical area
git add src/auth/*.ts # commit 1: feat(auth)
git add tests/auth/*.test.ts # commit 2: test(auth)
git add docs/features/login/ # commit 3: docs(login)Principle: one commit = one coherent logical change.
If all changes are part of the same logical unit, stage everything:
git add -A3. Pre-Commit Checks
Before committing, verify:
# Does .gitignore exist?
test -f .gitignore && echo "OK" || echo "⚠ .gitignore missing"
# No secrets being committed?
git diff --staged --name-only | grep -iE '\.(env|pem|key|credentials|secret)' && echo "⚠ POSSIBLE SECRET" || echo "OK"Never commit: .env, private keys, tokens, credentials, credentials.json.
3b. Integration Branch Guard
Before committing, check if the current branch is the integration branch:
CURRENT_BRANCH=$(git branch --show-current)Resolve the integration branch in this order:
Integration Branchfrom.memory/git-config.md(if it exists)- Repository default branch via
git symbolic-ref refs/remotes/origin/HEAD - Fallback: match against
main,master, ordevelop
If the current branch matches the integration branch:
You are about to commit directly to `[branch]`. Direct commits to the integration branch bypass code review and are difficult to revert safely.
[B] Create a feature branch first (recommended)
[C] Continue on [branch] (I understand the risks)If the user chooses [B]:
| Current state | Recovery action |
| Changes are staged but not committed | Run git switch -c <feature-branch> (preserves working tree and index) |
| Changes are unstaged | Run git switch -c <feature-branch> (preserves working tree) |
After switching, continue the commit flow on the new branch.
If the user chooses [C], proceed with the commit. Log the override in the reasoning log (if active).
Never commit to the integration branch without explicit user confirmation.
4. Generate Message and Commit
Every agent-generated commit must include the co-authorship trailer as the last -m:
Co-authored-by: GitHub Copilot <noreply@github.com>This keeps the developer as the primary author and records Copilot's participation in a traceable way.
# Without body
git commit -m "<type>(<scope>): <description> (#<issue>)" \
-m "" \
-m "Co-authored-by: GitHub Copilot <noreply@github.com>"
# With body
git commit -m "<type>(<scope>): <description> (#<issue>)" \
-m "<body with additional context>" \
-m "Co-authored-by: GitHub Copilot <noreply@github.com>"5. Work Item References
Always reference the task or issue when available:
# GitHub Issues
feat(auth): add OAuth login (#42)
fix(api): fix timeout on long-running requests (Closes #87)
# Azure DevOps
feat(auth): add OAuth login (AB#1234)
fix(api): fix timeout on long-running requests (AB#5678)Message Rules
| Rule | Correct example | Incorrect example |
| Imperative, present tense | add validation | added validation |
| Lowercase first letter in description | fix: fix date parsing | fix: Fix date parsing |
| No period at end of description | feat: add filter | feat: add filter. |
| Description ≤ 72 characters | — | — |
| Body separated by blank line | — | — |
| Body explains the why, not the what | — | — |
Git Security Protocol
- NEVER change global git config
- NEVER run
--forceorreset --hardwithout explicit user request - NEVER use
--no-verifyto skip hooks without explicit user request - NEVER force push to
main/master - If a commit fails due to hooks, fix the issue and create a new commit (do not use
--amendautomatically) - If the hook fails repeatedly, inform the user about the error and wait for instructions
Complete Examples
All examples below omit the
Co-authored-bytrailer for brevity. It is required as per section 4.
Simple commit (feature)
feat(auth): add JWT authentication (#42)Commit with body (complex fix)
fix(api): fix race condition in session cache (#87)
The shared cache between workers did not have proper locking,
causing inconsistent data under high load (>100 req/s).
Replaced Map with ConcurrentMap with configurable TTL.SDD documentation commit
docs(login): create login feature specification
Includes user scenarios, functional requirements (FR-001 to FR-005),
success criteria, and compliance criteria.ADR commit
docs(adr): add ADR 0003 — cache strategy
Documents decision to use Redis as distributed cache.
Alternatives evaluated: Memcached, local in-memory cache.Breaking change
feat(api)!: migrate endpoints from v1 to v2 (#120)
BREAKING CHANGE: all /api/v1/* endpoints have been removed.
Clients must migrate to /api/v2/* per the migration guide.Common Rationalizations
| Rationalization | Reality |
| "I will commit when the feature is done" | One giant commit is impossible to review, debug, or revert. Commit each logical slice. |
| "The message does not matter" | Messages are documentation. Future developers and agents need to understand what changed and why. |
| "I will squash it all later" | Squashing destroys the development narrative. Prefer clean incremental commits from the start. |
| "These changes are too small to commit separately" | Small commits are free. Large commits hide bugs and make rollbacks painful. |
| "Formatting changes can go with behavior changes" | Mixed concerns make review harder, reverts riskier, and history less useful. Separate them. |
Red Flags
- Large uncommitted changes accumulating across multiple files
- Commit messages like "fix", "update", "misc", or "WIP"
- Formatting changes mixed with behavior changes in the same commit
- Secrets or credentials appearing in the staged diff
- No work item reference when one is available
Other versions161 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 161
- github/awesome-copilot★ 41ksame name
- doocs/leetcode★ 37ksame name
- tisfeng/Easydict★ 15ksame name
- doocs/md★ 13ksame name
- spinabot/brigade★ 11ksame name
- GitTools/GitVersion★ 3.1ksame name
- igorescodro/alkaa★ 1.6ksame name
- microsoft/hve-core★ 1.6ksame name
- rohaquinlop/complexipy★ 890same name
- decebals/claude-code-java★ 763same name
151 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use git-pr, github-pr-create and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
klauswgSkillgit-pr
Prepare, review, publish, or update a complete GitHub pull request for the current repository, including local commit readiness, safe push strategy, semantic title validation, repository-native PR templates, issue linking, and checks verification. Use when the user asks to draft, create, submit, publish, open, or update a pull request. Always require the user to review and explicitly approve the exact final PR before any push or GitHub write.
Also in 8 projects that use this
mjun0812Skillgithub-pr-create
Pull Requestを作成するSkill。現在のbranchからpull requestを作成する。言語指定可能。 ユーザーが「PR作って」「pull request作成して」のように依頼したら使うこと。
Also in 3 projects that use this
klauswgSkillgit-issue
Prepare, review, create, or update evidence-based GitHub issues for the current repository with duplicate detection, repository-native templates, valid labels, and post-publication verification. Use when the user asks to draft, file, submit, publish, edit, or refine a GitHub issue, bug report, feature request, performance issue, or technical proposal. Always require the user to review and explicitly approve the exact final issue before any GitHub write.
Also in 3 projects that use this
MicrosoftSkillgit-merge
Integrate branches with merge or rebase, resolve conflicts, and execute an ordinary push when explicitly authorized. Use for guided integration with optional conflict-review pauses.
Also in 3 projects that use this
gologo13Skillgit-push
Push current branch to origin and sync with remote updates; keywords: git, rebase. Use only on explicit request; before execution, review diffs and list impact scope.
Also in 4 projects that use this
GoogleSkillgithub-pr-review
Review a GitHub pull request and leave inline comments in a natural human reviewing voice, indistinguishable from comments typed by hand on the GitHub web UI. Deliberately bounded to defects a reader can settle by looking at the anchored line, rather than a deep audit, so every comment is cheap for the author to check. Scales to 2-20 comments by PR size, parallelises analysis across sub-agents, drafts for approval, then posts individually with human pacing. Use when the user says "review this PR", "review PR 123", pastes a github.com/.../pull/N link, or asks for comments on a pull request. Don't use for reviewing local uncommitted changes or a diff against a branch (use the `review` skill for that).
Also in 4 projects that use this
In this repository26 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- .github/plugins/devsquad/hooks/templates/.github/copilot-instructions.mdCopilot instructions
- adr-workflowSkill
- board-configSkill
- complexity-analysisSkill
- debugging-recoverySkill
- deep-clarificationSkill
- diagram-designSkill
- documentation-styleSkill
- domain-glossarySkill
- engineering-practicesSkill
- git-branchSkill
- harness-learningsSkill
- init-configSkill
- init-docsSkill
- init-scaffoldSkill
- lsp-setupSkill
- next-taskSkill
- pull-requestSkill
- quality-gateSkill
- reasoningSkill
- security-reviewSkill
- test-disciplineSkill
- triage-workflowSkill
- work-item-creationSkill
- work-item-workflowSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

