Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

git-workflow

БесплатноБез исполняемых скриптовНе проверен

Git workflow automation for Laravel and JavaScript projects. Covers conventional commits, semantic versioning, changelog generation, release workflows, branch…

nasrulhazimот 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, policies
  • api — API routes, controllers, resources, middleware
  • ui — Blade, Livewire, Flux components, frontend
  • db — Migrations, seeders, factories, query changes
  • config — Configuration files, environment variables
  • test — Test files and test utilities
  • ci — GitHub Actions, deployment scripts
  • model — Eloquent models, relationships, scopes
  • route — Route definitions, middleware assignment
  • middleware — HTTP middleware classes

Breaking Changes

Signal breaking changes with either:

  1. ! after type/scope: feat(api)!: change pagination response format
  2. BREAKING 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

  1. 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}$#"
        }
      }
    ]
  }
}
  1. 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

  1. Read the staged diff: git diff --cached --stat and git diff --cached
  2. Classify the change type from the diff content
  3. Detect the scope from file paths (e.g., app/Http/Middleware/ → middleware)
  4. 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 #123 or Refs #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]
Полный SKILL.md на GitHub

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

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

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

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

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

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

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

Вложенные файлы

references/branch-strategies.mdreferences/conventional-commits.mdreferences/hooks-and-templates.md

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), без исполняемых скриптов.

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

Сравнить git-workflow с