git-workflow · oakoss — скилл для Claude Code: что делает и как установить
Скилл git-workflow помогает агенту выстраивать trunk-based разработку, оформлять conventional commits, настраивать пайплайны GitHub Actions и чистить историю Git.
MIT 149 установок ★ 29 обновлён 2026-08-17
npx skills add oakoss/agent-skills --skill git-workflow -a claude-codeЧто делает git-workflow
Скилл задаёт правила работы с репозиторием: короткоживущие ветки со сроком жизни до 48 часов, линейную историю через rebase и оформление коммитов по стандарту Conventional Commits в повелительном наклонении. Он описывает требования к предварительным проверкам перед слиянием (линтер, тесты, проверка типов и безопасности) и правила версионирования через Semantic Release или Changesets.
Внутри собраны шаблоны модульных CI/CD пайплайнов на GitHub Actions с переиспользуемыми воркфлоу и авторизацией через OIDC вместо статических токенов. Для исправления истории скилл ориентирует агента на безопасный git filter-repo вместо устаревшего git filter-branch, а при потере коммитов предлагает восстановление через git reflog, git cat-file и git fsck.
Работу с интерфейсом GitHub CLI скилл не охватывает — для этого у автора предусмотрен отдельный скилл github-cli.
Какие задачи решает
- настроить trunk-based модель ветвления и защиту главной ветки
- составить цепочку коммитов по спецификации Conventional Commits
- сконфигурировать модульные пайплайны GitHub Actions с OIDC
- восстановить потерянные коммиты через reflog и проверку объектов
Примеры запросов агенту
- Спланируй правила версионирования и ветвления для нового проекта
- Напиши переиспользуемый воркфлоу GitHub Actions для запуска тестов и линтера
- Помоги достать случайно удалённый коммит из git reflog
Как установить git-workflow
1Через Skills CLI (Vercel)
npx skills add oakoss/agent-skills --skill git-workflow -a claude-code2Вручную: положить файлы
~/.claude/skills/git-workflow/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/git-workflow/
1Через Skills CLI (Vercel)
npx skills add oakoss/agent-skills --skill git-workflow -a codex2Вручную: положить файлы
.agents/skills/git-workflow/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add oakoss/agent-skills --skill git-workflow -a cursor2Вручную: положить файлы
.cursor/skills/git-workflow/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install oakoss/agent-skills skills/git-workflow2Вручную: положить файлы
.github/skills/git-workflow/SKILL.md1Через Skills CLI (Vercel)
npx skills add oakoss/agent-skills --skill git-workflow -a gemini-cli2Командой платформы
gemini skills install https://github.com/oakoss/agent-skills --path skills/git-workflowВручную: положить файлы
.devin/skills/git-workflow/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add oakoss/agent-skills --skill git-workflow -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о git-workflow
Как установить git-workflow в Claude Code?
Выполните команду npx skills add oakoss/agent-skills --skill git-workflow -a claude-code. Конфигурация запишется по пути ~/.claude/skills/git-workflow/SKILL.md.
Что делает скилл git-workflow?
Он передаёт ИИ-агенту регламенты для работы с Git: правила именования веток, шаблоны Conventional Commits, практики rebase для линейной истории и схемы CI/CD пайплайнов.
Управляет ли скилл утилитой gh?
Нет, вызовы GitHub CLI вынесены в отдельный скилл github-cli. Этот скилл фокусируется исключительно на структуре Git-процессов, очистке репозитория и конфигурациях GitHub Actions.
Исходный текст
SKILL.md · MIT
--- name: git-workflow description: 'Designs git workflows covering branching strategies, trunk-based development, stacked changes, conventional commits, CI/CD pipelines, and repository hygiene. Use when setting up branching models, writing commit messages, configuring GitHub Actions, managing stacked PRs, cleaning stale branches, creating issue templates, or recovering lost commits.' license: MIT metadata: author: oakoss version: '1.1' user-invocable: false --- # Git Workflow Covers branching strategies, conventional commits, CI/CD automation, repository hygiene, and git internals. GitHub CLI usage is handled by a separate `github-cli` skill; this skill focuses on git workflow patterns and CI/CD configuration. ## Quick Reference | Area | Key Practice | | ----------- | --------------------------------------------------------- | | Branching | Trunk-based development with short-lived feature branches | | Commits | Conventional commits with imperative mood | | History | Linear history via rebase; squash noisy commits | | PRs | Small, stacked changes; no mega PRs | | Main branch | Always deployable; broken main is an emergency | | CI/CD | Modular GitHub Actions with reusable workflows | | Merging | Green CI + review required before merge | | Versioning | Semantic Release or Changesets (never manual) | | Branches | Max 48 hours lifespan; auto-prune stale/merged | | Secrets | OIDC Connect in pipelines; never hardcode tokens | | Signing | Sign commits with SSH or GPG keys for verified authorship | ## Branch Naming | Type | Use For | Example | | -------- | ------------------ | ---------------------- | | feat | New features | `feat/add-user-auth` | | fix | Bug fixes | `fix/login-redirect` | | chore | Maintenance | `chore/update-deps` | | docs | Documentation | `docs/api-reference` | | refactor | Code restructuring | `refactor/auth-module` | ## Conventional Commit Types | Type | Purpose | Version Bump | | ---------- | ------------------------------------- | ------------ | | `feat` | New features | Minor | | `fix` | Bug fixes | Patch | | `docs` | Documentation only | None | | `style` | Formatting, no logic changes | None | | `refactor` | Neither fix nor feature | None | | `perf` | Performance improvements | Patch | | `test` | Adding or correcting tests | None | | `build` | Build system or external dependencies | None | | `ci` | CI configuration changes | None | | `chore` | Tooling, maintenance, non-src changes | None | | `revert` | Revert a previous commit | Varies | Append `!` after type/scope for breaking changes (major version bump). ## Pre-Merge Checks All PRs require before merge: - Lint - Type check - Tests - Security scan - Review approval (human or automated) Auto-merge is acceptable for low-risk PRs when pipeline succeeds. ## Troubleshooting | Issue | Resolution | | -------------------------------------- | ---------------------------------------------------------------------------------- | | Merge conflicts on long-running branch | Rebase onto main frequently; break remaining work into new branch if over 48 hours | | Broken main branch | Treat as emergency; revert offending commit, then fix forward on a branch | | Lost commits or data recovery | Use git reflog and object inspection (`git cat-file`, `git fsck`) | | CI pipeline failures | Check reusable workflow versions; verify OIDC permissions | | Stacked PR conflicts after rebase | Restack entire chain from base; Graphite handles automatically with `gt restack` | | Large file accidentally committed | Use `git filter-repo` to remove from history (not `git filter-branch`) | ## Common Mistakes | Mistake | Correct Pattern | | ----------------------------------------------------- | ------------------------------------------------------------- | | Keeping feature branches alive longer than 48 hours | Merge or rebase daily; break large work into stacked PRs | | Committing directly to main without branch protection | Enable branch protection rules requiring CI and review | | Using merge commits that clutter history | Rebase and squash to maintain linear history | | Hardcoding tokens in GitHub Actions workflows | Use OIDC Connect for authentication in CI/CD pipelines | | Creating monolithic CI workflows in a single file | Split into reusable workflows and composite actions | | `Fix bug` as commit message | `fix(scope): correct bug description` (conventional) | | `feat: Added feature` (past tense) | `feat: add feature` (imperative mood, lowercase) | | Using `git filter-branch` for history rewriting | Use `git filter-repo` (faster, safer, officially recommended) | | Pushing to main directly | Create feature branch first | | Unsigned commits in shared repositories | Configure commit signing with SSH or GPG keys | ## Delegation - **Audit repository branch hygiene and stale branches**: Use `Explore` agent to list and classify branch age and merge status - **Set up CI/CD pipelines with reusable workflows**: Use `Task` agent to create modular GitHub Actions configurations - **Design branching strategy for a new project**: Use `Plan` agent to evaluate trunk-based vs Git Flow based on team needs ## References - [branching-strategies.md](references/branching-strategies.md) -- Git Flow, GitHub Flow, GitLab Flow, One-Flow comparison and selection criteria - [trunk-based-development.md](references/trunk-based-development.md) -- Core principles, workflow steps, feature flags, and anti-patterns - [stacked-changes.md](references/stacked-changes.md) -- Stacked PRs concept, manual stacking, Graphite automation, best practices - [conventional-commits.md](references/conventional-commits.md) -- Commit format, types, scopes, breaking changes, and full workflow - [github-actions.md](references/github-actions.md) -- Reusable workflows, matrix testing, deployment environments, security - [git-internals.md](references/git-internals.md) -- Object model, SHA hashing, index, references, packfiles, garbage collection - [automation-scripts.md](references/automation-scripts.md) -- Branch pruning, semantic release, security scanning, stacked PR helpers - [issue-templates.md](references/issue-templates.md) -- Bug report, feature request, task, and minimal issue templates - [advanced-operations.md](references/advanced-operations.md) -- Commit signing, interactive rebase, worktrees, bisect, reflog recovery, and --force-with-lease
© oakoss · MIT · oakoss/agent-skills
Похожие скиллы
Все скиллы по теме «Git и GitHub» →Сначала — git-workflow от других авторов.