К основному содержанию
скилл CX Codex

commit-pr · zaxbyhub, opencode — скилл для Claude Code: безопасный коммит и PR

Скилл commit-pr проверяет код перед пушем, создаёт конвенциональные коммиты и оформляет PR-описание. Включается при подготовке изменений к отправке.

MIT ★ 539 обновлён 2026-10-29

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add ZaxbyHub/opencode-swarm --skill commit-pr -a claude-code
Открыть на GitHub

Что делает commit-pr

Скилл проводит вас через шесть шагов: проверка рабочей директории, обнаружение тестов и линтеров проекта, запуск проверок, коммит с правильным форматом сообщения, безопасный пуш и оформление PR. На каждом этапе скилл опирается на конвенции самого проекта — ищет Makefile, package.json, .github/workflows/, если он существует, или файлы конфигурации сборщика.

Внутри скилла встроена защита от типичных ошибок: перед пушем проверяется, что вы на отдельной ветке, а не на main или master; при пуше используется флаг --force-with-lease вместо опасного --force; в коммит не попадают node_modules, .env, бинарные артефакты или другие сгенерированные файлы. Если в проекте есть CONTRIBUTING.md или собственный PR-шаблон, скилл отдаёт приоритет локальным правилам.

Скилл работает на Claude Code, Codex и OpenCode. Для каждого платформы нужно установить отдельно через npx skills add.

Какие задачи решает

  • убедиться, что тесты проходят перед пушем
  • написать коммит в формате conventional commits
  • не закоммитить секреты и сгенерированные файлы
  • заполнить PR-описание с ссылкой на задачу
  • выбрать правильный удалённый репозиторий для пуша

Примеры запросов агенту

  • Помоги мне закоммитить эти изменения и открыть PR
  • Проверь, что всё готово к пушу, и создай pull request
  • Я хочу запустить тесты и, если пройдут, запушить ветку

Как установить commit-pr

1Через Skills CLI (Vercel)

npx skills add ZaxbyHub/opencode-swarm --skill commit-pr -a claude-code

2Вручную: положить файлы

~/.claude/skills/commit-pr/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/commit-pr/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о commit-pr

Как установить commit-pr на Claude Code?

Выполни команду npx skills add ZaxbyHub/opencode-swarm --skill commit-pr -a claude-code. Скилл будет доступен в ~/.claude/skills/commit-pr/SKILL.md.

Что делает commit-pr?

Скилл проводит через весь цикл от проверки кода до открытия PR: запускает тесты и линтеры проекта, защищает от коммита секретов и артефактов, пишет сообщение коммита в правильном формате и заполняет описание PR.

Может ли скилл работать с моим проектом, если там собственные правила коммитов?

Да. Если в проекте есть CONTRIBUTING.md, PR-шаблон или другое руководство, скилл отдаёт ему приоритет над общими правилами.

Исходный текст

SKILL.md · MIT
---
name: commit-pr
description: >
  Apply when committing, pushing, opening or updating a pull request, or closing
  out CI. A portable, project-agnostic commit and PR workflow: verify before you
  push, write conventional commits and a clear PR body, and never commit
  generated or secret files.
metadata:
  audience: swarm-plugin
  effort: medium
---

# Commit & PR Protocol (portable)

## Graph-first evidence contract

Before publication, use `repo_map` `diff_context` and `impact_cone` as a final drift check, then verify the direct source, Git diff, and tests. Graph evidence is advisory only. If freshness is stale or inconclusive, confidence is low, source is missing, the language is unsupported/dynamic, the graph is absent, or an action fails, publication decisions rely on the direct evidence.

A project-agnostic workflow for landing a change safely. It makes no assumptions
about the language, build tool, or hosting provider — discover each project's
own conventions and follow them. Do every step in order.

> If the repository ships its own commit/PR contract (a `CONTRIBUTING.md`, a
> pull-request template, a contributor-guide file, or a project-specific
> commit-pr skill), that contract wins over this generic guidance. Read it first.

