用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/RazoBeckett/dotfiles --skill atomic-git命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | atomic-git |
| description | Handles all git commit, PR, and merge workflows. Load this skill once per session and keep it active. |
| Triggers | when 'do commits' runs atomic commits only (Workflow A). 'do commits + create PR / merge into main' runs full end-to-end (Workflow B). 'aftermath', 'we're done', or 'do aftermath' finalizes an already-committed branch into a PR and merges it (Workflow C). |
| compatibility | Requires git and gh CLI (authenticated). Designed for Claude Code or similar agentic environments with bash access. |
| allowed-tools | Bash(git:*) Bash(gh:*) |
Load this skill once per session. Once active, do not reload it on subsequent triggers. Remain aware of session state: if Workflow A was already completed earlier in the session, Workflow C ("aftermath") can safely assume commits exist and the branch is clean.
Match user intent to a workflow using these phrases as signals. Partial matches and paraphrases count.
| User says (examples) | Workflow |
|---|---|
| "do commits", "commit my changes", "make commits" | A. Commit only |
| "do commits and create a PR", "commit + merge into main", "do the full thing" | B. Full E2E |
| "aftermath", "we're done", "do aftermath", "finalize", "create the PR now", "push and merge" (after commits done) | C. Finalize |
When in doubt between B and C: if the user already ran commits this session and the branch is clean, prefer C. If uncommitted changes exist, prefer B.
If a user message begins with Listen, or Listen (case-insensitive), immediately pause the current workflow. Preserve repo state exactly as-is. Execute the new request. Do NOT resume unless explicitly asked.
All other mid-workflow messages are queued and handled after the workflow completes.
origin remote exists. If not, abort.gh CLI is installed and authenticated. If not, abort.git apply --cached <patch>gh pr merge --squash./tmp./tmp/atomic-git-<pid>-<sequence>.patch<type>(optional-scope): short imperative summary
Types: feat fix refactor docs test chore perf build ci
Rules: imperative mood, no trailing period, no emojis, body only if necessary, BREAKING CHANGE: footer only if truly breaking.
Trigger: "do commits", "commit my changes", or similar.
Commits atomic changes only. Does NOT push, does NOT create a branch, does NOT create a PR. Works on any branch including main.
git diff --cached
contains only changes relevant to the commit message./tmp/atomic-git-<pid>-<sequence>.patch.git apply --cached /tmp/atomic-git-<pid>-<sequence>.patchgit diff --cached/tmp after workflow completion./tmp/atomic-git-*.patch files created during this session.git log --oneline -n <number_of_new_commits><8-char-hash> - <commit summary>
<8-char-hash> - <commit summary>
Chronological order (oldest first). No extra commentary. No fences.
Trigger: User asks to commit AND push AND merge in one request, with uncommitted changes present.
main or a protected branch: create a feature branch first.
feat/<short-description> or appropriate prefix.git push -u origin <branch>. If push fails, abort.gh pr create --base main --title "<derived from commits>" --body ""
gh pr merge <number> --squash --delete-branch
git checkout maingit pull origin maingit remote prune origin (optional)git log (PR number in message or matching SHA). If not found, abort and report.All done End-to-End, #<PR-NUMBER>: <PR-STATE>, Remote branch: <BRANCH-NAME>
No extra commentary.
Trigger: "aftermath", "we're done", "do aftermath", or similar — used after commits are already done.
Assumes the current branch is clean and ahead of main. Only pushes, creates a PR, merges, and verifies. Does NOT commit anything.
main. If on main, abort with: "Finalize requires a feature branch. Run Workflow B if you still have uncommitted changes."main. If nothing to merge, abort.main branch must exist locally or remotely.origin. Set upstream if needed. If push fails, abort.main. Capture PR number.gh pr merge <number> --squash --delete-branchgit checkout maingit pull origin maingit remote prune origin (optional)gh pr view and check commit exists in local git log. If verification fails, abort and report.All done End-to-End, #<PR-NUMBER>: <PR-STATE>, Remote branch: <BRANCH-NAME>
No extra commentary.
Abort immediately and report clearly if:
origin remotegh not installed or not authenticatedmain or with a dirty working treemain when Workflow C is triggered