name: git-cz
description: Use git-cz or Commitizen to create semantic git commits and configure repositories for guided commit message generation. Use when the user asks to run git cz, git-cz, set up Commitizen, customize changelog.config.js, or produce non-interactive conventional commits.
license: MIT
metadata:
author: amami
version: "1.0.0"
Git CZ
Practical workflow for using git-cz, the Commitizen adapter for guided semantic commits.
When to Use
Use this skill when tasks include:
- Creating a semantic git commit with
git czorgit-cz - Setting up a repository to use Commitizen with
git-cz - Customizing commit prompts, types, scopes, or message format
- Generating non-interactive commits in scripts or CI
- Replacing ad hoc
git commit -musage with structured commit messages
Guardrails
- Read the repository's existing commit conventions before changing commit tooling.
- Do not introduce
git-czif the repository already uses another Commitizen adapter unless the task explicitly includes migration. - Prefer project-local setup when configuring a repository. Use one-off
npx git-czonly when the user needs a commit without persistent setup. - When adding dependencies to a repository, pin exact stable versions instead of floating ranges.
- Keep commit types, scopes, and emoji behavior aligned with the repository's release or lint rules.
How to Apply
- Inspect the repository's commit rules and existing config:
package.json,changelog.config.js,.git-cz.json, commitlint config, hooks, and recent commit history. - For a one-off guided commit, run
npx git-cz. Add-eor--disable-emojiwhen emoji are not allowed. - For repository setup, install
git-czwith Commitizen and wirepackage.jsonas shown inreferences/git-cz.md. - For automation or scripted commits, use
git cz --non-interactivewith explicit flags such as--type,--subject, and optional--scope,--body,--breaking, and--issues. - If the repository needs custom prompts or message layout, add or update
changelog.config.jsand keep the customization minimal. - Validate with the smallest useful command and confirm the generated header matches the repository's conventions.
References
references/git-cz.md
Acceptance Checklist
- The chosen workflow matches the task: one-off
npx git-cz, local Commitizen setup, or non-interactive automation. - Any dependency additions use exact stable versions.
- Commit type, scope, emoji, and footer behavior align with the repository's existing conventions.
- Non-interactive usage provides all required fields explicitly.
- New config is limited to the smallest necessary
package.json,.git-cz.json, orchangelog.config.jschanges.