## Step 0 — Working-tree hygiene

1. `git status` and `git diff` — know exactly what you are about to commit.
2. Confirm you are on a feature branch, not the default branch. If you are on
   `main`/`master`, create a branch first.
3. Do not stage generated output, dependency directories, local caches, or
   secrets (build/`dist` output, `node_modules`/`target`/`vendor`, `.env`,
   credentials, keys). If any are tracked or unignored, fix `.gitignore` instead
   of committing them.

## Step 1 — Discover the project's checks

Find the project's own validation commands rather than guessing:

- A package manifest's script section (e.g. `package.json` `scripts`,
  `Makefile` targets, `pyproject.toml`, `Cargo.toml`, `justfile`, `Taskfile`).
- CI workflow files under `.github/workflows/` (or the provider's config) —
  these are the checks that must pass to merge.

Run the project's build, test, lint, type-check, and format checks — whatever
exists. Pin tool versions to what the project declares so local results match
CI. If a check fails, fix the cause; do not weaken, skip, or delete the check.

## Step 2 — Verify before you push

Run the discovered checks and confirm they pass. Report the exact commands and
their results — never claim a check passed without having run it. Passing tests
mean the change is *plausible*, not automatically *correct*: make sure the change
actually does what the task intended.

## Step 3 — Commit

Write a clear, conventional commit message:

- Title: `<type>(<scope>): <summary>` where `<type>` is one of `feat`, `fix`,
  `perf`, `refactor`, `docs`, `test`, `build`, `ci`, `chore`, `revert`.
- Keep the title short and imperative; put detail in the body.
- One logical change per commit where practical.

## Step 4 — Push

1. Identify the correct remote. If the repo has several remotes, push to the one
   the PR targets (the upstream you are contributing to), not an unrelated fork.
2. `git push -u <remote> <branch>` for a new branch.
3. If a push is rejected because you rebased, use `git push --force-with-lease`
   — never a plain, unconditional force push. `--force-with-lease` refuses to
   overwrite commits the remote gained since your last fetch, so it cannot
   silently clobber a teammate's work.

## Step 5 — Open or update the PR

Search the repo for a PR template
(`.github/PULL_REQUEST_TEMPLATE.md` or `.github/PULL_REQUEST_TEMPLATE/`). If one
exists, fill in its sections. Otherwise write a body with at least:

- **Summary** — what changed and why.
- **Test plan** — the checks you ran and their results.
- A linking keyword (`Closes #<issue>`) when the PR resolves an issue.

Use a PR title in the same conventional-commit form as your commit.

Before generating the PR body, check if `.swarm/issue-reference.json` exists. If it
does and contains a `number` field, auto-populate `Closes #<number>` as the first line
of the PR body. If the file does not exist, fall back to `Closes #<issue-number>`.

## Step 6 — Close out CI

After the PR is open, watch its checks. If CI fails, read the logs, reproduce
locally, fix the real cause, and push again. A PR is not done until its required
checks are green and any review feedback is addressed. Do not merge over failing
required checks or disable a check to go green.

If this session is running an issue trace (`/swarm issue --trace`), call
`record_issue_publication` (issue number, PR number, canonical PR URL, HEAD sha)
right after the PR is opened so the issue-trace workflow can reach its terminal
`published` state — without it the trace stays at `publication_handoff` and is NOT
considered resolved.

## Contract addendum (2026-10-12)

- **Publication-time re-derivation.** As the LAST step before `gh pr create`
  / `pr edit`, re-derive every claim in the body from the final tree: PR head
  SHA, test counts, file lists, closure evidence. A body drafted earlier is
  stale by construction — the head moves with every amend — and a stale
  `PR head:` line in particular is guarded by no validator.

© ZaxbyHub · MIT · ZaxbyHub/opencode-swarm

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

Все скиллы по теме «Git и GitHub» →

Сначала — commit-pr от других авторов.

commit-pr ZaxbyHub Скилл commit-pr для Claude Code и Codex требует от агента пройти чек-лист до коммита, пуша и создания PR. CX Codex +1 ★ 539звёзд репо commit-pr ZaxbyHub Скилл commit-pr ведёт работу с коммитами и pull request: от подготовки публикации до проверки CI и завершения PR. Он пригодится при выпуске изменений по GitHub issue. CX Codex +1 ★ 539звёзд репо commit-pr ZaxbyHub Скилл commit-pr для Claude Code ведёт агента через проверку изменений, подготовку коммита и публикацию PR. Процесс следует правилам релизного процесса opencode-swarm. CX Codex +1 ★ 539звёзд репо commit SeifBenayed Собирает git-коммит с сообщением в стиле conventional commits. CX Codex +1 ★ 116звёзд репо git-commit-helper davila7 Читает git diff --staged и составляет коммит-сообщение по формату Conventional Commits. Срабатывает каждый раз после Bash-инструмента и пишет лог в ~/.claude/git-commit-helper.log. CX Codex +1 7 093установок git-commit официальный github Доводит правки до коммита: читает диф, отбирает файлы, пишет сообщение по Conventional Commits и запускает git commit. CX Codex +1 47 165установок smart-commit Rohit Ghumare Скилл smart-commit гоняет линт, тайпчек и тесты перед коммитом, просматривает стейдж на мусор и собирает сообщение в формате conventional commits. CX Codex +1 ★ 2 966звёзд репо conventional-commit marcelorodrigo Заставляет их писать коммиты по спецификации Conventional Commits: тип, scope, императив в заголовке. CX Codex +1 964установок create_git_diff_commit danielmiessler Промпт create_git_diff_commit генерирует команды git add и сообщения коммитов по diff репозитория в формате Conventional Commits. GP ChatGPT ★ 44 690звёзд репо

Из того же набора121

Весь набор →
qa-reviewer Субагент qa-reviewer для строгого ревью пуллреквестов перед слиянием. Проверяет логику, безопасность, обработку ошибок, стиль и покрытие тестами без изменения кода. CX Codex +1 ★ 539звёзд репо durable-session-state Скилл durable-session-state сохраняет планы, решения, результаты проверок и вердикты ревью в файлах проекта. Он помогает продолжить долгую задачу после сжатия контекста или передачи работы. CX Codex +1 ★ 539звёзд репо swarm-pr-feedback Скилл swarm-pr-feedback для Claude Code собирает известные замечания к PR в реестр, проверяет каждое по коду и только после этого вносит правки. Разбирает замечания ревью, сбои CI и конфликты. CX Codex +1 ★ 539звёзд репо swarm-pr-feedback Скилл swarm-pr-feedback для автоматической обработки замечаний к pull request, падений CI и конфликтов слияния перед публикацией правок. CX Codex +1 ★ 539звёзд репо test-file-split Скилл test-file-split разбивает разросшийся тест-файл на части по блокам describe(), когда тот подходит к лимиту в 500 строк или уже перевалил его. CX Codex +1 ★ 539звёзд репо fork-pr-operations Скилл fork-pr-operations инструктирует агента по работе с пулл-реквестами из форков: одобрение воркфлоу в GitHub Actions, безопасный rebase и сверка актуальности проверок CI. CX Codex +1 ★ 539звёзд репо parallel-work-check Скилл parallel-work-check для Claude Code сравнивает локальное состояние существующей ветки с удалённым и проверяет новые коммиты. Помогает заметить параллельные изменения до начала правок. CX Codex +1 ★ 539звёзд репо design-docs Ведёт design-доки проекта: домен, техспеку, behavior-спеку, реестр section-ID и changelog. Запускается по заголовку [MODE: DESIGN_DOCS ...]. CX Codex +1 ★ 539звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой