跳到正文
Skillpedia
通用编程20k · #10372

commit-dis

它能做什么

这项技能让 AI 只把当前对话中修改过的文件,提交到你已经所在的分支上。适合希望快速在 Git 中保存工作的人。

适用场景

  • ✓你说“提交这个”“保存我的工作”或“提交我们在本次对话中做的内容”的时候。
  • ✓你只想提交本次对话中的文件,不涉及无关修改的时候。
  • ✓你希望提交保留在当前分支上,不推送也不创建拉取请求的时候。

技能链接

https://github.com/kortix-ai/suna/blob/dev/.agents/skills/commit-dis/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/kortix-ai/suna/blob/dev/.agents/skills/commit-dis/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请把我们在本次对话中刚做的修改提交到我当前的分支上,其他内容保持不变。”

每周 5 个新技能,1 分钟读完。

工作原理

AI 会检查当前分支和修改文件列表,只按文件名添加本次会话中的文件,然后创建一次提交。它不会推送,也不会打开拉取请求。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

commit-dis — commit this session's work, here, now

Stage and commit the changes produced during this conversation onto the current branch. Nothing more. This is the quick "save what we just did" button.

THE RULES

  1. Stay on the current branch. Do NOT create, switch, or rename a branch. Commit wherever HEAD already points — even if that's main. Never run git checkout -b, git switch -c, or git branch.
  2. Only commit what this session changed. Stage the specific files you created or edited in this thread by path. Do NOT git add -A / git add . blindly — that risks sweeping in unrelated working-tree changes, untracked scratch files, or another task's edits. No overcommitting.
  3. No push, no PR. Stop after the commit unless the user explicitly asks to push or open a PR.
  4. One commit for the session's work unless the user asks otherwise.

Steps

  1. Confirm the branch and see what's changed:
    git rev-parse --abbrev-ref HEAD
    git status --short
    
  2. Identify the exact files this session touched. If anything in git status was NOT changed by this session, leave it unstaged. If it's ambiguous whether a dirty file belongs to this session, ask the user rather than guessing.
  3. Stage by explicit path (never -A/.):
    git add <file1> <file2> ...
    
  4. Commit with a clear message describing what this session did. End the message with the standard trailer:
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    
  5. Confirm:
    git log --oneline -1
    

Don't

  • Don't create or switch branches.
  • Don't git add -A, git add ., or git commit -a.
  • Don't push or open a PR.
  • Don't amend or rebase prior commits.
  • Don't stage files you didn't touch this session (build artifacts, other in-flight work, untracked scratch).
常见问题

它会创建新分支吗?

不会。它会提交到已签出的分支上,即使那是 main。

如果某个修改过的文件不是本次对话中的怎么办?

技能会让它保持未暂存状态;如果无法确定文件是否属于本次会话,它会询问你。

它会推送我的提交吗?

不会。除非你要求推送或打开拉取请求,否则技能在提交后即停止。

详情

作者的原始描述

Stage and commit ONLY the work done in this session, on the CURRENT branch — no new branch, no PR, no push. Load whenever the user says 'commit this', 'commit-dis', 'git add commit what we did', 'commit dis', 'save my work', or otherwise asks to commit the changes from the current thread. Enforces: stay on the already-checked-out branch, never overcommit unrelated files.

repo: kortix-ai/suna

热度

GitHub 星标
20k
排名
#10372
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能