git-workflow · mindrally — скилл для Claude Code: что делает и как установить
Задаёт правила ведения репозитория: оформление коммитов по стандарту Conventional Commits, префиксы веток и подготовку пулл-реквестов. Пригодится для командной разработки.
npx skills add Mindrally/skills --skill git-workflow -a claude-codeЧто делает git-workflow
Скилл учит ИИ-агента соблюдать стандарты контроля версий в проекте. Он задаёт структуру сообщений по спецификации Conventional Commits с типами вроде feat или fix. Заголовок коммита не превышает 60 символов в повелительном наклонении. Текст пишется строчными буквами.
В правилах закреплено именование веток через kebab-case с префиксами вроде feature/ или bugfix/. Прямые коммиты в ветку main запрещены. Рабочий процесс предписывает синхронизировать изменения через git rebase и удалять ветки после слияния локально и на сервере.
Без строгой дисциплины в коммитах автогенерация версий теряет смысл, ведь скилл напрямую связывает типы коммитов с номерами SemVer.
Какие задачи решает
- сформулировать сообщение коммита по спецификации Conventional Commits
- подобрать имя и префикс для рабочей ветки в kebab-case
- настроить базовые глобальные параметры и алиасы
git config - подготовить описание для пулл-реквеста со ссылками на задачи
Примеры запросов агенту
- Сделай атомарный коммит для изменений в аутентификации по стандарту Conventional Commits.
- Создай новую ветку для исправления ошибки перенаправления логина по правилам скилла.
- Покажи команды для синхронизации текущей ветки с
mainчерез rebase.
Как установить git-workflow
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill git-workflow -a claude-code2Вручную: положить файлы
~/.claude/skills/git-workflow/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/git-workflow/
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill git-workflow -a codex2Вручную: положить файлы
.agents/skills/git-workflow/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill git-workflow -a cursor2Вручную: положить файлы
.cursor/skills/git-workflow/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills git-workflow2Вручную: положить файлы
.github/skills/git-workflow/SKILL.md1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill git-workflow -a gemini-cli2Командой платформы
gemini skills install https://github.com/Mindrally/skills --path git-workflowВручную: положить файлы
.devin/skills/git-workflow/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill git-workflow -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о git-workflow
Как установить git-workflow в Claude Code?
Выполните команду npx skills add Mindrally/skills --skill git-workflow -a claude-code. Файл скилла сохранится по пути ~/.claude/skills/git-workflow/SKILL.md.
Что делает скилл git-workflow?
Он задаёт ИИ-ассистенту правила оформления коммитов Conventional Commits, стратегии ветвления и рекомендации по оформлению пулл-реквестов.
Как этот скилл связан с версионированием SemVer?
Скилл привязывает типы коммитов к версиям: feat повышает минорную версию, fix обновляет патч, а пометка BREAKING CHANGE отвечает за мажорный релиз.
Исходный текст
SKILL.md · Apache-2.0
--- name: git-workflow description: Git conventions and workflow guidelines using Conventional Commits, branching strategies, and best practices for version control metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # Git Workflow Best Practices You are an expert in Git version control, following industry best practices for commits, branching, and collaboration workflows. ## Core Principles - Write clear, atomic commits that address single logical changes - Follow Conventional Commits specification for all commit messages - Use feature branches to isolate changes and enable easier code review - Keep branches short-lived and regularly sync with main branch - Never commit directly to main/master branch ## Conventional Commits Format Use the following format for all commit messages: ``` <type>[optional scope]: <description> [optional body] [optional footer(s)] ``` ### Commit Types - `feat`: A new feature (correlates with MINOR in SemVer) - `fix`: A bug fix (correlates with PATCH in SemVer) - `docs`: Documentation only changes - `style`: Changes that do not affect the meaning of the code (white-space, formatting) - `refactor`: A code change that neither fixes a bug nor adds a feature - `perf`: A code change that improves performance - `test`: Adding missing tests or correcting existing tests - `build`: Changes that affect the build system or external dependencies - `ci`: Changes to CI configuration files and scripts - `chore`: Other changes that don't modify src or test files - `revert`: Reverts a previous commit ### Commit Message Guidelines - Use lowercase letters in the entire body of the commit message - Keep the commit message title under 60 characters - Use imperative mood: "Add feature" not "Added feature" - Explain the *why* behind the change, not just *what* was changed - Reference related issues or tickets in the footer ### Examples ``` feat(auth): add OAuth2 authentication support Implement OAuth2 flow for Google and GitHub providers. This allows users to sign in with their existing accounts. Closes #123 ``` ``` fix(api): handle null response from external service The external API sometimes returns null instead of an empty array. Added null check to prevent TypeError in downstream processing. Fixes #456 ``` ## Branching Strategy ### Branch Naming Conventions Use descriptive, kebab-case branch names with prefixes: - `feature/` - New features (e.g., `feature/user-authentication`) - `bugfix/` - Bug fixes (e.g., `bugfix/login-redirect-loop`) - `hotfix/` - Urgent production fixes (e.g., `hotfix/security-patch`) - `release/` - Release preparation (e.g., `release/v2.1.0`) - `docs/` - Documentation updates (e.g., `docs/api-reference`) - `refactor/` - Code refactoring (e.g., `refactor/database-layer`) ### Workflow Guidelines 1. **Create feature branches from main/develop** ```bash git checkout main git pull origin main git checkout -b feature/new-feature ``` 2. **Keep branches up-to-date** ```bash git fetch origin git rebase origin/main ``` 3. **Make atomic commits** - Each commit should be a single, logical change - Commit early and often when code is in a stable state - Avoid mixing unrelated changes in a single commit 4. **Before merging** - Ensure all tests pass - Squash fixup commits if needed - Rebase onto latest main to resolve conflicts 5. **Clean up after merge** ```bash git branch -d feature/new-feature git push origin --delete feature/new-feature ``` ## Git Configuration Best Practices ### Useful Aliases ```bash git config --global alias.co checkout git config --global alias.br branch git config --global alias.ci commit git config --global alias.st status git config --global alias.lg "log --oneline --graph --decorate" ``` ### Recommended Settings ```bash git config --global pull.rebase true git config --global fetch.prune true git config --global diff.colorMoved zebra ``` ## Collaboration Guidelines ### Code Review Process 1. Create small, focused pull requests 2. Write clear PR descriptions explaining the changes 3. Link related issues and documentation 4. Request reviews from appropriate team members 5. Address feedback promptly and professionally 6. Squash commits when merging if history is messy ### Merge Strategies - **Merge commit**: Preserves full history, good for feature branches - **Squash and merge**: Combines all commits into one, cleaner main history - **Rebase and merge**: Linear history, requires clean commit history ### Conflict Resolution 1. Pull latest changes from target branch 2. Resolve conflicts locally 3. Test thoroughly after resolution 4. Commit with clear message explaining resolution ## Security Best Practices - Never commit sensitive data (passwords, API keys, tokens) - Use `.gitignore` to exclude sensitive files - Review diffs before committing - Use signed commits for verified authorship - Rotate any accidentally committed secrets immediately ## Integration with Semantic Versioning Conventional Commits integrate well with semantic versioning: - `feat`: triggers a MINOR version bump - `fix`: triggers a PATCH version bump - `BREAKING CHANGE`: triggers a MAJOR version bump This enables automated version determination and changelog generation.
© Mindrally · Apache-2.0 · Mindrally/skills
Похожие скиллы
Все скиллы по теме «Git и GitHub» →Сначала — git-workflow от других авторов.