jj-hunk

Automate non-interactive hunk selection for JJ commits via spec-based execution.

19|3|Updated Feb 4, 2021
One-click install
npx skills add https://github.com/laulauland/dotfiles --skill jj-hunk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jj-hunk
Source: https://github.com/laulauland/dotfiles/tree/main/shared/.claude/skills/jj-hunk
Command: npx skills add https://github.com/laulauland/dotfiles --skill jj-hunk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Non-interactive hunk selection for jj enables AI agents and developers to create focused, logically separated commits from mixed changes without using an interactive UI.

Core Features & Use Cases

  • List hunks and build a per-file action spec to guide commits.
  • Execute split, commit, or squash operations based on the generated spec.
  • Real-world use: split a mixed refactor and feature into separate, clean commits.

Quick Start

Install jj-hunk, run jj-hunk list to view hunks, then craft a spec and apply it with jj-hunk split or squash.

Frequently Asked Questions about jj-hunk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I split mixed changes into clean commits using jj without an interactive UI?

Splitting mixed changes into clean commits using jj requires non-interactive hunk selection. You automate this by listing hunks and building a per-file action spec to guide logical commit separation without interactive UI prompts.

What is non-interactive hunk selection for jj?

Non-interactive hunk selection for jj is a programmatic method to create focused commits. It satisfies deterministic command interfaces and structured spec-based execution for predictable version-control operations across split, commit, or squash workflows.

How do I selectively squash changes across multiple files in a worktree?

To selectively squash changes across multiple files in a worktree, you craft a spec detailing per-file actions and apply it with the squash operation. This automates selective squashing based on the generated spec.

Can I perform a partial commit in jj for specific hunks?

Performing a partial commit in jj for specific hunks is possible by generating a per-file action spec. You execute the commit operation based on this spec to selectively include desired hunks deterministically.

Does jj-hunk work for separating a mixed refactor and feature into distinct commits?

Yes, jj-hunk works for separating a mixed refactor and feature into distinct commits. You run the list command to view hunks, craft a spec, and apply it with the split operation to create clean, logically separated commits.

What are the limitations of automating partial commits with a spec-based approach?

The limitation of automating partial commits with a spec-based approach is that it requires deterministic command interfaces and structured spec execution. You must manually define per-file actions, which removes the flexibility of interactive UI selection.