git-workflow
БесплатноБез исполняемых скриптовНе проверенGit workflow automation for Laravel and JavaScript projects. Covers conventional commits, semantic versioning, changelog generation, release workflows, branch…
от nasrulhazim★ 26 звёзд на GitHubОб этом скилле
Git Workflow
Automate and standardise git workflows — from commit messages to releases — for Laravel and JavaScript projects.
Command Reference
| Command | Description |
|---|---|
/git init-conventions |
Set up conventional commits + commitlint + hooks in a project |
/git commit |
Generate conventional commit message from staged changes |
/git changelog |
Generate/update CHANGELOG.md from git history |
/git release |
Version bump, changelog, tag, GitHub Release |
/git branch-strategy |
Recommend and scaffold branch strategy |
/git hooks |
Set up pre-commit hooks (CaptainHook for PHP, husky for JS) |
/git pr-template |
Generate PR template + review checklist |
/git ignore |
Generate .gitignore + .gitattributes by project type |
1. /git init-conventions — Conventional Commits Setup
Set up conventional commits tooling in an existing project.
Conventional Commits Specification
Format:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Allowed Types
| Type | SemVer Impact | When to Use |
|---|---|---|
feat |
MINOR | New feature or capability |
fix |
PATCH | Bug fix |
docs |
— | Documentation only |
style |
— | Formatting, whitespace, semicolons |
refactor |
— | Code restructure without behaviour change |
perf |
PATCH | Performance improvement |
test |
— | Adding or updating tests |
build |
— | Build system or dependency changes |
ci |
— | CI configuration changes |
chore |
— | Maintenance tasks |
revert |
varies | Reverts a previous commit |
Laravel Scopes
Use scopes to identify the affected area:
auth— Authentication, authorization, guards, policiesapi— API routes, controllers, resources, middlewareui— Blade, Livewire, Flux components, frontenddb— Migrations, seeders, factories, query changesconfig— Configuration files, environment variablestest— Test files and test utilitiesci— GitHub Actions, deployment scriptsmodel— Eloquent models, relationships, scopesroute— Route definitions, middleware assignmentmiddleware— HTTP middleware classes
Breaking Changes
Signal breaking changes with either:
!after type/scope:feat(api)!: change pagination response formatBREAKING CHANGE:footer:
feat(api): change pagination response format
BREAKING CHANGE: Pagination now returns `meta.total` instead of `total`.
Consumers must update response parsing logic.
Both trigger a MAJOR version bump.
Setup Steps
- PHP/Laravel projects — install CaptainHook for commit-msg validation:
composer require --dev captainhook/captainhook captainhook/hook-installer
vendor/bin/captainhook install
Add commit-msg hook to captainhook.json:
{
"commit-msg": {
"actions": [
{
"action": "\\CaptainHook\\App\\Hook\\Message\\Action\\Regex",
"options": {
"regex": "#^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\\(.+\\))?!?:\\s.{1,72}$#"
}
}
]
}
}
- JS/Node projects — install commitlint + husky:
npm install --save-dev @commitlint/cli @commitlint/config-conventional husky
npx husky init
echo "npx --no -- commitlint --edit \$1" > .husky/commit-msg
Create commitlint.config.js:
export default {
extends: ['@commitlint/config-conventional'],
rules: {
'scope-enum': [2, 'always', [
'auth', 'api', 'ui', 'db', 'config', 'test', 'ci',
'model', 'route', 'middleware',
]],
},
};
See references/conventional-commits.md for the full specification and examples.
2. /git commit — Commit Message Generation
Generate a conventional commit message from staged changes.
Workflow
- Read the staged diff:
git diff --cached --statandgit diff --cached - Classify the change type from the diff content
- Detect the scope from file paths (e.g.,
app/Http/Middleware/→middleware) - Generate the commit message with appropriate type, scope, subject, and body
Scope Detection Rules
| Path Pattern | Scope |
|---|---|
app/Models/ |
model |
app/Http/Controllers/Api/ |
api |
app/Http/Middleware/ |
middleware |
app/Policies/, app/Http/Controllers/Auth/ |
auth |
resources/views/, resources/js/ |
ui |
database/migrations/, database/seeders/ |
db |
config/ |
config |
tests/ |
test |
routes/ |
route |
.github/workflows/ |
ci |
Message Rules
- Subject line: imperative mood, lowercase, no period, max 72 characters
- Body: wrap at 80 characters, explain what and why, not how
- Footer: reference issues with
Closes #123orRefs #456
Co-Authored-By Support
When pair programming or AI-assisted development, add the footer:
feat(auth): add two-factor authentication support
Implement TOTP-based 2FA using pragmarx/google2fa-laravel package.
Co-Authored-By: Name <[email protected]
Установить git-workflow в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл git-workflow?
Git workflow automation for Laravel and JavaScript projects. Covers conventional commits, semantic versioning, changelog generation, release workflows, branch strategies, pre-commit hooks, PR templates, and .gitignore scaffolding. Trigger: "set up git conventions", "generate commit message", "create changelog", "prepare release", "branch strategy", "set up git hooks", "create PR template", "generate gitignore". BM: "sediakan konvensyen git", "jana mesej commit", "buat changelog", "sediakan release", "strategi branch", "sediakan git hooks", "buat templat PR", "jana gitignore".
Как установить скилл git-workflow?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл git-workflow запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic