用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Abilityai/cornelius --skill git-commit-push命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | git-commit-push |
| description | Stage, commit, and push changes to remote repository with approval gate |
| automation | gated |
| allowed-tools | ["Bash","AskUserQuestion"] |
| user-invocable | true |
Commit and push changes to the remote repository. Shows diff for approval before committing.
Safely commit and push all staged and unstaged changes to the remote repository. Presents changes for review before committing to prevent accidental commits.
| Source | Location | Read | Write | Description |
|---|---|---|---|---|
| Git status | .git/ | X | Current repo state | |
| Working directory | ./ | X | Modified files | |
| Remote repository | origin | X | Push destination |
# Show current branch
git branch --show-current
# Check if there are changes to commit
git status --short
If no changes, inform user and exit.
Present the changes for review:
# Show summary of changes
git status
# Show detailed diff of modified files (not untracked)
git diff
# Show staged changes if any
git diff --cached
Ask user:
Use AskUserQuestion with options:
Based on user choice:
If "Commit all changes":
# Stage all changes
git add -A
# Commit with user-provided message
git commit -m "$(cat <<'EOF'
[commit message here]
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
EOF
)"
If "Select specific files":
# Push to current branch's upstream
git push
# If no upstream, push with -u flag
git push -u origin $(git branch --show-current)
# Confirm push succeeded
git log --oneline -1
# Show remote status
git status
| Error | Recovery |
|---|---|
| No changes to commit | Inform user, exit gracefully |
| No remote configured | Ask user to configure: git remote add origin <url> |
| Push rejected (non-fast-forward) | Suggest git pull --rebase first |
| Authentication failed | Check SSH keys or credentials |
| Branch protection | Inform user, suggest PR workflow |
Basic usage:
/git-commit-push
After a work session:
User: commit and push my changes
Agent: [runs this skill]
--force push (safety)