/claude-toolkit:git-workflowfrom claude-toolkit
Automates git workflows for Laravel and JavaScript projects: conventional commits, semantic versioning, changelog generation, release workflows, branch strategies, pre-commit hooks, PR templates, and .gitignore scaffolding.
Ships in claude-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Automate and standardise git workflows — from commit messages to releases — for Laravel and JavaScript projects.
| 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 |
/git init-conventions — Conventional Commits SetupSet up conventional commits tooling in an existing project.
Format:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
| 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 |
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 classesSignal 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.
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}$#"
}
}
]
}
}
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.
/git commit — Commit Message GenerationGenerate a conventional commit message from staged changes.
git diff --cached --stat and git diff --cachedapp/Http/Middleware/ → middleware)| 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 |
Closes #123 or Refs #456When 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 changelog — Changelog GenerationGenerate or update CHANGELOG.md following the Keep a Changelog format.
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/),
and this project adheres to [Semantic Versioning](https://semver.org/).
## [Unreleased]
### Added
- feat commits
### Changed
- refactor, perf commits
### Deprecated
- commits noting deprecations
### Removed
- commits removing features
### Fixed
- fix commits
### Security
- security-related fix commits
## [1.2.0] - 2026-02-27
### Added
- ...
| Commit Type | Changelog Section |
|---|---|
feat | Added |
fix | Fixed |
refactor, perf | Changed |
revert | Removed or Changed |
docs, style, test, build, ci, chore | Omitted (unless notable) |
| Breaking change | Section header gets **BREAKING** prefix |
git describe --tags --abbrev=0git log <tag>..HEAD --format="%H %s"## [Unreleased]Add comparison links at the bottom of the changelog:
[Unreleased]: https://github.com/owner/repo/compare/1.2.0...HEAD
[1.2.0]: https://github.com/owner/repo/compare/1.1.0...1.2.0
/git release — Release WorkflowAutomate version bumps, changelog updates, tagging, and GitHub Releases.
Given a version MAJOR.MINOR.PATCH:
BREAKING CHANGE: footer or ! in type)feat type)fix, perf types)Pre-release versions: 1.0.0-alpha.1, 1.0.0-beta.1, 1.0.0-rc.1
Read the current version from:
composer.json → version field, or latest git tagpackage.json → version fieldgit describe --tags --abbrev=0Tags use bare semver without v prefix: 1.0.0, 1.2.3, 2.0.0-beta.1.
git tag -a 1.2.0 -m "1.2.0"git tag -a v1.2.0 -m "v1.2.0"composer.json and/or package.jsonchore(release): X.Y.Zgit tag -a X.Y.Z -m "X.Y.Z"git push && git push --tagsgh release create:gh release create X.Y.Z \
--title "X.Y.Z" \
--notes-file CHANGELOG_EXCERPT.md \
--latest
For alpha/beta/rc releases:
gh release create X.Y.Z-beta.1 \
--title "X.Y.Z Beta 1" \
--prerelease
/git branch-strategy — Branch StrategyRecommend and scaffold a branching strategy based on team size and release cadence.
| Team Size | Release Frequency | Recommended Strategy |
|---|---|---|
| 1–3 | Continuous | GitHub Flow |
| 1–3 | Scheduled | GitHub Flow |
| 4–10 | Continuous | Trunk-based development |
| 4–10 | Scheduled | Git Flow |
| 10+ | Continuous | Trunk-based development |
| 10+ | Scheduled | Git Flow |
feature/SHORT-DESCRIPTION # New features
fix/SHORT-DESCRIPTION # Bug fixes
chore/SHORT-DESCRIPTION # Maintenance tasks
release/X.Y.Z # Release preparation (Git Flow)
hotfix/SHORT-DESCRIPTION # Production hotfixes (Git Flow)
Rules:
feature/PROJ-123-add-loginSet up branch protection via gh CLI:
# Protect main branch
gh api repos/{owner}/{repo}/branches/main/protection \
--method PUT \
--input - <<EOF
{
"required_status_checks": {
"strict": true,
"contexts": ["tests", "lint"]
},
"enforce_admins": true,
"required_pull_request_reviews": {
"required_approving_review_count": 1,
"dismiss_stale_reviews": true
},
"restrictions": null
}
EOF
See references/branch-strategies.md for detailed strategy diagrams and guidance.
/git hooks — Pre-commit HooksSet up pre-commit hooks to enforce code quality before commits are created.
Install and configure CaptainHook:
composer require --dev captainhook/captainhook captainhook/hook-installer
vendor/bin/captainhook install
Full captainhook.json configuration:
{
"pre-commit": {
"actions": [
{
"action": "vendor/bin/pint --test --dirty",
"conditions": [
{ "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileChanged\\Any", "args": ["*.php"] }
]
},
{
"action": "vendor/bin/phpstan analyse --no-progress --memory-limit=512M",
"conditions": [
{ "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileChanged\\Any", "args": ["*.php"] }
]
},
{
"action": "vendor/bin/pest --dirty",
"conditions": [
{ "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileChanged\\Any", "args": ["*.php"] }
]
}
]
},
"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}$#"
}
}
]
},
"pre-push": {
"actions": [
{
"action": "vendor/bin/pest --parallel"
}
]
}
}
npm install --save-dev husky lint-staged
npx husky init
Create .husky/pre-commit:
npx lint-staged
Add to package.json:
{
"lint-staged": {
"*.{js,ts,jsx,tsx}": ["eslint --fix", "prettier --write"],
"*.{css,scss}": ["prettier --write"],
"*.{json,md}": ["prettier --write"]
}
}
See references/hooks-and-templates.md for complete configuration templates.
/git pr-template — PR TemplateGenerate a pull request template and review checklist.
Create .github/pull_request_template.md:
## Summary
<!-- Describe what this PR does and why -->
## Type of Change
- [ ] feat: New feature
- [ ] fix: Bug fix
- [ ] refactor: Code restructure
- [ ] docs: Documentation
- [ ] test: Test coverage
- [ ] chore: Maintenance
## Changes
<!-- List the key changes -->
-
## Testing
- [ ] Tests pass locally (`php artisan test` / `npm test`)
- [ ] New tests added for new functionality
- [ ] Manual testing completed
## Checklist
- [ ] Code follows project conventions
- [ ] Self-reviewed the diff
- [ ] No `dd()`, `dump()`, `console.log()` left behind
- [ ] Database migrations are reversible
- [ ] No secrets or credentials committed
- [ ] Documentation updated if needed
## Related Issues
Closes #
| Label | Colour | When to Apply |
|---|---|---|
feature | #0E8A16 | New functionality |
bugfix | #D93F0B | Bug fix |
breaking | #B60205 | Breaking change |
docs | #0075CA | Documentation only |
dependencies | #EDEDED | Dependency updates |
gh api repos/{owner}/{repo} \
--method PATCH \
--field allow_squash_merge=true \
--field allow_merge_commit=false \
--field allow_rebase_merge=false \
--field squash_merge_commit_title=PR_TITLE
/git ignore — .gitignore & .gitattributesGenerate .gitignore and .gitattributes files by project type.
/node_modules
/public/build
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
.env.production
.phpunit.result.cache
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
/.fleet
/.idea
/.vscode
/.claude
/vendor
/node_modules
/.phpunit.result.cache
/.phpunit.cache
/coverage
/.idea
/.vscode
/.claude
composer.lock
.env
node_modules/
dist/
build/
coverage/
.env
.env.local
.env.*.local
*.log
.DS_Store
/.idea
/.vscode
/.claude
# Auto detect text files and perform LF normalisation
* text=auto
# PHP
*.php text diff=php
# Web
*.css text diff=css
*.html text diff=html
*.js text
*.ts text
*.json text
*.md text
*.yaml text
*.yml text
# Graphics (binary)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.svg text
# Archives (binary)
*.zip binary
*.gz binary
*.tar binary
# Fonts (binary)
*.woff binary
*.woff2 binary
*.ttf binary
*.eot binary
# Export ignore (for git archive / --prefer-dist)
/.github export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/phpstan.neon export-ignore
/phpunit.xml export-ignore
/pint.json export-ignore
/rector.php export-ignore
/CLAUDE.md export-ignore
See references/hooks-and-templates.md for additional templates.
| Rationalization | Reality |
|---|---|
| "I'll squash it all into one commit at the end" | The end is when you have forgotten why each change was made. Commit at each working point. |
| "'fix stuff' is fine, the diff explains it" | The diff says what changed. Only the message can say why, and why is what the next reader needs. |
| "Force push is fine, it's my branch" | Until someone reviewed it, based work on it, or you typed the wrong branch name. Use --force-with-lease. |
| "I'll just commit the .env, it's a private repo" | Repos become public, get forked, and get cloned to laptops. A committed secret is a rotated secret. |
| "Rebasing rewrites history, that's dangerous" | Rebasing your own unpushed branch is the safest way to keep history readable. Rebasing shared history is the dangerous one. |
| "This PR is big but it's all one feature" | A 1500-line PR gets an "LGTM", not a review. Split it and get an actual read. |
| "Merge commits pollute the log" | Sometimes. But a fake-linear history that hides an integration failure is worse than a merge commit. |
| "I'll clean up the branches later" | Two hundred stale branches later, nobody can tell which are live. Delete on merge. |
git push --force without --with-lease.env, *.pem, id_rsa, .DS_Store, vendor/ or node_modules/ in a diffmain on a repo with a PR workflowcomposer.json / plugin.jsongit status is clean)main and conflicts were resolved deliberately| File | Read When |
|---|---|
references/conventional-commits.md | Setting up conventional commits, generating commit messages, or validating commit format |
references/branch-strategies.md | Choosing or scaffolding a branch strategy, setting up branch protection |
references/hooks-and-templates.md | Configuring pre-commit hooks, PR templates, .gitignore, or .gitattributes |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub nasrulhazim/claude --plugin claude-toolkit43 skills in this plugin
/business-cardSVG business card designer that takes contact details and brand preferences, then produces 12 front design concepts with optional back designs, interactive HTML preview galleries, individual card showcases with front/back flip animation, and print-ready SVG exports with bleed area and crop marks. Supports horizontal and vertical orientations, six layout styles (minimal, corporate, creative, elegant, bold, tech), multiple color schemes, QR code placeholders, social media icons, and logo integration. Use this skill whenever the user asks to design a business card, create a name card, make visiting cards, or says "design business card", "buat kad bisnes", "create name card", "reka kad perniagaan", "design kad nama", "I need a business card for X".
/ci-cd-pipelineCI/CD pipeline builder for Laravel projects — extends Kickoff's existing GitHub Actions CI with continuous deployment pipelines (staging/production), Docker containerisation, secret management, and failure notifications. Generates Dockerfiles, docker-compose.yml, deployment configs for VPS via SSH, container registry push workflows, and leverages Kickoff's /bin scripts (deploy.sh, backup.sh, setup.sh) in automated workflows. Use this skill whenever the user asks to set up deployment pipelines, containerise a Laravel app, configure CD for staging or production, push Docker images to a registry, manage deployment secrets, add failure notifications to CI, or integrate /bin scripts with GitHub Actions. Triggers for requests like "set up CD pipeline", "deploy to staging automatically", "dockerise my Laravel app", "add Docker to my project", "push image to registry", "manage secrets in CI", "notify on failure", "extend CI with deployment", "setup deploy pipeline", "nak deploy guna GitHub Actions", "tambah Docker dalam project", "setup CD untuk staging", "nak auto deploy ke production", "dockerise Laravel app aku", "tambah notification kalau CI fail", "macam mana nak manage secrets dalam GitHub Actions", or "integrate bin scripts dengan CI". Assumes Laravel Kickoff as the baseline — GitHub Actions CI (Pint, PHPStan, Rector, Pest) and /bin scripts (deploy.sh, backup.sh) are already configured. This skill extends that baseline with CD, Docker, and deployment automation.
/code-qualityPHP and Laravel code quality toolchain — static analysis with Larastan/PHPStan, code style enforcement with Pint, automated refactoring with Rector, baseline management for legacy codebases, and CI pipeline integration via GitHub Actions. Use this skill whenever the user asks to check code quality, fix linting errors, run static analysis, modernise PHP code, set up CI quality gates, manage PHPStan baselines, configure Pint presets, or apply Rector rules. Triggers for requests like "run quality check", "fix my code style", "analyse with larastan", "update phpstan baseline", "modernise my PHP code", "set up CI for quality", "check code quality", "pint tak jalan", "nak fix phpstan error", "setup rector", "betulkan code style", "tambah quality gate dalam CI", or "baseline phpstan untuk legacy code". Assumes Laravel Kickoff as the baseline — PHPStan, Pint, Rector, and GitHub Actions CI are already configured. This skill extends and customises that baseline.
/courseware-builderInteractive HTML courseware builder — turns any technical topic, flow, or process into a CD-Courseware-style interactive slide deck with animated diagrams, step-by-step simulation, syntax-highlighted code examples, and key points panels. Use this skill whenever the user wants to create teaching materials, interactive slides, animated flow diagrams, or step-by-step technical walkthroughs — even if they say "buatkan slides untuk topik X", "jadikan courseware", "buat interactive tutorial", or "create a lesson on X". Also triggers for "convert my diagram to interactive slides" or "build a visual walkthrough for my training".
/debuggingSystematic debugging and error recovery for Laravel and PHP projects — a five-step triage that goes reproduce, localise, reduce, fix, guard. Covers reading a stack trace properly, bisecting with git, isolating a failure to the smallest reproducer, telling a symptom apart from a root cause, and closing every fix with a regression test. Includes Laravel-specific traps: N+1 masked as a timeout, queue jobs failing silently on the wrong connection, cache and config caches serving stale values, Livewire state desync, and eloquent/model events firing in unexpected order. Use this skill whenever the user reports something broken, failing, flaky, slow-then-erroring, or behaving differently in production than locally — including "this test is flaky", "why is this failing", "debug this error", "it works locally but not on staging", "find the root cause", "this exception makes no sense", "the queue job never runs", "bisect this regression", "kenapa error ni", "tolong debug", "test ni kejap pass kejap fail", "cari punca sebenar", "jalan kat local tapi tak jalan kat production", or "job queue tak jalan". Pairs with kickoff-pest-testing for the regression test and log-monitor for production-log-driven investigations.
/deploy-appDeploys a Kickoff-based Laravel application to its host by running `bin/deploy` over SSH, then verifies the release and knows what each way it can stop means. Use this skill whenever the user asks to deploy an app, push the latest code to production, check what commit production is running, bring a site back up after a failed deploy, or roll back — "deploy latest", "deploy the app", "tolong deploy", "deploy latest dulu", "push to production", "apa commit dekat production", "site down after deploy", "keluarkan maintenance mode", "rollback production", "kenapa 503". Covers the deploy command and its flags, the post-deploy verification checklist, the recovery path for each failure mode, and the production traps that have already cost time. Does NOT cover provisioning a new host from bare metal (`bin/provision-host`), CI/CD pipeline design (`ci-cd-pipeline`), or writing deploy operations.
Other plugins' skills for the same job