jj-cleanup

schpet's avatarfrom schpet

Repository maintenance utilities for jujutsu (jj). This skill should be used when cleaning up a jj repository, removing empty commits, or managing commits that lack descriptions.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 9, 2026⬇️2downloads

When & Why to Use This Skill

This Claude skill provides specialized repository maintenance utilities for the Jujutsu (jj) version control system. It streamlines developer workflows by automating the identification and removal of empty commits, managing undocumented changes, and leveraging LLMs to generate descriptive commit messages, ensuring a clean and professional project history.

Use Cases

  • Repository Hygiene: Automatically identify and abandon redundant empty mutable commits to maintain a concise and meaningful version history.
  • Commit Documentation: Locate all commits missing descriptions and use integrated LLM tools to generate accurate commit messages based on code changes.
  • Advanced Revset Querying: Utilize specialized revset filters to audit mutable ancestors and track the state of the current working copy within complex Jujutsu branches.
namejj-cleanup
descriptionRepository maintenance utilities for jujutsu (jj). This skill should be used when cleaning up a jj repository, removing empty commits, or managing commits that lack descriptions.

JJ Cleanup

Overview

Repository maintenance utilities for jujutsu (jj) version control. Provides workflows for cleaning up empty commits and handling commits without descriptions.

Finding Empty Commits

To find empty mutable commits in the current branch:

jj log --ignore-working-copy --no-graph -r 'mutable() & empty() & ancestors(@)' -T 'change_id ++ " " ++ description.first_line() ++ "\n"'

To abandon all empty mutable commits:

jj abandon 'mutable() & empty() & ancestors(@)'

Finding Commits Without Descriptions

To find mutable commits with empty descriptions:

jj log --ignore-working-copy --no-graph -r 'mutable() & ancestors(@) & description("")' -T 'change_id.short() ++ " " ++ commit_id.short() ++ "\n"'

To view these commits with more context:

jj log --ignore-working-copy -r 'mutable() & ancestors(@) & description("")'

Auto-Describing Commits

To generate descriptions for commits using an LLM:

jj llm-describe -r <change_id>

This requires jj-llm-describe to be installed and configured.

Revset Reference

Revset Description
mutable() All commits that are not immutable
empty() Commits with no file changes
ancestors(@) All ancestors of the current working copy
description("") Commits with empty descriptions