commit-dis
它能做什么
这项技能让 AI 只把当前对话中修改过的文件,提交到你已经所在的分支上。适合希望快速在 Git 中保存工作的人。
适用场景
- ✓你说“提交这个”“保存我的工作”或“提交我们在本次对话中做的内容”的时候。
- ✓你只想提交本次对话中的文件,不涉及无关修改的时候。
- ✓你希望提交保留在当前分支上,不推送也不创建拉取请求的时候。
技能链接
https://github.com/kortix-ai/suna/blob/dev/.agents/skills/commit-dis/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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
- Stay on the current branch. Do NOT create, switch, or rename a branch.
Commit wherever
HEADalready points — even if that'smain. Never rungit checkout -b,git switch -c, orgit branch. - 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. - No push, no PR. Stop after the commit unless the user explicitly asks to push or open a PR.
- One commit for the session's work unless the user asks otherwise.
Steps
- Confirm the branch and see what's changed:
git rev-parse --abbrev-ref HEAD git status --short - Identify the exact files this session touched. If anything in
git statuswas 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. - Stage by explicit path (never
-A/.):git add <file1> <file2> ... - 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> - Confirm:
git log --oneline -1
Don't
- Don't create or switch branches.
- Don't
git add -A,git add ., orgit 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
评论
- …
同一仓库的更多技能
claude-code
20k帮你的智能体把编写代码、审查或规划任务交给 Anthropic 的 Claude Code CLI,并保存结果以便检查。
codex-cli
20k帮你的智能体把编写代码或审查任务交给 OpenAI 的 Codex CLI,并取回结果,让第二个模型检查工作。
composio
20k帮你的智能体使用 Composio 连接 Gmail、Slack、GitHub 和 Notion 等应用,服务于你自己的智能体或你开发的产品。
e2e
20k教你的智能体编写端到端测试,用通俗的目标描述和精确的检查来操作网页或移动应用。