Command Palette

Search for a command to run...

Назад к скиллам
скилл № 55666

git

How the user's git preferences diverge from the harness's defaults -- commit messages, pull requests, merging, and cleanup after merges. Use this whenever you…

БесплатноБез исполняемых скриптов
maragudkот maragudk★ 30 звёзд на GitHub

Установить git в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

git

Most of git usage is what you already know, so depend on that. This skill is just a refinement.

Commit messages

  • Keep them concise and easily readable for someone who isn't intimately familiar with the change. The reader is a future teammate (or future you) skimming git log, not a reviewer studying the diff. Lead with what changed in plain language; skip implementation play-by-play, rationale chains, and trivia. If deeper context is worth capturing, that's what the diary is for -- see the diary skill -- not the commit message.
  • Always enclose code identifiers with backticks. Example: "Add html.UserPage component"
  • Always refer to Go code identifiers including the package name, like in html.UserPage above. Fields and methods on structs can be referred with model.User.Name.
  • Don't mention that you've updated tests, that's assumed.

Using gh

  • In a repository with both origin and upstream remotes, such as one made from a template, gh can resolve to the upstream repository when no default is set. gh pr create then fails with "No commits between main and ...", and commands like gh pr edit act on the upstream repository's pull request instead. Check with gh repo set-default --view before the first gh command, and either set the default (gh repo set-default <owner>/<repo>) or pass -R <owner>/<repo>.

Pull request descriptions

  • Don't include sections that mirror what CI reports. Test Plan, Quality Gates, "ran build/lint/tests, all green" status -- skip them all. CI is the source of truth; freezing a snapshot into the PR body is noise.
  • Skip the "## Summary" header too -- just write the bullet points directly.
  • Before merging, refresh the PR title and description so they match what actually shipped. A branch drifts as review feedback lands, leaving a title or body written for the first commit stale.

Screenshots for pull requests

  • A PR with user-facing changes gets screenshots of them. Don't upload them to GitHub; publish them as a private Artifact in the session instead, one Artifact per PR.
  • Build a single HTML page titled after the PR, with a short heading per image saying what it shows, and the images embedded as data URIs (the Artifact sandbox blocks external image URLs). Keep the total page under 16 MB; downscale or JPEG-encode large captures if needed.
  • Publish it with the Artifact tool. Artifacts are private by default; don't share it more widely unless asked.
  • Put a ## Screenshots section in the PR description linking to the Artifact URL, rather than embedding images in the body.
  • Redeploy to the same file path (same URL) when screenshots change during review, so the link in the PR stays valid.

Merging pull requests

  • Merge only on an explicit, standalone instruction that names the PR ("merge #123"). A "yes" to a question that bundled the merge with something else, a conditional ("merge once CI is green"), or an earlier grant on a different PR is not one -- ask again, on its own, naming the PR, and wait. Every PR is reviewed by a person first.
  • Even with that instruction, merge only after the checks have run and passed. Confirm that the PR has checks (gh pr checks <n>) and that every one passed. An empty list means the checks haven't registered yet, never that they passed, so count them against the jobs CI runs. Don't put a pipe between a check and the command that depends on it (gh pr checks <n> | tail -5 && gh pr merge ...): a pipeline's exit status is that of its last command, so a failed check reads as success.
  • Prefer merge commits: gh pr merge --merge. Merge settings vary by repo -- some disallow squash merging entirely, some still use it -- so don't reach for --squash by default; if a merge method is rejected, check the repo's recent history for what it actually uses.

Cleaning up after a merge

Always clean up local state after work merges -- whether through a merged pull request or a local merge into the main branch, in a repo that commits straight to main. First confirm the merge actually happened (gh pr view <n> --json state shows MERGED, or the branch is in the main branch's history): after a refused or failed merge, the branch may be the only copy of the work.

Once the merge is confirmed, removing the worktree and the merged local and remote branches is part of finishing the work, so don't ask the user about it. If a tool or command balks because the worktree changed branch or has commits its starting point lacks, check for yourself that every commit is on the main branch and nothing is uncommitted, then go ahead; ask only if something isn't merged or is uncommitted.

  • Pull the main branch in the project directory, if it tracks a remote.
  • Remove any worktree used for the work (git worktree remove <path>).
  • Delete the merged local branches.

Remove only what the work created; other agents may share the repository. Don't leave stale branches and worktrees lying around for the next session to trip ove

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл git?

How the user's git preferences diverge from the harness's defaults -- commit messages, pull requests, merging, and cleanup after merges. Use this whenever you commit, write a commit message, work with pull requests, or merge a branch -- not just when explicitly asked to "commit". Where this skill and your default git habits disagree, this skill wins.

Как установить скилл git?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл git запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить git с