conventional-commits
Conventional Commits Workflow
Follow these steps to generate a professional git commit message.
Core Mandates
- Respect Context: If the project contains a
.gitmessagefile or the user provides specific instructions, prioritize them. Useassets/gitmessage_template.txtas a reference for formatting. - 50/72 Rule: Title must be ≤ 50 characters. Separate body with a blank line. Wrap body lines at 72 characters.
- Grammar: Use imperative mood and present tense for the title (e.g., "fix bug", "add feature"). Do not capitalize the first letter and do not use a period at the end.
Implementation Steps
1. Analyze Changes & Decide Format
Read staged changes to determine the nature of the modification.
- Short Format: Use for simple, self-explanatory changes. Reference
assets/short_template.txt. - Long Format: Use for complex changes or when explicitly requested. Reference
assets/long_template.txt.
2. Determine Type & Optional Scope
Select the correct type from the following: feat, fix, docs, style, refactor, perf, test, build, ci, chore.
- Scope: Do not include a scope unless the user explicitly requests one or the project convention requires it.
3. Identify Breaking Changes
Check for public API changes or major refactors.
- Append
!after the type/scope (e.g.,feat!: ...). - If using Long Format, add
BREAKING CHANGE: <description>to the footer.
4. Compose the Message
- Title:
<type>[optional scope][!]: <description>. Ensure it is ≤ 50 chars and lowercase. - Body: Focus on what and why. Ensure line length ≤ 72 chars.
- Footers: Include mandatory tags (e.g.,
Refs: #123) or breaking change notes if applicable.
Resources
- Templates: See
assets/short_template.txt,assets/long_template.txt, andassets/gitmessage_template.txt. - Full Spec: Refer to
references/specification.mdfor complete Conventional Commits 1.0.0 rules.
More from zenless-lab/skills
python-docstring-expert
Expert methodology for evaluating, formatting, and generating Python docstrings. Use when creating or updating documentation for Python code, determining if a docstring is necessary based on API exposure, or formatting docstrings for modules, classes, and functions. Load this skill when code changes affect existing docstrings to keep them synchronized.
16cloud-init-crafter
Expert assistant for creating, modifying, and debugging cloud-init scripts. Supports multiple formats (YAML, shell, MIME archives), Jinja templating with instance-data, and multi-platform validation.
9readme-crafter
Use this skill when you need to write, refactor, or improve a project's README.md file. Trigger this anytime the user wants to create documentation, project overviews, or profile pages following best practices and modern aesthetics.
8skill-expert
Comprehensive master guide for designing, creating, editing, updating, and refactoring Agent Skills according to the official agentskills.io specification. Use this when you need to build or modify capabilities for an AI agent.
8agents-md-crafter
Use this skill when you need to create, update, or improve AI agent instruction files like AGENTS.md, GEMINI.md, or copilot-instructions.md. Trigger this anytime the user wants to set up standard AI rules, document project context for LLMs, or add repository-wide guidelines for AI agents.
8skill-crafter
Use this skill when creating a new skill or when modifying, updating, refactoring, restructuring, or reviewing an existing skill. Trigger it for framework-specific and framework-agnostic skill work, including SKILL.md design, folder layout, scripts, references, assets, metadata, and description optimization, even if the user only says "make a skill", "improve this skill", or "refactor the skill".
7