Update commit, gh-pr, and jj skills with recent learnings
Assisted-by: Claude Opus 4.6 via Claude Code
diff --git a/ai/claude/skills/commit/SKILL.md b/ai/claude/skills/commit/SKILL.md
index 665cd353..444efa56 100644
--- a/ai/claude/skills/commit/SKILL.md
+++ b/ai/claude/skills/commit/SKILL.md
@@ -2,7 +2,7 @@
name: commit
description: Use when the user asks to "commit changes", "commit my work", "/commit", "create a commit", "jj commit", "describe a change", "describe a revision", "/describe", "rewrite commit message", or "update revision description"
argument-hint: <revision or fileset>
-allowed-tools: Bash(jj diff:*), Bash(jj show:*), Bash(jj log:*)
+allowed-tools: Bash(jj diff *), Bash(jj show *), Bash(jj log *)
---
# Commit or Describe Changes
diff --git a/ai/claude/skills/gh-pr/SKILL.md b/ai/claude/skills/gh-pr/SKILL.md
index bf741ee8..79b71671 100644
--- a/ai/claude/skills/gh-pr/SKILL.md
+++ b/ai/claude/skills/gh-pr/SKILL.md
@@ -76,9 +76,12 @@ Revision must be provided (bookmark, change ID, revset, or commit hash). The rev
auto-links raw `a1b2c3d` and `#123` but backticks prevent it
- Follow repository conventions
9. **Code review**: Dispatch the `superpowers:code-reviewer` subagent to review
- the changes. Use `trunk()` as base and `<bookmark>` as head. Provide a brief
- description of what was implemented. Address Critical and Important issues
- before proceeding; Minor issues can be noted for later.
+ the changes. Tell the reviewer to run
+ `jj diff --from trunk() --to <revision>` to get the actual commit diff—do
+ not let it grep or read the working directory, which may be on a different
+ revision. Provide a brief description of what was implemented. Address
+ Critical and Important issues before proceeding; Minor issues can be noted
+ for later.
10. Create the PR: `gh pr create --head <bookmark-name> --title "<title>"` using
a HEREDOC to pass the body.
- If `web` was specified: add `--web` flag to open prepopulated PR in browser for manual editing, then stop (skip remaining steps)
diff --git a/ai/claude/skills/jj/SKILL.md b/ai/claude/skills/jj/SKILL.md
index 0ed4467f..a741257e 100644
--- a/ai/claude/skills/jj/SKILL.md
+++ b/ai/claude/skills/jj/SKILL.md
@@ -69,6 +69,21 @@ bookmark exists locally but has never been pushed, `-b` will error with
auto-track it in one step. Use `-b` only for bookmarks that are already tracked
(previously pushed or fetched).
+## Restoring Files
+
+`jj restore` does **not** have `-r`/`--revision`. It uses `--from` (source)
+and `--into`/`--to` (destination):
+
+```bash
+jj restore --from kn --into kn gdev-genie/Cargo.lock # restore one file in a revision from its parent
+jj restore --changes-in @ # undo all changes in working copy (like jj abandon but keeps metadata)
+jj restore gdev-genie/Cargo.lock # restore file in working copy from parent
+```
+
+`--changes-in <REVSET>` undoes changes in a revision compared to its
+parents — equivalent to `--into REVSET --from REVSET-` for single-parent
+revisions.
+
## Common Pitfalls
**Quote revsets containing parentheses.** Bash interprets `()` as subshell
@@ -111,6 +126,15 @@ Without quotes around the pattern, characters like `,` are parsed as fileset
syntax and cause errors. Plain paths without meta characters don't need inner
quotes: `bin/de-utm` is fine as-is.
+**Inherited conflicts are baked into the commit.** If a revision inherits a
+conflict from its parent, `jj restore --from parent --into child` won't help
+because the child doesn't introduce the conflict itself (`jj diff -r child`
+shows nothing for that file). Check with `jj resolve --list -r <rev>` and
+`jj log -r '<rev> | parents(<rev>)'` to see where the conflict originates.
+To drop an inherited conflict, rebase the revision onto a non-conflicted
+ancestor — but only if the revision's own changes don't depend on the
+conflicted parent's work.
+
## Command Categories
Run `jj --help` to see all commands. Main categories: