git-commit
Skill4 starsChanged 3 months agoMITView on GitHub
Git commit conventions for this repo — message style, changelog and version-bump rules, attribution trailer, and the safety rules that always apply. Use whenever the user says "commit", "commit this", "create a commit", "make a commit", "amend", or asks Claude to check work into git in any form.
- Reads credentials
- Commits and pushes
109 other projects use a version of this.
Adopted by
Most recently taken up by
- BUGLAN/skillstheir own version, first seen Oct 6, 2026
- thunderstormwang/AgentSkillstheir own version, first seen Oct 5, 2026
- zlliang/skillstheir own version, first seen Oct 5, 2026
- ShalomPrinz/go2-dispatchertheir own version, first seen Oct 4, 2026
- devantler-tech/ksailtheir own version, first seen Oct 3, 2026
- benbrackenbury/skillstheir own version, first seen Oct 3, 2026
Used with
Projects with it also use git-pr, github-pr-create and 10 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.
CarpeWuSkillgit-pr
Prepares Pull Request content by analyzing branch differences. Use when creating PRs, when the user needs help writing PR descriptions, or mentions pull request.
Also in 7 projects that use this
mpagotSkillgithub-pr-create
Creates a GitHub pull request from staged git changes, handling commit, push, and PR creation in one workflow. Activate when the user asks to "create PR", "open pull request", "push and create PR", "submit PR", or wants to send their changes upstream to os-autoinst-distri-opensuse.
Also in 3 projects that use this
CarpeWuSkillgit-branch
Creates Git branches following naming conventions. Use when creating feature, bugfix, hotfix, or release branches, or when the user asks to create a new branch.
Also in 3 projects that use this
denghuinowSkillgit-release
Git 项目版本发布自动化工具。执行完整的发布流程:提交所有修改、更新版本号(若有)、 生成 CHANGELOG、创建 git tag 并推送到远程仓库。基于语义化版本 (major/minor/patch)。 支持有 package.json 的项目,也支持无 package.json 的项目(版本从最新 git tag 或 VERSION 等文件获取)。
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 3 projects that use this
strantalisSkillgh-cli
Standardize all GitHub interactions via the GitHub CLI (`gh`) instead of ad-hoc URLs, UI clicks, or direct REST API calls. Use when you need to read or change GitHub state (repos, issues, pull requests, reviews, check status, Actions workflows/runs, releases, labels, milestones, discussions, gists) and want deterministic output (prefer `--json` + `--jq`). Also use when the user provides a GitHub URL, including deep links like `https://github.com/OWNER/REPO/pull/123`, `.../issues/123`, `.../pull/123/files`, or comment permalinks like `#issuecomment-...`, and you need to fetch the underlying PR/issue/thread and reply. Fall back to `gh api` only when there is no first-class `gh NOUN VERB` command.
Also in 4 projects that use this
Other versions109 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 109
- github/awesome-copilot★ 40ksame name
- decebals/claude-code-java★ 747same name
- devantler-tech/ksail★ 166same name
- forefy/.context★ 151same name
- diodeme/Gold-Band★ 143same name
- Dimon94/skills★ 107same name
- eduardo-sl/go-agent-skills★ 72same name
- omergocmen/CrewCtl★ 70same name
- tsaol/awesome-claude★ 67same name
- huangwb8/skills★ 50same name
99 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.
In this repository7 other files it gives its agents.
- .vibe/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- legacy/CLAUDE.mdCLAUDE.md
- clideSkill
- testmodeSkill
- ui-designSkill
- whats-nextSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 7 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 85 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 13
Follow these conventions whenever you create a commit in this repository.
- Very specific: line 22
Ticket ref: keep a trailing (T-NNN) on the subject when the work has a ticket — feat(settings): category rail + navigation (T-447).
- Distinctive: line 30
Default to one logical change per commit, even when a lot of work lands in the tree at once.
- Distinctive: line 36
Check the conversation history — if you didn't touch a file, it's not yours to stage.
- Distinctive: line 39
Never silently skip or silently include changes that aren't yours.
- Very specific: line 82
No nested function/file lists inside parentheses: If you find yourself writing (foo, bar, baz, …) for more than 3 items, just say "several …
- Distinctive: line 98
When a commit spans multiple entries (e.g.
- Very specific: line 105
Leave an empty ## [Unreleased] section at the top with its subsection skeleton ready.
- Very specific: line 107
Run make gen-build-info so assets/licenses.yaml self.version: re-syncs from pubspec (it's auto-rewritten by every build but commit the …
- Distinctive: line 115
Every commit ends with the Claude co-author line:
- Very specific: line 129
Write the full message to tmp/commit-msg.txt with the Write tool.
- Distinctive: line 138
Delete it in the same turn.
- Very specific: line 149
Every scratch file goes there, not just commit messages: long ticket bodies passed with --file, throwaway probe scripts.
- Distinctive: line 178
When staging, prefer naming specific files over git add -A / git add .
“Common” is measured: kept by at least 6 in 10 of the 85 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 rule — this repo
Follow these conventions whenever you create a commit in this repository. These are in addition to the standard Claude Code git-safety protocol (no --no-verify, no force-push to main, prefer new commits over --amend, etc.).
Message style
This repo uses Conventional Commits 1.0 (per D-37).
- First line:
type(scope): imperative subject, ≤ 72 characters including the prefix. Examples:feat(settings): add Appearance font picker (T-460),fix(ipc): reconnect after app reload,docs(readme): drop brittle version line. - Type: one of
feat,fix,docs,style,refactor,perf,test,build,chore. Usefeat/fixfor user-visible behavior;chorefor bookkeeping (chore(plan)is the convention for pql ticket housekeeping). Append!after the scope for a breaking change (feat(ipc)!: …). - Scope (optional but preferred): the subsystem the change lives in —
settings,vim,pty,git,plan, etc. Lower-case, no spaces. - Ticket ref: keep a trailing
(T-NNN)on the subject when the work has a ticket —feat(settings): category rail + navigation (T-447). - Body (optional): wrap at ~72 chars. Explain the why — the reason this change exists. The diff already shows the what; don't restate it in prose.
- No emojis. Anywhere.
- Don't reference the current task or flow (
for the v2.0 milestone,used by the canvas panel) — that context belongs in the PR description and rots as the repo evolves. - Naming: the project is
clide. The Flutter desktop app lives at the repo root; theclideCLI is a thin C client (native/clide-cli/). The supporter project ispql(referenced, not part of this repo). The archived Python implementation lives underlegacy/.
Logically-separated commits
Default to one logical change per commit, even when a lot of work lands in the tree at once. When there's a pile of uncommitted or untracked files:
- Read
git status+git difffirst — never stage the whole tree blind. - Triage: session vs pre-existing. Separate changes you made in this session from changes that were already dirty (or that a concurrent session is producing — this worktree can host several Claude sessions at once). Check the conversation history — if you didn't touch a file, it's not yours to stage. After grouping your own commits, surface any remaining modified or untracked files to the user and ask whether they belong in a commit. Never silently skip or silently include changes that aren't yours.
- Group by concern, not by file location. Typical concerns to separate:
- Bookkeeping —
.gitignore, editor/IDE config, lockfiles,go.sum/pubspec.lockupdates. - Documentation —
README.md,CLAUDE.md, D-records undergovernance/, design notes underdocs/. - General-purpose tooling / skills — things that aren't project-specific (reusable skills, shared scripts).
- Project-specific conventions — this repo's own rules.
- Feature or subsystem — one cohesive change per commit; a CLI change and an app change for the same feature can land together, but two unrelated features should split.
- Layer changes — Flutter app,
clideCLI (native/clide-cli/), IPC server, pql wrapper, canvas driver, git panel — separate concerns; prefer separate commits when the changes are independent.
- Bookkeeping —
- Sequence the commits so each one is cleanly scoped, but don't obsess about whether each intermediate commit "works" — for scaffolding PRs it's fine if the full picture only snaps together at the end.
- Prefer many small focused commits over one large mixed one — a reviewer can read, revert, or cherry-pick a focused commit; they can't do any of those to a blob.
- Use
git add <specific paths>— nevergit add -Aorgit add .when splitting, or you'll sweep in the next commit's work by accident. - Verify between commits with
git statusandgit log -1to confirm the split landed as intended.
Corollary: if a commit's subject line needs the word "and" to be accurate, it probably should have been two commits.
Changelog discipline
This repo follows Keep a Changelog 1.1.0. Every user-visible commit must touch CHANGELOG.md under the ## [Unreleased] section, in the appropriate subsection:
- Added — new features or capabilities.
- Changed — changes to existing functionality.
- Deprecated — soon-to-be-removed features.
- Removed — now-removed features.
- Fixed — bug fixes.
- Security — vulnerability fixes.
Entries should be short imperative phrases that describe user-facing impact — not implementation detail. "Added sidecar PTY support for terminal pane" beats "Added internal/pty/session.go."
Be concise — this is the rule, not a suggestion
CHANGELOG entries must be one or two short sentences. Hard cap: 60 words per bullet, enforced by the pre-push gate — verify before committing with make changelog-gate (run the make target, not the script it wraps). Aim for 30 or under; if you can't say it in one line wrapped at ~75 columns, you're writing the wrong document.
The CHANGELOG is read by humans scanning for what changed between two versions. It is not the place for the rationale, the probe results, the implementation detail, the behavior-change deep dive, or the "see also" cross-references. Those belong in:
- the commit message body — explain why, list evidence, name the trade-offs;
- a D-record / decision document — durable architectural rationale;
- the ticket / PR description — work-context and review notes.
Hard rules:
- No multi-paragraph bullets. One paragraph max. If you reach for a blank line inside a bullet, stop and split or trim.
- No "Behavior change:" / "Side benefit:" / "Note:" sub-headers inside a bullet. Those are essay structure; put them in the commit message.
- No probe numbers, latency stats, or %-coverage deltas in entries. ("hit 95% target" is fine; "0 hangs in 300 spawns vs ~5% before" is commit-body material.)
- No nested function/file lists inside parentheses. If you find yourself writing
(foo, bar, baz, …)for more than 3 items, just say "several X" and trust the diff. - Don't restate the title in the body. A bullet is its own title.
Calibration — match the existing entries in CHANGELOG.md. Open it, look at five recent bullets, write to that length. If your draft is visibly bigger than its neighbors, trim until it isn't.
Good:
- Mouse wheel scrolling in Claude pane — converts scroll events to PgUp/PgDown so TUI apps scroll naturally.
Bad (verbose; commit-body material leaked in):
- PTY spawning switched from
forkpty()toposix_openpt()+posix_spawn()(T-96).forkptycallsfork()underneath, which is unsafe in the multithreaded Dart VM: about 5% of spawns deadlocked in the child beforeexecvebecause libc locks held by ghost-threads remained "locked forever" in the forked child.posix_spawnusesvfork(glibc/musl/macOS), keeping the parent suspended untilexecvecompletes — no Dart code runs in the child. Probed: zero hangs in 300 sequential spawns vs ~5% before. Behavior change: missing executable / missing workingDirectory now surface as aPtyException…
Better:
- PTY spawning uses
posix_openpt+posix_spawninstead offorkpty— closes a ~5% deadlock window in the multithreaded Dart VM (T-96). Missing exe/cwd now throwPtyExceptionat spawn time.
What skips the changelog: pure bookkeeping commits that have no user-visible effect (typo fix in internal comment, .gitignore tweak, lint config change, reformatting). When in doubt, add an entry — the harm of an extra line is zero.
When a commit spans multiple entries (e.g. a feature that adds one thing and fixes another), add a line under each applicable subsection rather than cramming both into one.
Cutting a release
Cutting a release is its own commit. In a single commit:
- Move all entries from
## [Unreleased]under a new heading## [X.Y.Z] — YYYY-MM-DD. - Leave an empty
## [Unreleased]section at the top with its subsection skeleton ready. - Bump
pubspec.yamlversion:toX.Y.Z(drop the-devsuffix for the tag; re-add it on the next development commit if desired). - Run
make gen-build-infosoassets/licenses.yamlself.version:re-syncs from pubspec (it's auto-rewritten by every build but commit the fresh state). Stage the resulting diff alongside step 3. - Commit subject:
release vX.Y.Z. - Tag it. After the commit lands, run
make release— it verifies the version/changelog/clean-tree invariants, runs the full gate, and creates the annotatedvX.Y.Ztag. Thengit push origin main --follow-tagsto publish the commit and the tag together. Every released version must have a matchinggit tag— a CHANGELOG heading without a tag is an incomplete release (T-393: tagging had silently lapsed from v2.2.0 through v2.8.0). Don't hand-roll the tag;make releasekeeps the tag, gate, and version in lockstep. If you tag by hand, use an annotated tag (git tag -a vX.Y.Z -m "clide vX.Y.Z"); never push a release commit without its tag.
pubspec.yaml is the single source of truth for the version. Every make build/run/test target regenerates lib/src/build_info.g.dart (gitignored) and rewrites assets/licenses.yaml self.version: from it — so the Flutter app sees the current version everywhere without manual sync. Bumping pubspec.yaml and the changelog out of sync is the mistake this rule prevents.
Attribution trailer
Every commit ends with the Claude co-author line:
Co-Authored-By: Claude <noreply@anthropic.com>The model-identifier variant produced by the Claude Code harness (e.g. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>) is also accepted — don't rewrite it if the harness emits that form.
Message-file discipline
Pass commit messages via a message file so multi-line formatting survives
and the command stays inside the permission allowlist (command substitution
defeats the git commit prefix match and triggers permission prompts):
- Write the full message to
tmp/commit-msg.txtwith the Write tool. Repo-relative —tmp/is this repo's gitignored scratch dir (.gitignoreline 70), the same onemake runputs its control FIFO in. - Commit with it:
git commit -F tmp/commit-msg.txt- Delete it in the same turn. Nothing reads it back.
Watch the leading slash. In .gitignore, /tmp/ means this repo's
tmp/. In a shell command, /tmp/ is the system temp directory. Same five
characters, two different places, and the wrong one is shared: more than one
Claude session runs on this machine at a time across eleven repos, they all
reach for the same obvious name, and a fixed /tmp/commit-msg.txt gets
overwritten mid-turn by a session working somewhere else. The commit that lands
then carries another repo's message. This has been observed. Write the path
without the leading slash and the problem cannot happen.
Every scratch file goes there, not just commit messages: long ticket bodies
passed with --file, throwaway probe scripts. None of them is an artefact —
nothing ever reads them back — so none needs a stable name, and never put one
inside .git/, which is git's own state.
Fallback only: the HEREDOC-in-substitution form
(git commit -m "$(cat <<'EOF' … EOF)") works but prompts for permission —
use it only when writing a file is impossible. Never pass multi-line messages
via -m "line1\nline2" or multiple -m flags — Git's behavior differs
between shells and quoting regimes and the trailer can end up in the wrong
place.
What not to commit
.envand any*.env.local— see.gitignore..claude/settings.local.json— user-specific Claude Code settings, ignored.- Build artefacts:
/build/(Flutter output),/.dart_tool/— gitignored. - SQLite index files (
*.sqlite,*.sqlite-wal,*.sqlite-shm,*.db) — caches generated against local repos; must never land here. Gitignored defensively. - Coverage / test output (
*.out,coverage.*,*.test) — gitignored.
Don't hand-manage .pql/changelog
The pre-commit hook exports the pql ticket DB and auto-stages .pql/changelog/ on every commit. Don't git add .pql/changelog yourself and don't write a dedicated "flush the export" commit — just make your normal commit and the hook sweeps the ticket state in. The only thing to remember: a turn that files/changes a ticket but makes zero commits never fires the hook, so the change won't persist (and a later branch switch can drop it). The fix is simply to make a commit — you don't need to touch .pql/changelog.
Safety reminders (reinforced from the global Claude Code protocol)
- Never
--no-verify. If a pre-commit hook fails, fix the underlying issue and create a new commit. - Never
--amenda commit unless the user explicitly asks. A failed-hook commit didn't land, so amending would overwrite the previous commit and lose work. - Never force-push to
mainormaster. Warn the user if they ask. - When staging, prefer naming specific files over
git add -A/git add .— those can sweep in secrets or unintended files. git statusbefore staging,git diff --stagedbefore committing,git log -1after committing to confirm.
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.

