Generate conventional commit messages for jj by analyzing diffs, running tests first, and handling immutable commits
The 'jj-commit' skill is designed to automate the generation of conventional commit messages for Jujutsu (jj) by analyzing code diffs. It streamlines the process of creating meaningful and standardized commit messages, saving time and ensuring consistency across projects. This skill helps developers follow best practices by guiding them to use the conventional commit format, making version control logs more readable and machine-friendly.
The skill's core functionality includes running tests before generating commit messages, analyzing code changes to identify the correct commit type (e.g., feat, fix, refactor), and crafting precise commit messages in the required format. It also handles cases where commits are immutable, offering guidance on how to bypass this limitation when necessary. 'jj-commit' integrates seamlessly with various testing frameworks, such as npm, Yarn, Rust, Python, and Go, to ensure that commits are only made when tests pass, preventing potential issues in production. It is useful for developers working with Jujutsu (jj) to maintain clean and reliable commit history.
This skill is particularly valuable for teams adhering to standardized commit message conventions or for solo developers who wish to maintain consistency. It is ideal for projects of any size where version control and continuous integration are critical, and it helps to automate the tedious process of manually crafting commit messages. Developers looking to ensure that their commit history reflects the intent behind changes will find 'jj-commit' to be a time-saving and effective tool.
'jj-commit' automatically generates commit messages by analyzing the diff of code changes and categorizing them into predefined types such as 'feat', 'fix', 'refactor', etc. The message is then formatted according to conventional commit guidelines.
If tests fail, the skill shows the failure details to the user and prompts whether they want to fix the issues, skip the tests, or commit anyway. The commit will proceed only if the user explicitly chooses to skip the tests.
Yes, if a commit is immutable, 'jj-commit' will inform the user and suggest using the '--ignore-immutable' flag to proceed with the commit if the user wishes.
'jj-commit' supports various test frameworks, including npm/yarn (for JavaScript), Rust (cargo), Python (pytest), and Go (go test). The skill automatically detects the framework from the project configuration files like package.json, Cargo.toml, or pyproject.toml.
'jj-commit' works with Jujutsu (jj), and it requires this version control system to operate. It will not work with other systems like Git or Mercurial.
Quick Setup:
.claude/skills/Repository
ahkohd/dotfiles