Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计提醒

but但是

Agent Skill

but 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

10,772

周安装

458

GitHub Stars

20,725

下载量

3,774
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:but(但是)
来源仓库:https://github.com/gitbutlerapp/gitbutler
仓库路径:skills/but
安装命令:
npx skills add https://github.com/gitbutlerapp/gitbutler --skill but
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/gitbutlerapp/gitbutler --skill but

简介

but 将 GitButler CLI 作为默认版本控制接口使用。

  • 适用于所有写操作,如提交、推送、分支管理等。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 始终使用 but 替代原生 git 命令,并附加状态检查参数。
  • 需确保已安装 GitButler 并具备仓库读写权限。
  • but 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

GitButler CLI Skill

Use GitButler CLI (but) as the default version-control interface.

Non-Negotiable Rules

  1. Use but for all write operations. Never run git add, git commit, git push, git checkout, git merge, git rebase, git stash, or git cherry-pick. If the user says a git write command, translate it to but and run that.
  2. Always add --status-after to mutation commands.
  3. Use CLI IDs from but status -fv / but diff / but show; never hardcode IDs.
  4. Start with but status -fv before mutations so IDs and stack state are current.
  5. Create a branch for new work with but branch new <name> when needed.

Core Flow

Every write task should follow this sequence.

# 1. Inspect state and gather IDs
but status -fv

# 2. If new branch needed:
but branch new <name>

# 3. Edit files (Edit/Write tools)

# 4. Refresh IDs if needed
but status -fv

# 5. Perform mutation with IDs from status/diff/show
but <mutation> ... --status-after

Command Patterns

  • Commit: but commit <branch> -m "<msg>" --changes <id>,<id> --status-after
  • Commit + create branch: but commit <branch> -c -m "<msg>" --changes <id> --status-after
  • Amend: but amend <file-id> <commit-id> --status-after
  • Reorder commits: but move <source-commit-id> <target-commit-id> --status-after (commit IDs, not branch names)
  • Stack branches: but move <branch-name-or-id> <target-branch-name-or-id> --status-after (branch names or branch CLI IDs)
  • Tear off a branch: but move <branch-name-or-id> zz --status-after (zz = unassigned; branch name or branch CLI ID)
  • Push: but push or but push <branch-id>
  • Pull: but pull --check then but pull --status-after

Task Recipes

Commit files

  1. but status -fv
  2. Find the CLI ID for each file you want to commit.
  3. but commit <branch> -m "<msg>" --changes <id1>,<id2> --status-after Use -c to create the branch if it doesn't exist. Omit IDs you don't want committed.
  4. Check the --status-after output for remaining uncommitted changes. If the file still appears as unassigned or assigned to another branch after commit, it may be dependency-locked. See "Stacked dependency / commit-lock recovery" below.

Amend into existing commit

  1. but status -fv (or but show <branch-id>)
  2. Locate file ID and target commit ID.
  3. but amend <file-id> <commit-id> --status-after

Reorder commits

but move supports both commit reordering and branch stack operations. Use commit IDs when reordering commits.

  1. but status -fv
  2. but move <commit-a> <commit-b> --status-after — uses commit IDs like c3, c5
  3. Refresh IDs from the returned status, then run the inverse: but move <commit-b> <commit-a> --status-after

Stack existing branches

To make one existing branch depend on (stack on top of) another, use top-level move:

but move feature/frontend feature/backend

This moves the frontend branch on top of the backend branch in one step.

DO NOT use uncommit + branch delete + branch new -a to stack existing branches. That approach fails because git branch names persist even after but branch delete. Always use but move <branch> <target-branch>.

To unstack (make a stacked branch independent again):

but move feature/logging zz

Note: branch stack/tear-off operations use branch names (like feature/frontend) or branch CLI IDs, while commit reordering uses commit IDs (like c3). Do NOT use but undo to unstack — it may revert more than intended and lose commits.

Stacked dependency / commit-lock recovery

A dependency lock occurs when a file was originally committed on branch A, but you're trying to commit changes to it on branch B. Symptoms:

  • but commit succeeds but the file still appears in unassignedChanges in the --status-after output
  • The file shows as "unassigned" instead of being staged to any branch

Recovery: Stack your branch on the dependency branch, then commit:

  1. but status -fv — identify which branch originally owns the file (check commit history).
  2. but move <your-branch-name> <dependency-branch-name> — stack your branch on the dependency. Uses full branch names, not CLI IDs.
  3. but status -fv — the file should now be assignable. Commit it.
  4. but commit <branch> -m "<msg>" --changes <id> --status-after

If but move <branch> <target-branch> fails: Do NOT try uncommit, squash, or undo to work around it — these will leave the workspace in a worse state. Instead, re-run but status -fv to confirm both branches still exist and are applied, then retry with exact branch names from the status output.

Resolve conflicts after reorder/move

NEVER use git add, git commit, git checkout --theirs, git checkout --ours, or any git write commands during resolution. Only use but resolve commands and edit files directly with the Edit tool.

If but move causes conflicts (conflicted commits in status):

  1. but status -fv — find commits marked as conflicted.
  2. but resolve <commit-id> — enter resolution mode. This puts conflict markers in the files.
  3. Read the conflicted files to see the <<<<<<< / ======= / >>>>>>> markers.
  4. Edit the files to resolve conflicts by choosing the correct content and removing markers.
  5. but resolve finish — finalize. Do NOT run this without editing the files first.
  6. Repeat for any remaining conflicted commits.

Common mistakes: Do NOT use but amend on conflicted commits (it won't work). Do NOT skip step 4 — you must actually edit the files to remove conflict markers before finishing.

Git-to-But Map

gitbut
git statusbut status -fv
git add + git commitbut commit... --changes...
git checkout -bbut branch new <name>
git pushbut push
git rebase -ibut move, but squash, but reword
git rebase --ontobut move <branch> <new-base>
git cherry-pickbut pick

Notes

  • Prefer explicit IDs over file paths for mutations.
  • --changes accepts comma-separated values (--changes a1,b2) or repeated flags (--changes a1 --changes b2), not space-separated.
  • Read-only git inspection (git log, git blame, git show --stat) is allowed.
  • After a successful --status-after, don't run a redundant but status -fv unless you need new IDs.
  • Use but show <branch-id> to see commit details for a branch, including per-commit file changes and line counts.
  • Per-commit file counts: but status does NOT include per-commit file counts. Use but show <branch-id> or git show --stat <commit-hash> to get them.
  • Avoid --help probes; use this skill and references/reference.md first. Only use --help after a failed attempt.
  • Run but skill check only when command behavior diverges from this skill, not as routine preflight.
  • For command syntax and flags: references/reference.md
  • For workspace model: references/concepts.md
  • For workflow examples: references/examples.md

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.21%
按下载量换算1,442

Claude

28.2%
按下载量换算1,064

Cursor

21.15%
按下载量换算798

Gemini CLI

10.03%
按下载量换算379

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills