[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DNERWDTNCS3407Y0K89TB0":3,"skill-same:01M6DNERWDTNCS3407Y0K89TB0":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":50,"install":51,"resources":64},"01M6DNERWDTNCS3407Y0K89TB0","but",null,"Commit, push, branch, and manage version control with GitButler. Use for commits, selective dirty-file or hunk commits, branches, diffs, PRs, history edits, squashes, amends, undo, merge, fetching, pulling and syncing a branch with its remote, apply, unapply, and linked worktrees. For selected dirty files or hunks, inspect with `but diff`; use compact `but status` for commit order, branch\u002Fstack placement, or conflict overview; use `but status -fv` when file IDs or per-commit file details matter. Replaces git writes in verified GitButler-managed main worktrees. In linked or non-main worktrees, use plain Git: the installed wrapper rejects GitButler there.","0xgleb\u002Fdotconfig","0xgleb","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F39841057?v=4","01M6DNDD83BRMM1SH4R4C6K8GY","01M6DNDDCPH33FEFB6JN6Y2GVD",3,"MIT","https:\u002F\u002Fgithub.com\u002F0xgleb\u002Fdotconfig\u002Fblob\u002Fmaster\u002Fai\u002Fskills\u002Fgitbutler\u002FSKILL.md",[],[5,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"hunk","team","commit","file","version","compact","use","files","overview","diffs","branches","manage","commits","diff","ids","conflict","history","push","branch","2026-11-10 10:12:30",false,"---\nname: but\nversion: 0.23.2\ndescription: \"Commit, push, branch, and manage version control with GitButler. Use for commits, selective dirty-file or hunk commits, branches, diffs, PRs, history edits, squashes, amends, undo, merge, fetching, pulling and syncing a branch with its remote, apply, unapply, and linked worktrees. For selected dirty files or hunks, inspect with `but diff`; use compact `but status` for commit order, branch\u002Fstack placement, or conflict overview; use `but status -fv` when file IDs or per-commit file details matter. Replaces git writes in verified GitButler-managed main worktrees. In linked or non-main worktrees, use plain Git: the installed wrapper rejects GitButler there.\"\nauthor: GitButler Team\n---\n\n# GitButler CLI Skill\n\nUse GitButler CLI (`but`) in verified GitButler-managed main worktrees. The\ninstalled wrapper rejects all invocations from linked worktrees; use plain Git\nin linked\u002Fnon-main worktrees and unmanaged repositories. Native CLI worktree\ncapabilities described below are reference information, not permission to bypass\nthis local routing policy.\n\nBefore any history edit or conflict resolution, compare `but --version` with\nthis skill's declared version. Do not translate syntax from a stale version\nreport; consult the installed CLI's help when versions differ.\n\n## Start Here\n\nChoose the narrowest first command by task; avoid ritual status checks:\n\n```bash\n# Selected dirty files\u002Fhunks:\nbut diff\n\n# Commit order, branch\u002Fstack placement, conflict overview:\nbut status\n\n# File IDs, per-commit files, amend details:\nbut status -fv\n\n# What one applied branch or commit changed, for review:\nbut diff \u003Cbranch-or-commit>\n\n# Details for one known branch or commit:\nbut show \u003Cid>\n```\n\nDo not run plain `but status` and then `but status -fv` unless the compact\noutput lacks file details needed for the task.\n\nFor \"commit just\u002Fonly\u002Fspecific changes on a new branch\", use the fast path:\n\n```bash\nbut diff\nbut commit -b \u003Cbranch> -m \"\u003Cmsg>\" \u003Cid> \u003Cid>\n```\n\n`but commit -b \u003Cbranch> ...` creates the branch when it does not exist and\nprints the created commit. Do not run a separate `but branch new`, status\ncommand, or verification diff unless the task needs workspace information that\nthe result does not provide.\n\nIn a linked worktree, such as `.claude\u002Fworktrees\u002F*`, omit `-b` so the commit\ngoes on the branch the worktree has checked out. Use that branch as the new\nbranch; do not stack another one on it. A worktree with a detached HEAD has no\nbranch yet. There, `but commit -b \u003Cnew-name> -m \"\u003Cmsg>\"` creates the branch at\nHEAD, checks it out in that worktree, and commits to it.\n\n## IDs\n\nThe first token on each `but diff` \u002F `but status` line is that line's ID. When a\ncommand needs an ID, copy it exactly from the current output; never hardcode or\ninvent one. ID lifetimes differ by entity:\n\n- Changes and sources are **positional, space-separated** IDs\n  (`but commit -b feat -m \"msg\" uvw:2e4 uvw:e2c`). An uncommitted hunk ID is\n  written `\u003Cfile-id>:\u003Chunk-id>` (e.g. `uvw:2e4`, copied from bare `but diff`) —\n  the part after the colon is the hunk's ID, **not** a line range (`uvw:16-40`\n  is invalid). Do not invent flags like `--changes` \u002F `--hunk` \u002F `--ids`, pass a\n  line range, or comma-separate IDs — `uvw,qyo` is parsed as one ID and fails.\n- `but diff` is the exception: it accepts at most **one** target. Bare\n  `but diff` shows all uncommitted files; inspect committed files or other\n  entities one target at a time — never `but diff \u003Cid> \u003Cid>`.\n- A committed file is `\u003Ccommit-id>:\u003Cfile-id>` (e.g. `mzm:uvw`, shown under each\n  commit). A committed hunk is `\u003Ccommit-id>:\u003Cfile-id>:\u003Chunk-id>` and is shown by\n  `but diff \u003Ccommit-id>`. `@` means the uncommitted area.\n- Commit IDs are stable change IDs that survive history edits (`amend`,\n  `squash`, `move`, `uncommit`, `reword`). Commits without a change ID (e.g.\n  upstream-only) lead with a sha prefix instead, and `#N`-suffixed refs\n  disambiguate duplicates — both go stale after history edits, and a stale sha\n  can silently resolve to the wrong commit. The `(sha …)` on verbose commit\n  lines is informational — do not pass it to commands.\n- Branch short IDs are snapshot-local selectors. Use full branch names for\n  branch-targeting mutations; short IDs are safe only for immediate read-only\n  inspection.\n- File\u002Fhunk IDs copied from one diff read generally remain usable across chained\n  commits. If one stops resolving, re-read `but diff` and retry.\n\n**Chaining:** mutation output is concise by default, so you may chain mutations\nwith `&&` off one inspection read. Do not chain branch short IDs through\nmutations; use full branch names. Add `--status-after` only when the next step\nneeds workspace IDs or details that the mutation result does not provide.\nChained `but commit` calls stack in the order written — the first is oldest,\neach later one goes on top. History edits may run in sequence when every commit\nref involved is a change-ID ref; run them one at a time with `--status-after`\nwhen a ref is sha-based or `#N`-suffixed, or when the next command needs freshly\nissued IDs. Chaining `but uncommit \u003Cid> && but diff` is safe because bare `diff`\nneeds no ID from the uncommit output. Never pipe a mutation through `tail` or\n`head`: the pipeline then exits with their status, so the next `&&` runs even\nwhen the mutation failed.\n\n## Non-Negotiable Rules\n\n1. Use `but` for all write operations. Never run `git add`, `git commit`,\n   `git push`, `git fetch`, `git pull`, `git checkout`, `git merge`,\n   `git rebase`, `git stash`, or `git cherry-pick`; `but pull --check` fetches.\n   The only exceptions are selecting a side of a conflicted submodule in\n   resolution mode (see Resolve conflicted commits) and creating a missing\n   target branch (see Notes). If the user says a `git` write command, translate\n   it to `but` and run that.\n2. Mutation commands print their result without appending workspace status. Add\n   `--status-after` only when the next step needs resulting workspace IDs or\n   details; otherwise trust the mutation result and do not run a verification\n   status\u002Fdiff.\n3. Branches marked `(merged upstream)` have landed; start new work on another\n   branch. That marker alone does not mean `but pull` removes them: run\n   `but pull --check` first. `but pull` removes only branches listed\n   `[integrated]` (\"has been integrated upstream and removed locally\", or \"has\n   been merged into \u003Ctarget> and removed\" when the target has no upstream) and\n   rebases the rest, which stay applied. To clear a landed branch that stays\n   applied, use `but unapply \u003Cbranch>` (acts on its whole stack) rather than\n   `but discard`. `push` and mutations (`commit`, `amend`, `squash`, `uncommit`,\n   `reword`, `move`) refuse landed branches and commits, `absorb` skips them\n   with a notice, and `commit` skips them when picking a default target.\n4. Keep going between routine `but` commands. Put any status note in the same\n   message as the next command, and don't end a turn on a summary that announces\n   the next `but` step without running it. Finish with a concise summary.\n5. Prefer this skill and `but skill reference` over exploratory help calls. Use\n   `\u003Ccommand> --help` when required syntax is missing or a command fails; use\n   top-level help only when you genuinely need to discover an undocumented\n   command.\n6. Other agents may share this checkout, so `@` can hold their edits. Commit,\n   amend, and discard only the IDs or paths you changed. Bare `but commit`,\n   `but absorb`, `but discard @`, and `git stash` take their work too, and a\n   refusal naming files you didn't edit means you selected theirs.\n\n## Command Patterns\n\n- Initialize a Git repository: `but init` (current directory) or\n  `but -C \u003Cpath> init`. Non-interactive; creates no commits, remotes, or\n  GitButler workspace. Existing repositories are left unchanged. In a repository\n  with no commits, make the first commit with a bare `but commit -m \"\u003Cmsg>\"`;\n  `-b` is refused there.\n\n- Commit: `but commit -b \u003Cbranch> -m \"\u003Cmsg>\" \u003Cid> \u003Cid>` — `-b \u003Cbranch>` creates\n  the branch if it does not exist\n- Commit everything uncommitted: `but commit -b \u003Cbranch> -m \"\u003Cmsg>\"` (omit the\n  IDs)\n- Several commits from one diff: chain `but commit` calls with `&&` (commits\n  stack oldest-first)\n- Never pass `-s` to `commit`, `move`, or `pick`: it is `--switch`, not git's\n  `--signoff`, and it unapplies every other stack.\n- The branch is never positional (`but commit \u003Cbranch>` fails; use `-b`),\n  `but amend` always needs `-t`, and `but diff` takes one target (use a shared\n  `dir\u002F` or one call each).\n- Commit at a specific history position: `--above \u003Ccommit-or-branch>` or\n  `--below \u003Ccommit-or-branch>` (mutually exclusive). With a branch target, add\n  `-b \u003Cnew-name>` to name the new branch; otherwise its name is generated. The\n  name must not already exist. Do not combine `-b` (even without a name) with\n  commit\u002Fworktree targets.\n- Targeting is **required** when more than one **stack** is applied; without it\n  `but commit` fails with \"Unclear where to commit. Found more than one stack\".\n  Several branches stacked together count as one stack — an untargeted commit\n  then silently lands on the stack's top branch, so pass `-b` whenever the\n  branch matters.\n- Always pass `-m \"\u003Cmsg>\"` (or `-F -` with a heredoc, `-F \u003Cfile>` with a file\n  outside the repository, or `--no-message`) to `but commit`, and to\n  `but squash` whenever its sources are commits or branches unless the target is\n  `@` (squash also takes `-u` to keep the target's message) — those compose a\n  new message; without a flag an agent run keeps whatever the command composed\n  (empty for `but commit`, the joined source messages for `but squash`) and a\n  terminal opens an editor. Squash sources that are uncommitted or committed\n  changes reuse the target's message and need no flag; squashing into `@`\n  rejects message flags outright.\n- Amend: `but amend -t \u003Ccommit-or-branch> \u003Cfile-or-hunk-id> \u003Cfile-or-hunk-id>` —\n  a branch target resolves to its newest commit\n- Uncommit: `but uncommit \u003Ccommit-id>` (whole commit), `but uncommit \u003Cbranch>`\n  (all commits and remove branch), `but uncommit \u003Ccommit-id>:\u003Cfile-id>`\n  (committed file), or `but uncommit \u003Ccommit-id>:\u003Cfile-id>:\u003Chunk-id>` (committed\n  hunk); committed files and hunks may be mixed, but all must come from one\n  commit\n- Copy commits (sources stay unchanged):\n  `but pick \u003Csha> [\u003Csha>...] -b \u003Cnew-branch>` puts the copies on a new\n  independent branch from the target, `-b \u003Cexisting-branch>` on that applied\n  branch's tip, and `--above \u003Cbranch> -b \u003Cnew-name>` (or `--below`) on a new\n  branch stacked there. Pick applies sources in the order given, so pass them\n  oldest first. For a branch that is not applied, list SHAs with\n  `git log --reverse \u003Ctarget>..\u003Cbranch>` and inspect them with `git show` or\n  `but show \u003Csha>`; `but diff` and the IDs that `but branch show` prints for it\n  do not work.\n- Move committed changes into an existing commit or `@`:\n  `but squash \u003Ccommit-id>:\u003Cfile-id> -t \u003Ccommit-id-or-@>` for a committed file;\n  `but squash \u003Ccommit-id>:\u003Cfile-id>:\u003Chunk-id> -t \u003Ccommit-id-or-@>` for a\n  committed hunk; all sources must come from one commit\n- Move committed changes into a new commit at a chosen position:\n  `but move \u003Ccommit-id>:\u003Cfile-id> --above \u003Ccommit-or-branch> -m \"\u003Cmsg>\"` for a\n  committed file;\n  `but move \u003Ccommit-id>:\u003Cfile-id>:\u003Chunk-id> --above \u003Ccommit-or-branch> -m \"\u003Cmsg>\"`\n  for a committed hunk (`--below`, `--branch`, and `--unstack` also work)\n- `but split` and a `but move` of committed changes name their new commit with\n  `-m` or `-F` too; without either the commit gets an empty message. `but move`\n  rejects `-m`\u002F`-F` for whole-commit and branch sources.\n- Move commit to branch top: `but move \u003Ccommit-id> -b \u003Cbranch>`\n- Move commits or committed changes onto a new named branch:\n  `but move \u003Csource> --above \u003Cbranch> -b \u003Cnew-name>` (`--below` also works); use\n  `but move \u003Csource> --unstack -b \u003Cnew-name>` for an independent branch. Omit\n  `-b` for a generated name. Naming is not supported when stacking or unstacking\n  a branch source.\n- Discard: `but discard \u003Cid> [\u003Cid>...]` — accepts branches, commits, committed\n  changes, uncommitted changes, or `@` for all uncommitted changes\n- Push: `but push \u003Ctop-branch>` — pushes the selected branch and its ancestors;\n  to update a stack, select its top branch once and never loop. Bare `but push`\n  pushes all unpushed work when run non-interactively — one push per stack (its\n  topmost unpushed branch, ancestors included), and the output lists every\n  branch it pushed. It exits non-zero if any stack failed; stacks that already\n  pushed stay pushed, and rerunning after fixing the failure is safe (up-to-date\n  stacks are skipped). `but push` and `but pr new` replace the remote branch: if\n  others may have pushed to it, bring their commits in first (see Bring in\n  commits pushed to a branch's own remote).\n- Create PR:\n  `but pr new \u003Cbranch-name> [-m \"Title...\"] [-F - | -F \u003Cfile>] [-t] [--draft]` —\n  auto-pushes first; do not run `but push` before it\n\n## Task Recipes\n\n### Update workspace from main\n\nFor \"get latest from main\", \"update\u002Fsync this workspace\", \"rebase onto main\", or\n\"pull main\":\n\n1. `but pull` — one command; no preflight needed. Its output reports the\n   resulting state, and `but undo` reverts it. Uncommitted changes that conflict\n   with the update get conflict markers and show as `{conflicted}`; resolve them\n   as in Conflicts in uncommitted files.\n2. If commits come back conflicted, resolve them with the\n   `but resolve conflicts \u003Cbranch>` and `but resolve apply` loop in Resolve\n   conflicted commits, one branch at a time. When `HEAD` is\n   `gitbutler\u002Fworkspace`, `but pull` prints `but resolve \u003Ccommit>` as the next\n   step; that is edit mode, which is only for running code against a resolution.\n\n`but pull --check` answers \"would this conflict?\" without updating. Do not use\nit as a routine preflight; use it when the user asks for a preview, you need a\nfetch, repository policy requires one, other agents' branches may move, or an\napplied branch was just merged upstream (see rule 3).\n\nRebasing applied branches onto the latest target IS `but pull` — never `move`,\n`config target`, `unapply`, or raw `git pull`\u002F`git rebase`. The base shown in\nstatus is the last FETCHED state: when `git log` shows the remote target (for\nexample `origin\u002Fmain`) ahead of it, that is exactly the update `but pull`\nfetches and applies — the target setting is not stale and repointing it is never\nthe fix. Pull carries uncommitted changes along; there is no stash, so do not\nhand-revert files.\n\n### Bring in commits pushed to a branch's own remote\n\n`but pull` only rebases onto the target. Commits someone pushed to your branch's\nremote show in `but status` under `(upstream: on \u003Cremote>\u002F\u003Cbranch>)`, above the\nbranch's own commits; if status may be stale, run `but pull --check` to fetch.\n\n1. `but branch update \u003Cbranch>`, once, on the branch they pushed to.\n2. Then `but pull` if the target moved too. Update before pulling. If the branch\n   was rebased since its last push (for example by an earlier `but pull`), the\n   update leaves an empty `(no changes)` copy of a shared commit. On a single\n   branch, `but discard` that copy by its `#N` ref. In a stack, `but undo` the\n   update and tell the user, because the update can also move commits into the\n   lower branch. Do not update a second time, even if `(upstream: …)` still\n   lists commits, because a second update duplicates commits.\n\n### Commit selected files or hunks\n\n1. `but diff` — shows file and hunk IDs for uncommitted changes. Do not run\n   plain `but status` first.\n2. Use file IDs when whole files belong in the commit; use hunk IDs\n   (`\u003Cfile-id>:\u003Chunk-id>`) when only part of a file belongs. Omit IDs you don't\n   want committed. For whole files, repo-root paths or a `dir\u002F` prefix work too\n   (`but commit -b feat -m \"msg\" src\u002Fui\u002F README.md`; no `.\u002F` or globs), so don't\n   build ID lists by piping `but diff` through grep.\n3. `but commit -b \u003Cbranch> -m \"\u003Cmsg>\" \u003Cid1> \u003Cid2>` — the branch is created if it\n   does not exist, so no prior `but branch new` is needed.\n4. When the task requires knowing which changes remain, add `--status-after`;\n   otherwise the created-commit result is sufficient.\n\nEdge case: if wanted and unwanted edits are in the same diff hunk, GitButler\ncannot split that hunk by ID. Only when the task requires keeping part of that\nhunk uncommitted, temporarily edit the working tree to isolate the wanted lines,\ncommit those IDs, then restore the leftover lines so they remain uncommitted.\n\n### Amend into existing commit\n\n1. `but status -fv` for the target commit ID and file IDs; `but diff` for hunk\n   IDs when only part of a file belongs.\n2. `but amend -t \u003Ccommit-id> \u003Cid> \u003Cid>` — one command per target commit. For\n   several target commits, chain the amends with `&&` when every target is a\n   change-ID ref; otherwise run them one at a time with `--status-after` to get\n   fresh refs.\n\n### Split an existing commit\n\nFor a two-way split, move selected committed files or hunks directly into a new\ncommit:\n\n1. `but diff \u003Csource-commit-id>` — read committed file and hunk IDs.\n2. `but split \u003Ccommitted-file-or-hunk-id> [\u003Ccommitted-file-or-hunk-id>...] -m \"\u003Cmessage>\"`\n   — sources may mix files and hunks, but must come from one commit. The command\n   creates the named commit immediately above the source and leaves unselected\n   changes and the original message in the source. No follow-up reword is needed\n   for the new commit.\n3. Add `--status-after` only when the next step needs workspace IDs or details\n   not provided by the mutation result.\n\nFor more than two replacement commits, repeat `but split ... -m \"\u003Cmessage>\"`\nusing the remaining source's committed changes, or use the uncommit\u002Frecommit\nworkflow below when rebuilding the entire commit:\n\n1. `but status -fv` when you need the source commit, branch name, or placement\n   anchor.\n2. `but uncommit \u003Csource-commit-id> && but diff` in one shell call exposes the\n   commit's changes and prints the resulting file and hunk IDs.\n3. Pick replacement contents from that dirty diff, not from the old committed\n   diff.\n4. Determine the requested chronological order from the user's wording, then\n   create the replacement commits oldest-first by chaining `but commit` calls.\n   Do not reverse that order to match `but status`, which displays commits\n   newest-first. `-b \u003Cbranch>` puts each new commit at the TOP of that branch —\n   if the split commit had commits above it, the replacements now sit above\n   those preserved commits.\n5. **If commits from that branch must stay ABOVE the replacements, put the\n   preserved block back on top instead of fighting anchors.** Do not anchor with\n   `--above \u003Ctop>`\u002F`--below \u003Ctop>` (sha\u002F`#N` anchors go stale as each insert\n   rewrites history). Move the block together so its internal order stays\n   intact: append `&& but move \u003Cpreserved-id> [\u003Cpreserved-id>...] -b \u003Cbranch>`\n   to the commit chain. Change-ID refs from step 1 stay valid; wait for fresh\n   output first if any preserved ref is sha-based or `#N`-suffixed.\n6. Leave unwanted changes uncommitted. Replacements created oldest-first appear\n   newest-first in status — that is correct; do not reorder them. Add\n   `--status-after` to the final mutation when you need to inspect the resulting\n   order.\n\n### Reorder commits\n\n`but status` displays commits newest\u002Ftop first, while task specs often list\nhistory oldest to newest — translate before moving.\n\n1. `but status` once to get commit IDs (use `-fv` only if you also need file\n   details).\n2. `but move \u003Csource> --below \u003Ctarget-commit>` places source immediately below\n   target in `but status` (older in oldest-to-newest history). `--above` places\n   it immediately above (newer). `but move \u003Csource> -b \u003Cbranch>` moves it to\n   branch top\u002Fnewest.\n3. For an adjacent block, run ONE move, anchored either way:\n   `but move \u003Cblock-id> \u003Cblock-id> --below \u003Cfollowing-commit-id>` or\n   `but move \u003Cblock-id> \u003Cblock-id> --above \u003Cpreceding-commit-id>`. Pick an\n   anchor outside the block; source order does not matter and the block keeps\n   its internal order. Add `--status-after` when you need to inspect the\n   resulting order; do not move the anchor or block members again.\n4. For other reorders, make the smallest set of moves.\n\n### Squash commits\n\n1. `but status` for commit IDs and order.\n2. Name the sources positionally and the result\u002Ftarget commit with `-t`:\n   `but squash \u003Csource> [\u003Csource>...] -t \u003Ctarget> -m \"\u003Cnew message>\"`.\n3. To collapse an entire branch into one commit, pass just the branch and no\n   `-t`: `but squash \u003Cbranch> -m \"\u003Cnew message>\"`.\n4. Multiple independent groups may run in sequence off one status read (targets\n   keep their change-ID refs); prefer newer\u002Ftop groups first. Take fresh refs\n   only when a ref is sha-based or `#N`-suffixed.\n5. Add `--status-after` to the final squash when you need to inspect the\n   resulting history; do not re-verify with a separate status.\n\n### Stack existing branches\n\nTo make one existing branch depend on another:\n`but move \u003Cchild-branch-name> --above \u003Cparent-branch-name>` (use full branch\nnames; commit reordering uses commit IDs). To unstack:\n`but move \u003Cbranch-name> --unstack`.\n\n**DO NOT** stack via `uncommit` + `branch delete` + `branch new --above`, and do\nnot use `but undo` to unstack.\n\n### Work in a linked worktree\n\n1. `but worktree new \u003Cbranch-name>` checks out that branch in a new directory,\n   creating it if needed (an existing branch must not be in the workspace), and\n   prints that directory. Add `-A \u003Cbranch-or-commit>` to start the branch there\n   instead of the workspace base; it takes any Git revision, like a SHA or\n   `origin\u002Fmain`. Worktrees made by other tools must sit outside the repository\n   directory or be listed in `.git\u002Finfo\u002Fexclude`; otherwise a bare `but commit`\n   in the main checkout records them in the branch.\n2. Run `but` from that directory, or with `but -C \u003Cpath>`. There, a bare\n   `but commit -m \"\u003Cmsg>\"` or `but diff` takes that worktree's changes, a bare\n   path names a file there, and the commit goes on the worktree's branch. Do the\n   work on that branch, also in a worktree another tool made. `-b \u003Cnew-name>` is\n   refused there, except in a worktree with a detached HEAD, where it names the\n   worktree's branch; stack a new branch on it only when the user asks for a\n   separate branch. `but undo` doesn't restore a branch a worktree has checked\n   out. It refuses, or it reports success and leaves that branch as it is, so\n   undoing a `move` out of the branch leaves the commit on neither branch.\n   Reverse a command that changed the worktree's branch with its inverse\n   (`uncommit`, `reword`, or `move` the commit back), also when you ran it from\n   another checkout.\n3. `but status` from any checkout shows the worktree as a lane of its own, with\n   the same IDs everywhere. `@` always means the main worktree's uncommitted\n   changes; `\u003Cworktree>:@` names a linked worktree's changes from anywhere.\n4. Push and open PRs as for any branch (`but pr new \u003Cbranch-name>`). `but pull`\n   also rebases worktree branches. If that leaves a worktree commit\n   `{conflicted}`, the branch name doesn't find it: take its commit ID from\n   `but status` and run `but resolve conflicts \u003Ccommit-id>`, then\n   `but resolve apply \u003Cpath>:\u003CN> --commit \u003Ccommit-id>`. Each apply rewrites the\n   commit: refresh SHA-based or `#N`-suffixed IDs from `but status -fv` before\n   the next conflict query or apply; do not reuse a stale target.\n5. When done, `but worktree remove \u003Cname>` deletes the directory and keeps the\n   branch. It refuses while the worktree has uncommitted changes; `-f` discards\n   them. To delete the branch as well, run `but branch delete \u003Cname>`\n   afterwards.\n\n### Create or manage pull requests\n\n`but pr new \u003Cbranch-name>` pushes the selected branch and its ancestors, then\ncreates the PR in one step — no prior `but push`. Provide `-F -` with a heredoc\nor `-F \u003Cfile>` (first line is the title), `-t`, or `-m` with real newlines\n(zsh\u002Fbash: `-m $'Title\\n\\nBody'`) so no editor opens. Do not write the message\nto a file inside the repository: the next `but commit` would commit it. If forge\nauth is missing, ask the user to run `but config forge auth` in a terminal; it\nrefuses non-interactive runs.\n\nIf you do create a PR for a stacked branch, use `but pr` — not `gh pr create`\n(only `but pr` sets PR bases and stack metadata; `gh pr create` breaks that). To\npublish a whole stack: `but pr new \u003Ctop-branch-name> -t`. Manage with\n`but pr auto-merge|set-draft|set-ready \u003Cselector>`; selectors can be a branch\nname, current branch\u002Fstack CLI ID, or numeric review ID. See\n`but skill reference` for details.\n\nWhen `but pr new` prints a `\u003Cpr-created>` line, copy that line into the text of\nyour reply. It tells the app running you that this session opened the PR.\n\nIf you run in the Claude desktop app, end the `but pr new` line with the shell\ncomment `# gh pr create`, for example\n`but pr new \u003Cbranch-name> -F - \u003C\u003C'EOF' # gh pr create`. While\n`gitbutler\u002Fworkspace` is checked out, the app counts a PR as opened by this\nsession only when the command text contains `gh pr create`.\n\n### Dependency conflict with another branch\n\nChanges that build on another branch's commits cannot land on an independent\nbranch. `but commit` and `but amend` fail atomically (\"Cannot commit: N changes\ncould not be applied\"), naming the branch and commit each rejected change\ndepends on — nothing is committed and no `-b` branch is created.\n\nStack only when your change builds on that branch's code. A refusal can also\nmean your hunk only borders lines that branch changed (a doc line, a lockfile):\nthen leave one unchanged line between your edit and theirs, or keep that hunk\nuncommitted until that branch lands, and commit the rest. Never drop or rewrite\nreal work to get past a refusal; ask the user.\n\nWhen there is a single dependency branch, the error's Hint gives the exact\nrecovery command: `but move \u003Cyour-branch> --above \u003Cdependency-branch>` to stack\nan existing branch on its dependency, or\n`but branch new \u003Cname> --above \u003Cdependency-branch>` when the target branch\ndidn't exist yet. Run it, then retry the original command. When the error names\ndependencies without a Hint (several dependency branches, or the dependency is\non the target branch itself), run `but status -fv` to see where the dependent\ncommits live before choosing a placement.\n\nIf that recovery command fails, do NOT try `uncommit`, `squash`, or `undo` as a\nworkaround — re-run `but status -fv` to confirm both branches exist and are\napplied, then retry with exact branch names.\n\n### Resolve conflicted commits (after pull, move, or reorder)\n\n**NEVER use `git add`, `git commit`, `git checkout --theirs\u002F--ours`, or any git\nwrite command during resolution.** Only `but resolve` commands plus direct file\nedits. The one exception is a conflicted submodule in edit mode, below.\n\nConflicts do not interrupt operations in GitButler: a rebase always completes,\nand commits that conflicted are marked `{conflicted}` in `but status`. Find them\nfrom the warning that history-editing commands (`move`, `discard`, …) print,\nfrom the `but pull` summary, or from `but status`. Resolve them one conflict at\na time, without entering any mode. Resolve any uncommitted `{conflicted}` files\nfirst, as in Conflicts in uncommitted files; `apply` refuses while one is left.\nWork through one branch at a time, oldest commit first — the loop is:\n\n1. `but resolve conflicts \u003Cbranch>` — shows the conflicts of that branch's\n   oldest conflicted commit, numbered per file. Each conflict has three\n   sections: `ours` (the new base the commit was rebased onto), `base` (common\n   ancestor), and `theirs` (the commit's own version). Without a branch it picks\n   the first conflicted branch and tells you which; the output also says when\n   other conflicted commits exist.\n2. Apply one resolution per command:\n   - Merged\u002Fmixed content (the common case — combine the intent of both sides):\n     pipe it to `but resolve apply \u003Cpath>:\u003CN>` via stdin (heredoc) or pass\n     `--file \u003Cf>`. The content replaces the whole conflicted region; never\n     include conflict markers.\n   - Take a side entirely: `but resolve apply \u003Cpath>:\u003CN> --ours` or `--theirs`\n     (bare `\u003Cpath>` applies the side to all conflicts in that file).\n   - Delegate one conflict to the configured AI model:\n     `but resolve apply \u003Cpath>:\u003CN> --ai` — prefer your own merged content when\n     you have the context.\n   - `apply` targets the same default commit as `conflicts`; when more than one\n     branch is conflicted, pin it with `--commit \u003Cbranch>`.\n3. Go back to step 1 until it reports no conflicts. Commit ids are not stable\n   here — every apply rewrites the commit — but branch names are, so address\n   everything by branch and never bookkeep commit ids. Partial progress is fine:\n   a commit with unresolved conflicts left stays `{conflicted}` with exactly\n   those conflicts.\n\nA wrong resolution is reverted with `but undo`.\n\n`but resolve \u003Ccommit-id> --ai` resolves a whole commit with the configured AI\nmodel in one shot, and `but resolve --ai` without a commit resolves every\nconflicted commit, oldest first — acceptable as a fallback, but you usually have\nbetter context than that model does, so prefer resolving the conflicts yourself\nwith `apply`.\n\n**Use edit mode only when you must run code against the resolution**\n(build\u002Ftests at that commit). Edit mode needs `gitbutler\u002Fworkspace`: while a\nsingle branch is checked out, `but resolve \u003Ccommit-id>` refuses, so use `apply`.\n\n1. `but resolve \u003Ccommit-id>` — enters resolution mode and prints the conflict\n   regions.\n2. **Edit the files** to remove every conflict marker — `\u003C\u003C\u003C\u003C\u003C\u003C\u003C`, `|||||||`\n   (the common-ancestor section), `=======` and `>>>>>>>` — and keep the correct\n   content. Do NOT skip this; do NOT use `but amend` on conflicted commits.\n   - A conflicted submodule has no markers and `finish` refuses until you select\n     its side: see Conflict Resolution Mode in `but skill concepts`.\n3. `but resolve finish` reports leftover markers, surviving uncommitted changes,\n   every remaining conflicted commit, and the exact current `but resolve \u003Cid>`\n   command. Add `--status-after` to the finish you expect to clear the last\n   conflict only when the task needs the complete resulting workspace. When it\n   says no conflicted commits remain, stop; do not run a verification status.\n   Cancel instead with `but resolve cancel --force`, which drops your resolution\n   edits; without `--force` it refuses once the conflict markers are checked\n   out.\n4. Repeat for remaining conflicted commits, oldest first — finishing a lower\n   commit rebases the ones above it.\n\n### A conflicted applied stack can block unrelated mutations\n\nIf a mutation reports `Failed to merge bases while cherry picking commit` while\nanother applied commit is conflicted, inspect the workspace-wide graph before\nblaming the selected changes. Do not retry unrelated mutations while that\nconflict remains unresolved. Preserve the conflicted commit and its order.\n\nRecovery must be independently authorized. Use the existing conflict-resolution\nworkflow, and consider a retry only after recovery and verification of a clean\ngraph. Do not use raw Git to bypass the failure in a managed main worktree.\n\nIf the unrelated task already authorizes an existing linked\u002Fnon-main worktree\nfrom a verified clean live head, use plain Git there and leave the affected\nGitButler workspace untouched. This does not authorize creating a worktree for\nisolation or resolving unrelated work.\n\n### Conflicts in uncommitted files\n\n`but status` marks uncommitted files with unresolved merge conflicts\n`{conflicted}`; they are excluded from committable changes and outside\n`but resolve` mode. Edit the file to the wanted contents with no conflict\nmarkers left (or delete it), then `but resolve \u003Cpath>...` to mark it resolved\nwith that state; it then shows as an ordinary uncommitted change.\n\n## Git-to-But Map\n\n| git                                      | but                                                                                                                     |\n| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| `git status`                             | `but status` for branch\u002Fstack\u002Fcommit overview; `but status -fv` for file details; `but diff` for selected dirty changes |\n| `git add` + `git commit`                 | `but commit -b \u003Cbranch> -m ... \u003Cids>`                                                                                   |\n| `git checkout -b` + commit               | `but commit -b \u003Cnew-branch> -m ... \u003Cids>`                                                                               |\n| `git push`                               | `but push \u003Cbranch-name>`                                                                                                |\n| `git rebase -i`                          | `but move`, `but squash`, `but reword`                                                                                  |\n| `git rebase --onto`                      | `but move \u003Cbranch> --above \u003Cnew-base>`                                                                                  |\n| `git checkout -- \u003Cfile>` \u002F `git restore` | `but discard \u003Cpath>`, or a hunk ID from `but diff`                                                                      |\n| `git cherry-pick`                        | `but pick`                                                                                                              |\n| `git fetch`                              | `but pull --check` (fetches; changes no branch)                                                                         |\n| `git pull` on a branch others pushed to  | `but branch update \u003Cbranch>`, then `but pull`                                                                           |\n| `git worktree add -b \u003Cbranch>`           | `but worktree new \u003Cbranch>`                                                                                             |\n| `git worktree remove`                    | `but worktree remove \u003Cname>`                                                                                            |\n| `gh pr create`                           | `but pr new \u003Cbranch-name> -m \"Title...\"`                                                                                |\n\n## Notes\n\n- `but` needs no setup in a Git repository. `HEAD` is either one checked-out\n  branch, marked `[HEAD]` in `but status`, or `gitbutler\u002Fworkspace`, which\n  merges every applied stack. Applying a second stack, or applying a branch\n  while the target branch is checked out, switches to `gitbutler\u002Fworkspace`;\n  unapplying back to one stack checks that branch out again. Commands and IDs\n  are the same either way. It does need a local branch tracking the remote's\n  default branch: if commands fail with \"No target branch is configured\", run\n  `but config target origin\u002Fmain` (with the default branch's name), which\n  creates `main` to track it if missing. Never `git branch --set-upstream-to` on\n  your own branch, which makes that branch the target.\n- `but undo` restores the whole snapshot, so uncommitted edits made after the\n  undone operation are lost (`but redo` brings them back).\n- Read-only git inspection (`git log`, `git blame`, `git show --stat`) is\n  allowed.\n- If `but` prints an `AGENT ACTION REQUIRED` skill warning, run the suggested\n  command once, then reload\u002Fuse the GitButler skill. If it repeats, report it\n  instead of retrying.\n- For command syntax and flags: `but skill reference`\n- For workspace model: `but skill concepts`\n- For workflow examples: `but skill examples`\n","# GitButler CLI Skill\n\nUse GitButler CLI (`but`) in verified GitButler-managed main worktrees. The\ninstalled wrapper rejects all invocations from linked worktrees; use plain Git\nin linked\u002Fnon-main worktrees and unmanaged repositories. Native CLI worktree\ncapabilities described below are reference information, not permission to bypass\nthis local routing policy.\n\nBefore any history edit or conflict resolution, compare `but --version` with\nthis skill's declared version. Do not translate syntax from a stale version\nreport; consult the installed CLI's help when versions differ.\n\n## Start Here\n\nChoose the narrowest first command by task; avoid ritual status checks:\n\n```bash\n# Selected dirty files\u002Fhunks:\nbut diff\n\n# Commit order, branch\u002Fstack placement, conflict overview:\nbut status\n\n# File IDs, per-commit files, amend details:\nbut status -fv\n\n# What one applied branch or commit changed, for review:\nbut diff \u003Cbranch-or-commit>\n\n# Details for one known branch or commit:\nbut show \u003Cid>\n```\n\nDo not run plain `but status` and then `but status -fv` unless the compact\noutput lacks file details needed for the task.\n\nFor \"commit just\u002Fonly\u002Fspecific changes on a new branch\", use the fast path:\n\n```bash\nbut diff\nbut commit -b \u003Cbranch> -m \"\u003Cmsg>\" \u003Cid> \u003Cid>\n```\n\n`but commit -b \u003Cbranch> ...` creates the branch when it does not exist and\nprints the created commit. Do not run a separate `but branch new`, status\ncommand, or verification diff unless the task needs workspace information that\nthe result does not provide.\n\nIn a linked worktree, such as `.claude\u002Fworktrees\u002F*`, omit `-b` so the commit\ngoes on the branch the worktree has checked out. Use that branch as the new\nbranch; do not stack another one on it. A worktree with a detached HEAD has no\nbranch yet. There, `but commit -b \u003Cnew-name> -m \"\u003Cmsg>\"` creates the branch at\nHEAD, checks it out in that worktree, and commits to it.\n\n## IDs\n\nThe first token on each `but diff` \u002F `but status` line is that line's ID. When a\ncommand needs an ID, copy it exactly from the current output; never hardcode or\ninvent one. ID lifetimes differ by entity:\n\n- Changes and sources are **positional, space-separated** IDs\n  (`but commit -b feat -m \"msg\" uvw:2e4 uvw:e2c`). An uncommitted hunk ID is\n  written `\u003Cfile-id>:\u003Chunk-id>` (e.g. `uvw:2e4`, copied from bare `but diff`) —\n  the part after the colon is the hunk's ID, **not** a line range (`uvw:16-40`\n  is invalid). Do not invent flags like `--changes` \u002F `--hunk` \u002F `--ids`, pass a\n  line range, or comma-separate IDs — `uvw,qyo` is parsed as one ID and fails.\n- `but diff` is the exception: it accepts at most **one** target. Bare\n  `but diff` shows all uncommitted files; inspect committed files or other\n  entities one target at a time — never `but diff \u003Cid> \u003Cid>`.\n- A committed file is `\u003Ccommit-id>:\u003Cfile-id>` (e.g. `mzm:uvw`, shown under each\n  commit). A committed hunk is `\u003Ccommit-id>:\u003Cfile-id>:\u003Chunk-id>` and is shown by\n  `but diff \u003Ccommit-id>`. `@` means the uncommitted area.\n- Commit IDs are stable change IDs that survive history edits (`amend`,\n  `squash`, `move`, `uncommit`, `reword`). Commits without a change ID (e.g.\n  upstream-only) lead with a sha prefix instead, and `#N`-suffixed refs\n  disambiguate duplicates — both go stale after history edits, and a stale sha\n  can silently resolve to the wrong commit. The `(sha …)` on verbose commit\n  lines is informational — do not pass it to commands.\n- Branch short IDs are snapshot-local selectors. Use full branch names for\n  branch-targeting mutations; short IDs are safe only for immediate read-only\n  inspection.\n- File\u002Fhunk IDs copied from one diff read generally remain usable across chained\n  commits. If one stops resolving, re-read `but diff` and retry.\n\n**Chaining:** mutation output is concise by default, so you may chain mutations\nwith `&&` off one inspection read. Do not chain branch short IDs through\nmutations; use full branch names. Add `--status-after` only when the next step\nneeds workspace IDs or details that the mutation result does not provide.\nChained `but commit` calls stack in the order written — the first is oldest,\neach later one goes on top. History edits may run in sequence when every commit\nref involved is a change-ID ref; run them one at a time with `--status-after`\nwhen a ref is sha-based or `#N`-suffixed, or when the next command needs freshly\nissued IDs. Chaining `but uncommit \u003Cid> && but diff` is safe because bare `diff`\nneeds no ID from the uncommit output. Never pipe a mutation through `tail` or\n`head`: the pipeline then exits with their status, so the next `&&` runs even\nwhen the mutation failed.\n\n## Non-Negotiable Rules\n\n1. Use `but` for all write operations. Never run `git add`, `git commit`,\n   `git push`, `git fetch`, `git pull`, `git checkout`, `git merge`,\n   `git rebase`, `git stash`, or `git cherry-pick`; `but pull --check` fetches.\n   The only exceptions are selecting a side of a conflicted submodule in\n   resolution mode (see Resolve conflicted commits) and creating a missing\n   target branch (see Notes). If the user says a `git` write command, translate\n   it to `but` and run that.\n2. Mutation commands print their result without appending workspace status. Add\n   `--status-after` only when the next step needs resulting workspace IDs or\n   details; otherwise trust the mutation result and do not run a verification\n   status\u002Fdiff.\n3. Branches marked `(merged upstream)` have landed; start new work on another\n   branch. That marker alone does not mean `but pull` removes them: run\n   `but pull --check` first. `but pull` removes only branches listed\n   `[integrated]` (\"has been integrated upstream and removed locally\", or \"has\n   been merged into \u003Ctarget> and removed\" when the target has no upstream) and\n   rebases the rest, which stay applied. To clear a landed branch that stays\n   applied, use `but unapply \u003Cbranch>` (acts on its whole stack) rather than\n   `but discard`. `push` and mutations (`commit`, `amend`, `squash`, `uncommit`,\n   `reword`, `move`) refuse landed branches and commits, `absorb` skips them\n   with a notice, and `commit` skips them when picking a default target.\n4. Keep going between routine `but` commands. Put any status note in the same\n   message as the next command, and don't end a turn on a summary that announces\n   the next `but` step without running it. Finish with a concise summary.\n5. Prefer this skill and `but skill reference` over exploratory help calls. Use\n   `\u003Ccommand> --help` when required syntax is missing or a command fails; use\n   top-level help only when you genuinely need to discover an undocumented\n   command.\n6. Other agents may share this checkout, so `@` can hold their edits. Commit,\n   amend, and discard only the IDs or paths you changed. Bare `but commit`,\n   `but absorb`, `but discard @`, and `git stash` take their work too, and a\n   refusal naming files you didn't edit means you selected theirs.\n\n## Command Patterns\n\n- Initialize a Git repository: `but init` (current directory) or\n  `but -C \u003Cpath> init`. Non-interactive; creates no commits, remotes, or\n  GitButler workspace. Existing repositories are left unchanged. In a repository\n  with no commits, make the first commit with a bare `but commit -m \"\u003Cmsg>\"`;\n  `-b` is refused there.\n\n- Commit: `but commit -b \u003Cbranch> -m \"\u003Cmsg>\" \u003Cid> \u003Cid>` — `-b \u003Cbranch>` creates\n  the branch if it does not exist\n- Commit everything uncommitted: `but commit -b \u003Cbranch> -m \"\u003Cmsg>\"` (omit the\n  IDs)\n- Several commits from one diff: chain `but commit` calls with `&&` (commits\n  stack oldest-first)\n- Never pass `-s` to `commit`, `move`, or `pick`: it is `--switch`, not git's\n  `--signoff`, and it unapplies every other stack.\n- The branch is never positional (`but commit \u003Cbranch>` fails; use `-b`),\n  `but amend` always needs `-t`, and `but diff` takes one target (use a shared\n  `dir\u002F` or one call each).\n- Commit at a specific history position: `--above \u003Ccommit-or-branch>` or\n  `--below \u003Ccommit-or-branch>` (mutually exclusive). With a branch target, add\n  `-b \u003Cnew-name>` to name the new branch; otherwise its name is generated. The\n  name must not already exist. Do not combine `-b` (even without a name) with\n  commit\u002Fworktree targets.\n- Targeting is **required** when more than one **stack** is applied; without it\n  `but commit` fails with \"Unclear where to commit. Found more than one stack\".\n  Several branches stacked together count as one stack — an untargeted commit\n  then silently lands on the stack's top branch, so pass `-b` whenever the\n  branch matters.\n- Always pass `-m \"\u003Cmsg>\"` (or `-F -` with a heredoc, `-F \u003Cfile>` with a file\n  outside the repository, or `--no-message`) to `but commit`, and to\n  `but squash` whenever its sources are commits or branches unless the target is\n  `@` (squash also takes `-u` to keep the target's message) — those compose a\n  new message; without a flag an agent run keeps whatever the command composed\n  (empty for `but commit`, the joined source messages for `but squash`) and a\n  terminal opens an editor. Squash sources that are uncommitted or committed\n  changes reuse the target's message and need no flag; squashing into `@`\n  rejects message flags outright.\n- Amend: `but amend -t \u003Ccommit-or-branch> \u003Cfile-or-hunk-id> \u003Cfile-or-hunk-id>` —\n  a branch target resolves to its newest commit\n- Uncommit: `but uncommit \u003Ccommit-id>` (whole commit), `but uncommit \u003Cbranch>`\n  (all commits and remove branch), `but uncommit \u003Ccommit-id>:\u003Cfile-id>`\n  (committed file), or `but uncommit \u003Ccommit-id>:\u003Cfile-id>:\u003Chunk-id>` (committed\n  hunk); committed files and hunks may be mixed, but all must come from one\n  commit\n- Copy commits (sources stay unchanged):\n  `but pick \u003Csha> [\u003Csha>...] -b \u003Cnew-branch>` puts the copies on a new\n  independent branch from the target, `-b \u003Cexisting-branch>` on that applied\n  branch's tip, and `--above \u003Cbranch> -b \u003Cnew-name>` (or `--below`) on a new\n  branch stacked there. Pick applies sources in the order given, so pass them\n  oldest first. For a branch that is not applied, list SHAs with\n  `git log --reverse \u003Ctarget>..\u003Cbranch>` and inspect them with `git show` or\n  `but show \u003Csha>`; `but diff` and the IDs that `but branch show` prints for it\n  do not work.\n- Move committed changes into an existing commit or `@`:\n  `but squash \u003Ccommit-id>:\u003Cfile-id> -t \u003Ccommit-id-or-@>` for a committed file;\n  `but squash \u003Ccommit-id>:\u003Cfile-id>:\u003Chunk-id> -t \u003Ccommit-id-or-@>` for a\n  committed hunk; all sources must come from one commit\n- Move committed changes into a new commit at a chosen position:\n  `but move \u003Ccommit-id>:\u003Cfile-id> --above \u003Ccommit-or-branch> -m \"\u003Cmsg>\"` for a\n  committed file;\n  `but move \u003Ccommit-id>:\u003Cfile-id>:\u003Chunk-id> --above \u003Ccommit-or-branch> -m \"\u003Cmsg>\"`\n  for a committed hunk (`--below`, `--branch`, and `--unstack` also work)\n- `but split` and a `but move` of committed changes name their new commit with\n  `-m` or `-F` too; without either the commit gets an empty message. `but move`\n  rejects `-m`\u002F`-F` for whole-commit and branch sources.\n- Move commit to branch top: `but move \u003Ccommit-id> -b \u003Cbranch>`\n- Move commits or committed changes onto a new named branch:\n  `but move \u003Csource> --above \u003Cbranch> -b \u003Cnew-name>` (`--below` also works); use\n  `but move \u003Csource> --unstack -b \u003Cnew-name>` for an independent branch. Omit\n  `-b` for a generated name. Naming is not supported when stacking or unstacking\n  a branch source.\n- Discard: `but discard \u003Cid> [\u003Cid>...]` — accepts branches, commits, committed\n  changes, uncommitted changes, or `@` for all uncommitted changes\n- Push: `but push \u003Ctop-branch>` — pushes the selected branch and its ancestors;\n  to update a stack, select its top branch once and never loop. Bare `but push`\n  pushes all unpushed work when run non-interactively — one push per stack (its\n  topmost unpushed branch, ancestors included), and the output lists every\n  branch it pushed. It exits non-zero if any stack failed; stacks that already\n  pushed stay pushed, and rerunning after fixing the failure is safe (up-to-date\n  stacks are skipped). `but push` and `but pr new` replace the remote branch: if\n  others may have pushed to it, bring their commits in first (see Bring in\n  commits pushed to a branch's own remote).\n- Create PR:\n  `but pr new \u003Cbranch-name> [-m \"Title...\"] [-F - | -F \u003Cfile>] [-t] [--draft]` —\n  auto-pushes first; do not run `but push` before it\n\n## Task Recipes\n\n### Update workspace from main\n\nFor \"get latest from main\", \"update\u002Fsync this workspace\", \"rebase onto main\", or\n\"pull main\":\n\n1. `but pull` — one command; no preflight needed. Its output reports the\n   resulting state, and `but undo` reverts it. Uncommitted changes that conflict\n   with the update get conflict markers and show as `{conflicted}`; resolve them\n   as in Conflicts in uncommitted files.\n2. If commits come back conflicted, resolve them with the\n   `but resolve conflicts \u003Cbranch>` and `but resolve apply` loop in Resolve\n   conflicted commits, one branch at a time. When `HEAD` is\n   `gitbutler\u002Fworkspace`, `but pull` prints `but resolve \u003Ccommit>` as the next\n   step; that is edit mode, which is only for running code against a resolution.\n\n`but pull --check` answers \"would this conflict?\" without updating. Do not use\nit as a routine preflight; use it when the user asks for a preview, you need a\nfetch, repository policy requires one, other agents' branches may move, or an\napplied branch was just merged upstream (see rule 3).\n\nRebasing applied branches onto the latest target IS `but pull` — never `move`,\n`config target`, `unapply`, or raw `git pull`\u002F`git rebase`. The base shown in\nstatus is the last FETCHED state: when `git log` shows the remote target (for\nexample `origin\u002Fmain`) ahead of it, that is exactly the update `but pull`\nfetches and applies — the target setting is not stale and repointing it is never\nthe fix. Pull carries uncommitted changes along; there is no stash, so do not\nhand-revert files.\n\n### Bring in commits pushed to a branch's own remote\n\n`but pull` only rebases onto the target. Commits someone pushed to your branch's\nremote show in `but status` under `(upstream: on \u003Cremote>\u002F\u003Cbranch>)`, above the\nbranch's own commits; if status may be stale, run `but pull --check` to fetch.\n\n1. `but branch update \u003Cbranch>`, once, on the branch they pushed to.\n2. Then `but pull` if the target moved too. Update before pulling. If the branch\n   was rebased since its last push (for example by an earlier `but pull`), the\n   update leaves an empty `(no changes)` copy of a shared commit. On a single\n   branch, `but discard` that copy by its `#N` ref. In a stack, `but undo` the\n   update and tell the user, because the update can also move commits into the\n   lower branch. Do not update a second time, even if `(upstream: …)` still\n   lists commits, because a second update duplicates commits.\n\n### Commit selected files or hunks\n\n1. `but diff` — shows file and hunk IDs for uncommitted changes. Do not run\n   plain `but status` first.\n2. Use file IDs when whole files belong in the commit; use hunk IDs\n   (`\u003Cfile-id>:\u003Chunk-id>`) when only part of a file belongs. Omit IDs you don't\n   want committed. For whole files, repo-root paths or a `dir\u002F` prefix work too\n   (`but commit -b feat -m \"msg\" src\u002Fui\u002F README.md`; no `.\u002F` or globs), so don't\n   build ID lists by piping `but diff` through grep.\n3. `but commit -b \u003Cbranch> -m \"\u003Cmsg>\" \u003Cid1> \u003Cid2>` — the branch is created if it\n   does not exist, so no prior `but branch new` is needed.\n4. When the task requires knowing which changes remain, add `--status-after`;\n   otherwise the created-commit result is sufficient.\n\nEdge case: if wanted and unwanted edits are in the same diff hunk, GitButler\ncannot split that hunk by ID. Only when the task requires keeping part of that\nhunk uncommitted, temporarily edit the working tree to isolate the wanted lines,\ncommit those IDs, then restore the leftover lines so they remain uncommitted.\n\n### Amend into existing commit\n\n1. `but status -fv` for the target commit ID and file IDs; `but diff` for hunk\n   IDs when only part of a file belongs.\n2. `but amend -t \u003Ccommit-id> \u003Cid> \u003Cid>` — one command per target commit. For\n   several target commits, chain the amends with `&&` when every target is a\n   change-ID ref; otherwise run them one at a time with `--status-after` to get\n   fresh refs.\n\n### Split an existing commit\n\nFor a two-way split, move selected committed files or hunks directly into a new\ncommit:\n\n1. `but diff \u003Csource-commit-id>` — read committed file and hunk IDs.\n2. `but split \u003Ccommitted-file-or-hunk-id> [\u003Ccommitted-file-or-hunk-id>...] -m \"\u003Cmessage>\"`\n   — sources may mix files and hunks, but must come from one commit. The command\n   creates the named commit immediately above the source and leaves unselected\n   changes and the original message in the source. No follow-up reword is needed\n   for the new commit.\n3. Add `--status-after` only when the next step needs workspace IDs or details\n   not provided by the mutation result.\n\nFor more than two replacement commits, repeat `but split ... -m \"\u003Cmessage>\"`\nusing the remaining source's committed changes, or use the uncommit\u002Frecommit\nworkflow below when rebuilding the entire commit:\n\n1. `but status -fv` when you need the source commit, branch name, or placement\n   anchor.\n2. `but uncommit \u003Csource-commit-id> && but diff` in one shell call exposes the\n   commit's changes and prints the resulting file and hunk IDs.\n3. Pick replacement contents from that dirty diff, not from the old committed\n   diff.\n4. Determine the requested chronological order from the user's wording, then\n   create the replacement commits oldest-first by chaining `but commit` calls.\n   Do not reverse that order to match `but status`, which displays commits\n   newest-first. `-b \u003Cbranch>` puts each new commit at the TOP of that branch —\n   if the split commit had commits above it, the replacements now sit above\n   those preserved commits.\n5. **If commits from that branch must stay ABOVE the replacements, put the\n   preserved block back on top instead of fighting anchors.** Do not anchor with\n   `--above \u003Ctop>`\u002F`--below \u003Ctop>` (sha\u002F`#N` anchors go stale as each insert\n   rewrites history). Move the block together so its internal order stays\n   intact: append `&& but move \u003Cpreserved-id> [\u003Cpreserved-id>...] -b \u003Cbranch>`\n   to the commit chain. Change-ID refs from step 1 stay valid; wait for fresh\n   output first if any preserved ref is sha-based or `#N`-suffixed.\n6. Leave unwanted changes uncommitted. Replacements created oldest-first appear\n   newest-first in status — that is correct; do not reorder them. Add\n   `--status-after` to the final mutation when you need to inspect the resulting\n   order.\n\n### Reorder commits\n\n`but status` displays commits newest\u002Ftop first, while task specs often list\nhistory oldest to newest — translate before moving.\n\n1. `but status` once to get commit IDs (use `-fv` only if you also need file\n   details).\n2. `but move \u003Csource> --below \u003Ctarget-commit>` places source immediately below\n   target in `but status` (older in oldest-to-newest history). `--above` places\n   it immediately above (newer). `but move \u003Csource> -b \u003Cbranch>` moves it to\n   branch top\u002Fnewest.\n3. For an adjacent block, run ONE move, anchored either way:\n   `but move \u003Cblock-id> \u003Cblock-id> --below \u003Cfollowing-commit-id>` or\n   `but move \u003Cblock-id> \u003Cblock-id> --above \u003Cpreceding-commit-id>`. Pick an\n   anchor outside the block; source order does not matter and the block keeps\n   its internal order. Add `--status-after` when you need to inspect the\n   resulting order; do not move the anchor or block members again.\n4. For other reorders, make the smallest set of moves.\n\n### Squash commits\n\n1. `but status` for commit IDs and order.\n2. Name the sources positionally and the result\u002Ftarget commit with `-t`:\n   `but squash \u003Csource> [\u003Csource>...] -t \u003Ctarget> -m \"\u003Cnew message>\"`.\n3. To collapse an entire branch into one commit, pass just the branch and no\n   `-t`: `but squash \u003Cbranch> -m \"\u003Cnew message>\"`.\n4. Multiple independent groups may run in sequence off one status read (targets\n   keep their change-ID refs); prefer newer\u002Ftop groups first. Take fresh refs\n   only when a ref is sha-based or `#N`-suffixed.\n5. Add `--status-after` to the final squash when you need to inspect the\n   resulting history; do not re-verify with a separate status.\n\n### Stack existing branches\n\nTo make one existing branch depend on another:\n`but move \u003Cchild-branch-name> --above \u003Cparent-branch-name>` (use full branch\nnames; commit reordering uses commit IDs). To unstack:\n`but move \u003Cbranch-name> --unstack`.\n\n**DO NOT** stack via `uncommit` + `branch delete` + `branch new --above`, and do\nnot use `but undo` to unstack.\n\n### Work in a linked worktree\n\n1. `but worktree new \u003Cbranch-name>` checks out that branch in a new directory,\n   creating it if needed (an existing branch must not be in the workspace), and\n   prints that directory. Add `-A \u003Cbranch-or-commit>` to start the branch there\n   instead of the workspace base; it takes any Git revision, like a SHA or\n   `origin\u002Fmain`. Worktrees made by other tools must sit outside the repository\n   directory or be listed in `.git\u002Finfo\u002Fexclude`; otherwise a bare `but commit`\n   in the main checkout records them in the branch.\n2. Run `but` from that directory, or with `but -C \u003Cpath>`. There, a bare\n   `but commit -m \"\u003Cmsg>\"` or `but diff` takes that worktree's changes, a bare\n   path names a file there, and the commit goes on the worktree's branch. Do the\n   work on that branch, also in a worktree another tool made. `-b \u003Cnew-name>` is\n   refused there, except in a worktree with a detached HEAD, where it names the\n   worktree's branch; stack a new branch on it only when the user asks for a\n   separate branch. `but undo` doesn't restore a branch a worktree has checked\n   out. It refuses, or it reports success and leaves that branch as it is, so\n   undoing a `move` out of the branch leaves the commit on neither branch.\n   Reverse a command that changed the worktree's branch with its inverse\n   (`uncommit`, `reword`, or `move` the commit back), also when you ran it from\n   another checkout.\n3. `but status` from any checkout shows the worktree as a lane of its own, with\n   the same IDs everywhere. `@` always means the main worktree's uncommitted\n   changes; `\u003Cworktree>:@` names a linked worktree's changes from anywhere.\n4. Push and open PRs as for any branch (`but pr new \u003Cbranch-name>`). `but pull`\n   also rebases worktree branches. If that leaves a worktree commit\n   `{conflicted}`, the branch name doesn't find it: take its commit ID from\n   `but status` and run `but resolve conflicts \u003Ccommit-id>`, then\n   `but resolve apply \u003Cpath>:\u003CN> --commit \u003Ccommit-id>`. Each apply rewrites the\n   commit: refresh SHA-based or `#N`-suffixed IDs from `but status -fv` before\n   the next conflict query or apply; do not reuse a stale target.\n5. When done, `but worktree remove \u003Cname>` deletes the directory and keeps the\n   branch. It refuses while the worktree has uncommitted changes; `-f` discards\n   them. To delete the branch as well, run `but branch delete \u003Cname>`\n   afterwards.\n\n### Create or manage pull requests\n\n`but pr new \u003Cbranch-name>` pushes the selected branch and its ancestors, then\ncreates the PR in one step — no prior `but push`. Provide `-F -` with a heredoc\nor `-F \u003Cfile>` (first line is the title), `-t`, or `-m` with real newlines\n(zsh\u002Fbash: `-m $'Title\\n\\nBody'`) so no editor opens. Do not write the message\nto a file inside the repository: the next `but commit` would commit it. If forge\nauth is missing, ask the user to run `but config forge auth` in a terminal; it\nrefuses non-interactive runs.\n\nIf you do create a PR for a stacked branch, use `but pr` — not `gh pr create`\n(only `but pr` sets PR bases and stack metadata; `gh pr create` breaks that). To\npublish a whole stack: `but pr new \u003Ctop-branch-name> -t`. Manage with\n`but pr auto-merge|set-draft|set-ready \u003Cselector>`; selectors can be a branch\nname, current branch\u002Fstack CLI ID, or numeric review ID. See\n`but skill reference` for details.\n\nWhen `but pr new` prints a `\u003Cpr-created>` line, copy that line into the text of\nyour reply. It tells the app running you that this session opened the PR.\n\nIf you run in the Claude desktop app, end the `but pr new` line with the shell\ncomment `# gh pr create`, for example\n`but pr new \u003Cbranch-name> -F - \u003C\u003C'EOF' # gh pr create`. While\n`gitbutler\u002Fworkspace` is checked out, the app counts a PR as opened by this\nsession only when the command text contains `gh pr create`.\n\n### Dependency conflict with another branch\n\nChanges that build on another branch's commits cannot land on an independent\nbranch. `but commit` and `but amend` fail atomically (\"Cannot commit: N changes\ncould not be applied\"), naming the branch and commit each rejected change\ndepends on — nothing is committed and no `-b` branch is created.\n\nStack only when your change builds on that branch's code. A refusal can also\nmean your hunk only borders lines that branch changed (a doc line, a lockfile):\nthen leave one unchanged line between your edit and theirs, or keep that hunk\nuncommitted until that branch lands, and commit the rest. Never drop or rewrite\nreal work to get past a refusal; ask the user.\n\nWhen there is a single dependency branch, the error's Hint gives the exact\nrecovery command: `but move \u003Cyour-branch> --above \u003Cdependency-branch>` to stack\nan existing branch on its dependency, or\n`but branch new \u003Cname> --above \u003Cdependency-branch>` when the target branch\ndidn't exist yet. Run it, then retry the original command. When the error names\ndependencies without a Hint (several dependency branches, or the dependency is\non the target branch itself), run `but status -fv` to see where the dependent\ncommits live before choosing a placement.\n\nIf that recovery command fails, do NOT try `uncommit`, `squash`, or `undo` as a\nworkaround — re-run `but status -fv` to confirm both branches exist and are\napplied, then retry with exact branch names.\n\n### Resolve conflicted commits (after pull, move, or reorder)\n\n**NEVER use `git add`, `git commit`, `git checkout --theirs\u002F--ours`, or any git\nwrite command during resolution.** Only `but resolve` commands plus direct file\nedits. The one exception is a conflicted submodule in edit mode, below.\n\nConflicts do not interrupt operations in GitButler: a rebase always completes,\nand commits that conflicted are marked `{conflicted}` in `but status`. Find them\nfrom the warning that history-editing commands (`move`, `discard`, …) print,\nfrom the `but pull` summary, or from `but status`. Resolve them one conflict at\na time, without entering any mode. Resolve any uncommitted `{conflicted}` files\nfirst, as in Conflicts in uncommitted files; `apply` refuses while one is left.\nWork through one branch at a time, oldest commit first — the loop is:\n\n1. `but resolve conflicts \u003Cbranch>` — shows the conflicts of that branch's\n   oldest conflicted commit, numbered per file. Each conflict has three\n   sections: `ours` (the new base the commit was rebased onto), `base` (common\n   ancestor), and `theirs` (the commit's own version). Without a branch it picks\n   the first conflicted branch and tells you which; the output also says when\n   other conflicted commits exist.\n2. Apply one resolution per command:\n   - Merged\u002Fmixed content (the common case — combine the intent of both sides):\n     pipe it to `but resolve apply \u003Cpath>:\u003CN>` via stdin (heredoc) or pass\n     `--file \u003Cf>`. The content replaces the whole conflicted region; never\n     include conflict markers.\n   - Take a side entirely: `but resolve apply \u003Cpath>:\u003CN> --ours` or `--theirs`\n     (bare `\u003Cpath>` applies the side to all conflicts in that file).\n   - Delegate one conflict to the configured AI model:\n     `but resolve apply \u003Cpath>:\u003CN> --ai` — prefer your own merged content when\n     you have the context.\n   - `apply` targets the same default commit as `conflicts`; when more than one\n     branch is conflicted, pin it with `--commit \u003Cbranch>`.\n3. Go back to step 1 until it reports no conflicts. Commit ids are not stable\n   here — every apply rewrites the commit — but branch names are, so address\n   everything by branch and never bookkeep commit ids. Partial progress is fine:\n   a commit with unresolved conflicts left stays `{conflicted}` with exactly\n   those conflicts.\n\nA wrong resolution is reverted with `but undo`.\n\n`but resolve \u003Ccommit-id> --ai` resolves a whole commit with the configured AI\nmodel in one shot, and `but resolve --ai` without a commit resolves every\nconflicted commit, oldest first — acceptable as a fallback, but you usually have\nbetter context than that model does, so prefer resolving the conflicts yourself\nwith `apply`.\n\n**Use edit mode only when you must run code against the resolution**\n(build\u002Ftests at that commit). Edit mode needs `gitbutler\u002Fworkspace`: while a\nsingle branch is checked out, `but resolve \u003Ccommit-id>` refuses, so use `apply`.\n\n1. `but resolve \u003Ccommit-id>` — enters resolution mode and prints the conflict\n   regions.\n2. **Edit the files** to remove every conflict marker — `\u003C\u003C\u003C\u003C\u003C\u003C\u003C`, `|||||||`\n   (the common-ancestor section), `=======` and `>>>>>>>` — and keep the correct\n   content. Do NOT skip this; do NOT use `but amend` on conflicted commits.\n   - A conflicted submodule has no markers and `finish` refuses until you select\n     its side: see Conflict Resolution Mode in `but skill concepts`.\n3. `but resolve finish` reports leftover markers, surviving uncommitted changes,\n   every remaining conflicted commit, and the exact current `but resolve \u003Cid>`\n   command. Add `--status-after` to the finish you expect to clear the last\n   conflict only when the task needs the complete resulting workspace. When it\n   says no conflicted commits remain, stop; do not run a verification status.\n   Cancel instead with `but resolve cancel --force`, which drops your resolution\n   edits; without `--force` it refuses once the conflict markers are checked\n   out.\n4. Repeat for remaining conflicted commits, oldest first — finishing a lower\n   commit rebases the ones above it.\n\n### A conflicted applied stack can block unrelated mutations\n\nIf a mutation reports `Failed to merge bases while cherry picking commit` while\nanother applied commit is conflicted, inspect the workspace-wide graph before\nblaming the selected changes. Do not retry unrelated mutations while that\nconflict remains unresolved. Preserve the conflicted commit and its order.\n\nRecovery must be independently authorized. Use the existing conflict-resolution\nworkflow, and consider a retry only after recovery and verification of a clean\ngraph. Do not use raw Git to bypass the failure in a managed main worktree.\n\nIf the unrelated task already authorizes an existing linked\u002Fnon-main worktree\nfrom a verified clean live head, use plain Git there and leave the affected\nGitButler workspace untouched. This does not authorize creating a worktree for\nisolation or resolving unrelated work.\n\n### Conflicts in uncommitted files\n\n`but status` marks uncommitted files with unresolved merge conflicts\n`{conflicted}`; they are excluded from committable changes and outside\n`but resolve` mode. Edit the file to the wanted contents with no conflict\nmarkers left (or delete it), then `but resolve \u003Cpath>...` to mark it resolved\nwith that state; it then shows as an ordinary uncommitted change.\n\n## Git-to-But Map\n\n| git                                      | but                                                                                                                     |\n| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| `git status`                             | `but status` for branch\u002Fstack\u002Fcommit overview; `but status -fv` for file details; `but diff` for selected dirty changes |\n| `git add` + `git commit`                 | `but commit -b \u003Cbranch> -m ... \u003Cids>`                                                                                   |\n| `git checkout -b` + commit               | `but commit -b \u003Cnew-branch> -m ... \u003Cids>`                                                                               |\n| `git push`                               | `but push \u003Cbranch-name>`                                                                                                |\n| `git rebase -i`                          | `but move`, `but squash`, `but reword`                                                                                  |\n| `git rebase --onto`                      | `but move \u003Cbranch> --above \u003Cnew-base>`                                                                                  |\n| `git checkout -- \u003Cfile>` \u002F `git restore` | `but discard \u003Cpath>`, or a hunk ID from `but diff`                                                                      |\n| `git cherry-pick`                        | `but pick`                                                                                                              |\n| `git fetch`                              | `but pull --check` (fetches; changes no branch)                                                                         |\n| `git pull` on a branch others pushed to  | `but branch update \u003Cbranch>`, then `but pull`                                                                           |\n| `git worktree add -b \u003Cbranch>`           | `but worktree new \u003Cbranch>`                                                                                             |\n| `git worktree remove`                    | `but worktree remove \u003Cname>`                                                                                            |\n| `gh pr create`                           | `but pr new \u003Cbranch-name> -m \"Title...\"`                                                                                |\n\n## Notes\n\n- `but` needs no setup in a Git repository. `HEAD` is either one checked-out\n  branch, marked `[HEAD]` in `but status`, or `gitbutler\u002Fworkspace`, which\n  merges every applied stack. Applying a second stack, or applying a branch\n  while the target branch is checked out, switches to `gitbutler\u002Fworkspace`;\n  unapplying back to one stack checks that branch out again. Commands and IDs\n  are the same either way. It does need a local branch tracking the remote's\n  default branch: if commands fail with \"No target branch is configured\", run\n  `but config target origin\u002Fmain` (with the default branch's name), which\n  creates `main` to track it if missing. Never `git branch --set-upstream-to` on\n  your own branch, which makes that branch the target.\n- `but undo` restores the whole snapshot, so uncommitted edits made after the\n  undone operation are lost (`but redo` brings them back).\n- Read-only git inspection (`git log`, `git blame`, `git show --stat`) is\n  allowed.\n- If `but` prints an `AGENT ACTION REQUIRED` skill warning, run the suggested\n  command once, then reload\u002Fuse the GitButler skill. If it repeats, report it\n  instead of retrying.\n- For command syntax and flags: `but skill reference`\n- For workspace model: `but skill concepts`\n- For workflow examples: `but skill examples`\n",{"name":5,"author":42,"version":43,"description":7},"GitButler Team","0.23.2","master","3291f8ece8024ea4da33c03a02d3666131d61f23","ai\u002Fskills\u002Fgitbutler",0,"https:\u002F\u002Fgithub.com\u002F0xgleb\u002Fdotconfig","https:\u002F\u002Fgithub.com\u002F0xgleb","2026-11-14 09:46:23",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add 0xgleb\u002Fdotconfig --skill but",{"tool":57,"command":58},"bunx","bunx skills add 0xgleb\u002Fdotconfig --skill but",{"tool":60,"command":61},"pnpm","pnpm dlx skills add 0xgleb\u002Fdotconfig --skill but","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002F0xgleb\u002Fdotconfig\u002Fblob\u002Fmaster\u002Fai\u002Fskills\u002Fgitbutler\u002FSKILL.md",true,[65,71,75],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fconcepts.md","REFERENCE","参考文档",17926,"https:\u002F\u002Fgithub.com\u002F0xgleb\u002Fdotconfig\u002Fblob\u002Fmaster\u002Fai\u002Fskills\u002Fgitbutler\u002Freferences\u002Fconcepts.md",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fexamples.md",11784,"https:\u002F\u002Fgithub.com\u002F0xgleb\u002Fdotconfig\u002Fblob\u002Fmaster\u002Fai\u002Fskills\u002Fgitbutler\u002Freferences\u002Fexamples.md",{"path":76,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Freference.md",25186,"https:\u002F\u002Fgithub.com\u002F0xgleb\u002Fdotconfig\u002Fblob\u002Fmaster\u002Fai\u002Fskills\u002Fgitbutler\u002Freferences\u002Freference.md",[80,104,129,155,180,197],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":37},"01M6DNKHP7NV7KR552KFZ6EW3R","worktree","Manage worktrees only for concurrent work by the owner or agents launched by the owner on the same repository, or for explicitly requested inventory and cleanup; never create one for isolation alone.","https:\u002F\u002Fgithub.com\u002F0xgleb\u002Fdotconfig\u002Fblob\u002Fmaster\u002Fai\u002Fskills\u002Fworktree\u002FSKILL.md",[],[82,87,88,89,90,29,91,92,93,94,95,96,97,98,99,100,101,102,103],"create","work","never","worktrees","inventory","repository","fix","git","only","cleanup","cd","Bash","isolation","ls","for","mkdir","true",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":37},"01M6DNKEGPR8F3BA95ZMWQ48V9","unslop","Rewrite draft prose before owner-facing replies, docs, issues, PR text, handoffs, or Telegram reports to remove AI tells while preserving facts, links, tone, and authority; auto-trigger on externally visible prose, but never on code, commands, logs, tool output, quoted sources, or user text.","https:\u002F\u002Fgithub.com\u002F0xgleb\u002Fdotconfig\u002Fblob\u002Fmaster\u002Fai\u002Fskills\u002Funslop\u002FSKILL.md",[],[106,111,89,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128],"draft","pr","remove","trigger","tool","issues","auto","rewrite","code","tone","telegram","sources","links","authority","logs","facts","output","replies",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":37},"01M6DNK9VFNJYKB6GMA15WJ3HZ","threat-model-first","Use at the START of a change that moves money, changes balances or custody, touches access control or signing, deserializes untrusted input, adds an external or on-chain integration, or wires an LLM tool. Design-time threat modeling that turns abuse cases into the first failing tests; it precedes the post-hoc security-review pass.","https:\u002F\u002Fgithub.com\u002F0xgleb\u002Fdotconfig\u002Fblob\u002Fmaster\u002Fai\u002Fskills\u002Fthreat-model-first\u002FSKILL.md",[],[136,137,138,139,140,141,142,143,144,145,146,98,147,148,149,150,151,152,153,154],"model","threat model","threat","first","threat model first","chain","time","security-review","design","forge","access","cargo audit","review","change","audit","read","write","edit","modeling",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":166,"publishedAt":37},"01M6DNK6M72QAMH2TYVMPYJGDM","test-inspector","Auto-run for new or changed retained behavior, even without test changes, and for test, fixture, snapshot or mock changes; verify real happy-path and error-path coverage, expose false-confidence assertions and over-mocking, but do not perform general production-code correctness review.","https:\u002F\u002Fgithub.com\u002F0xgleb\u002Fdotconfig\u002Fblob\u002Fmaster\u002Fai\u002Fskills\u002Ftest-inspector\u002FSKILL.md",[161],{"categoryNo":162,"categoryName":163,"taxonomyType":164,"taxonomyTypeDesc":165},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[167,168,169,170,117,171,98,119,148,172,151,173,174,175,176,177,178,94,5,179],"test","test inspector","fixture","do","false","run","coverage","error","number","URL","mktemp","snapshot","path",{"skillNo":181,"name":182,"nameZh":6,"description":183,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":184,"categories":185,"keywords":186,"publishedAt":37},"01M6DNK3BPN73D003FFADEWJP5","strong-typing-inspector","Lightweight review — flags primitives used where a domain type already exists (e.g. String for a USD field when Usd exists) and missed newtype opportunities.","https:\u002F\u002Fgithub.com\u002F0xgleb\u002Fdotconfig\u002Fblob\u002Fmaster\u002Fai\u002Fskills\u002Fstrong-typing-inspector\u002FSKILL.md",[],[187,188,167,189,112,190,151,191,192,94,193,194,98,195,148,196],"strong typing inspector","type","missed","domain","flags","grep","usd","gh","primitives","newtype",{"skillNo":198,"name":199,"nameZh":6,"description":200,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":201,"categories":202,"keywords":206,"publishedAt":37},"01M6DNJZHG2RK3MC4VPB9KWPYF","spec-review","Critique existing specifications and design proposals, including whether their approach or addition is justified, and refine them through adversarial Pi review and authorized author revisions. Not for code review, implementation-plan sequencing, creating a design from scratch or minor copy edits.","https:\u002F\u002Fgithub.com\u002F0xgleb\u002Fdotconfig\u002Fblob\u002Fmaster\u002Fai\u002Fskills\u002Fspec-review\u002FSKILL.md",[203],{"categoryNo":204,"categoryName":205,"taxonomyType":164,"taxonomyTypeDesc":165},"01JBSEEDCAT000000000000007","代码审查",[207,208,148,209,210,211,212,213,144,214,119,101,215,216,217,218,219,220,221,222],"spec review","spec","plan","critique","code review","pi","refine","implementation","sequencing","specifications","proposals","scratch","Existing","author","From Scratch","adversarial"]