Skip to content

Commit d4a28e8

Browse files
docs: add Agent Skills SKILL.md
Add a root-level SKILL.md that follows the Agent Skills specification and guides agents to Commitizen commands, configuration, versioning, changelog, CI, and exit-code references. Refs: #1936 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 38c1593 commit d4a28e8

2 files changed

Lines changed: 76 additions & 2 deletions

File tree

SKILL.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
name: commitizen
3+
description: Use this skill for tasks involving Conventional Commits, commit message validation, Commitizen configuration, semantic version bumps, changelog generation, or CI/release automation with the Commitizen CLI.
4+
license: MIT
5+
compatibility: Git repository with Python and Commitizen available as `cz` or runnable from source. Network access is optional and mainly relevant for CI or release integrations.
6+
metadata:
7+
project: commitizen-tools/commitizen
8+
docs: https://commitizen-tools.github.io/commitizen/
9+
install: pip install commitizen | uv add commitizen
10+
---
11+
12+
# Commitizen
13+
14+
Commitizen is a CLI for enforcing Conventional Commits, automating version bumps, and generating changelogs.
15+
16+
## Use this skill when
17+
18+
- A task involves commit message authoring or validation.
19+
- A repository needs Commitizen initialization or configuration updates.
20+
- Work depends on version schemes, version providers, version files, tags, or changelog behavior.
21+
- CI/CD automation needs commit validation, automated version bumps, or release notes.
22+
23+
## Core workflow
24+
25+
1. Find the active configuration file in this order: `.cz.toml`, `cz.toml`, `.cz.json`, `cz.json`, `.cz.yaml`, `cz.yaml`, then `pyproject.toml` under `[tool.commitizen]`.
26+
2. Read the effective settings before acting, especially `name`, `version`, `version_provider`, `version_scheme`, `version_files`, `tag_format`, `update_changelog_on_bump`, `annotated_tag`, `bump_message`, `pre_bump_hooks`, and `post_bump_hooks`.
27+
3. Match the command to the task:
28+
- `cz commit` for interactive commit authoring
29+
- `cz check` for validating commit messages or git ranges
30+
- `cz init` for bootstrapping configuration
31+
- `cz bump` for calculating or applying release versions
32+
- `cz changelog` for generating or updating `CHANGELOG.md`
33+
- `cz ls` for listing available commit rules
34+
- `cz version` for showing the current version
35+
4. Prefer read-only inspection first. Safe discovery commands include `cz version`, `cz ls`, `cz check`, `cz bump --get-next`, and `cz bump --dry-run`.
36+
5. Treat `cz bump` as stateful: it can update version files, create a bump commit, and create a git tag. Verify the version provider, version scheme, tag format, and changelog settings before running it for real.
37+
6. When automating in CI, check whether the workflow should ignore specific exit codes with `--no-raise` and whether `bump_message` should include skip-CI text.
38+
7. After making changes, validate the resulting configuration, commands, and automation against the repository's actual version scheme and provider.
39+
40+
## Important domain details
41+
42+
- Commitizen installs with `pip install commitizen` or `uv add commitizen`.
43+
- The default version scheme is PEP 440; `semver` and `semver2` are also supported.
44+
- Common version providers include `commitizen`, `pep621`, `poetry`, `cargo`, `npm`, `composer`, `uv`, and `scm`.
45+
- `cz changelog` generates Markdown changelogs.
46+
- `cz commit` supports `--dry-run` and `--write-message-to-file`.
47+
- `cz check` can validate a literal message, a commit-msg file, or a git revision range.
48+
49+
## Suggested references
50+
51+
- Command docs:
52+
- `docs/commands/commit.md`
53+
- `docs/commands/bump.md`
54+
- `docs/commands/changelog.md`
55+
- `docs/commands/check.md`
56+
- `docs/commands/init.md`
57+
- Config docs:
58+
- `docs/config/configuration_file.md`
59+
- `docs/config/option.md`
60+
- `docs/config/bump.md`
61+
- Automation docs:
62+
- `docs/tutorials/github_actions.md`
63+
- `docs/tutorials/gitlab_ci.md`
64+
- Error handling:
65+
- `docs/exit_codes.md`
66+
67+
## Examples
68+
69+
- Validate one message: `cz check --message "feat(cli): add release command"`
70+
- Validate branch history: `cz check --rev-range master..HEAD`
71+
- Preview the next version: `cz bump --get-next`
72+
- Preview bump details: `cz bump --dry-run`
73+
- Preview changelog output: `cz changelog --dry-run`
74+
- Initialize configuration: `cz init`

docs/llms.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Commitizen
22

3-
> Commitizen is a release management tool for teams that enforces Conventional Commits, automates semantic versioning bumps, and generates changelogs.
3+
> Commitizen is a release management tool for teams that enforce Conventional Commits, automates semantic versioning bumps, and generates changelogs.
44

55
This index highlights the most useful pages from the Commitizen documentation site for coding agents and other automated tools. Start with the introduction for installation and core workflows, then use the command and configuration sections for day-to-day usage. Tutorials cover CI integration, commit hooks, monorepos, and release automation.
66

@@ -45,7 +45,7 @@ This index highlights the most useful pages from the Commitizen documentation si
4545
## Tutorials
4646

4747
- [Commit Message Best Practices](https://commitizen-tools.github.io/commitizen/tutorials/writing_commits/): Writing effective Conventional Commits with Commitizen.
48-
- [Managing tags formats](https://commitizen-tools.github.io/commitizen/tutorials/tag_format/): Configure and work with custom Git tag formats.
48+
- [Managing tag formats](https://commitizen-tools.github.io/commitizen/tutorials/tag_format/): Configure and work with custom Git tag formats.
4949
- [Auto check commits](https://commitizen-tools.github.io/commitizen/tutorials/auto_check/): Enforce commit message checks automatically before commits are created.
5050
- [Auto prepare commit message](https://commitizen-tools.github.io/commitizen/tutorials/auto_prepare_commit_message/): Pre-fill commit messages before editing or validating them.
5151
- [GitLab CI](https://commitizen-tools.github.io/commitizen/tutorials/gitlab_ci/): Automate release workflows in GitLab CI.

0 commit comments

Comments
 (0)