jj-extract-gitignoreslisted
Install: claude install-skill alycda/dotfiles
# jj-extract-gitignores
This skill rolls `.gitignore` changes back through a jj chain to land as logical
ancestors instead of staying mixed into feature commits. The result is a tidy chain
where every `.gitignore` addition lives in its own small, named commit positioned right
after the target ancestor.
## When this applies
Alyssa wants to retroactively organize `.gitignore` history when later commits added
ignores that should have been in place earlier. Common phrasing: "extract gitignore
changes", "split off the gitignores", "retroactive gitignore remediation", "roll the
gitignores back to pm". She does not want sibling commits — those conflict at squash
time. She wants in-between commits in the main chain.
## Inputs
- **Target ancestor** (optional, default = the project's init commit, often visible as
`pm` or whatever the user names). If the user provides a short prefix like `pm`, run
`jj log -r '<prefix>' --no-graph --limit 1` to confirm resolution.
- **Path filter** (optional, default `.gitignore`). The skill name says "gitignores" but
the recipe generalizes to any path. If Alyssa points at a different path, use that.
## Preconditions to verify
1. The repo is a jj repo (`.jj/` exists). If not, abort and surface that this skill is
jj-only.
2. The target is an ancestor of `@`. Check with
`jj log -r '<target> & ::@' --no-graph --limit 1`. If empty, abort.
3. The target's commits and descendants are not pushed (no remote bookmark, or the
bookmark sits be