agents/skills/jj-resolve/SKILL.md
Resolve jj (Jujutsu) conflicts. Use when jj log/status shows conflicted revisions.
npx skillsauth add timofreiberg/dotfiles jj-resolveInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Resolve conflicts in jj revisions by understanding the intent of both sides, then writing the merged result and squashing into the conflicted commit.
If $ARGUMENTS contains a change ID, use that. Otherwise find conflicts:
jj log --no-pager -r 'conflicts()'
If multiple conflicts exist, start with the earliest ancestor (topologically first) — resolving a parent often auto-resolves descendants.
Show the full conflict diff:
jj show <change-id> --no-pager
This shows conflict markers in the format:
<<<<<<< conflict N of M
+++++++ <side-a info>
<side A content>
%%%%%%% <diff description>
\\\\\\\ to: <side B info>
<context>
+<added by side B>
-<removed by side B>
>>>>>>> conflict N of M ends
Or the alternate form where %%%%%%% (a diff) comes first and +++++++ (snapshot) second.
Read both descriptions in the conflict markers — they name the commits/changes involved and explain what each side intended.
For each conflict:
When unsure about a change's purpose, examine it in isolation:
jj diff --no-pager --git -r <change-id>
Or look at the upstream commit directly:
git show <commit-hash> -- <file-path>
Always read the full file before editing — the conflict markers are inline and you need the surrounding context:
read packages/foo/src/bar.ts
Write the complete resolved file (no conflict markers). When merging orthogonal changes:
notifyBranchChange(), use it instead of manually iterating callbacks)Check the resolution resolved the conflict:
jj status --no-pager
Should show: Hint: Conflict in parent commit has been resolved in working copy
Squash the resolution into the conflicted commit:
jj squash --no-pager
Check if descendant conflicts were also resolved:
jj log --no-pager -r 'conflicts()'
If descendants still have conflicts, repeat from Step 2 for the next one.
After all conflicts are resolved, run the project's check command if available
(e.g., npm run check) to verify the merged code compiles and passes lint.
development
Quick internet research via a web-search-enabled model. Returns summaries with source URLs.
data-ai
Use when you want to work in an isolated jj working copy — parallel task, experimental scratch, subagent with its own tree. Covers creating a workspace, working inside it from anywhere, and cleaning up without losing history.
tools
Use when working on the pi coding agent harness or writing pi extensions.
testing
Use when creating, editing, or reviewing a skill before it ships. Covers when to write a skill, file layout, the SKILL.md shape, and how to verify it before relying on it.