← 返回 Skills 市场
anderskev

Commit Push

作者 Kevin Anderson · GitHub ↗ · v1.1.5 · MIT-0
cross-platform ✓ 安全检测通过
135
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install commit-push
功能描述
commit and push all local changes to remote repo
使用说明 (SKILL.md)

Commit and Push

Commit all local changes following Conventional Commits format and push to remote.

Gates

Complete in order. Do not run the next action until the Pass condition is satisfied (use command output as evidence, not memory).

  1. Diff understoodPass when: Outputs from git status, git diff, and git diff --cached are consistent with your one-sentence description of what changed (or you recorded that there is nothing to commit).
  2. Commit line chosenPass when: You have a draft first line type(scope): description (or type: description if omitting scope) that matches the change set you intend to ship.
  3. Staging matches intentPass when: After git add, git diff --cached --stat (and spot-check git diff --cached if needed) shows only the paths you meant to include; adjust staging before committing if not.
  4. Push target confirmedPass when: Current branch and remote are the ones you intend (git branch -vv, git remote -v); then push.
  5. Remote caught upPass when: git status is clean and git status -sb shows the branch is up to date with its configured upstream (no unexpected unpushed commits left for this task).

Step 1: Gather Context

Run these commands in parallel to understand the changes:

# See all untracked and modified files
git status

# See staged and unstaged changes
git diff
git diff --cached

# See recent commit messages for style reference
git log --oneline -10

Step 2: Analyze Changes

Review the changes and determine:

  • Type: What kind of change is this?

    • feat - New feature or capability
    • fix - Bug fix
    • docs - Documentation only
    • refactor - Code restructure without behavior change
    • test - Adding or updating tests
    • chore - Maintenance, dependency updates
    • perf - Performance improvement
    • ci - CI/CD changes
  • Scope: Which component is affected?

    • Examine the changed files and determine the appropriate scope
    • Use consistent scope names within the project (check git log for patterns)
    • (omit scope for cross-cutting changes)
  • Breaking: Does this break backward compatibility? If yes, add ! after scope.

Step 3: Write Commit Message

Format:

type(scope): description

[optional body explaining why, not what]

[optional footer with issue references]

Rules:

  • Use imperative mood: "add feature" not "added feature"
  • Keep first line under 72 characters
  • Focus on why in the body, the diff shows what
  • Reference issues: Closes #123 or Fixes #456

Step 4: Stage, Commit, and Push

Satisfy Gates 1–3 before git commit; satisfy Gate 4 before git push; satisfy Gate 5 after push.

# Stage all changes (or selectively stage)
git add -A

# Gate 3: confirm staged set before committing
git diff --cached --stat

# Commit with message (use HEREDOC for multi-line)
git commit -m "$(cat \x3C\x3C'EOF'
type(scope): description

Optional body explaining the motivation.

Closes #123

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude \[email protected]>
EOF
)"

# Push to remote
git push

Examples

# Simple feature
git commit -m "feat(api): add pagination support to list endpoints"

# Bug fix with body
git commit -m "$(cat \x3C\x3C'EOF'
fix(auth): handle token expiration during long requests

The previous implementation did not account for tokens expiring
during the processing of long-running requests.

Fixes #42

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude \[email protected]>
EOF
)"

# Breaking change
git commit -m "$(cat \x3C\x3C'EOF'
feat!(api): change response format for user endpoints

BREAKING CHANGE: The `status` field is now an object with `state` and
`message` properties instead of a plain string.

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude \[email protected]>
EOF
)"

Step 5: Verify

After pushing, satisfy Gate 5: run git status and git status -sb and confirm a clean tree and upstream sync (or an expected ahead/behind you can explain, e.g. fork workflow).

安全使用建议
This skill is coherent and limited to running git commands, but be careful before following the provided git commands verbatim: review git status/diff outputs to ensure you won't commit secrets or unwanted files (the SKILL.md requires such checks). Confirm the branch and remote before pushing. If you prefer safer commits, selectively stage files instead of using git add -A. Note: disable-model-invocation is true, so the skill won't run autonomously, which reduces risk.
功能分析
Type: OpenClaw Skill Name: commit-push Version: 1.1.5 The 'commit-push' skill is a standard utility designed to automate Git workflows using Conventional Commits. It provides structured instructions (SKILL.md) for an AI agent to stage changes, draft commit messages, and push to a remote repository using standard commands like 'git add -A' and 'git push'. The skill includes safety 'gates' to ensure the agent verifies changes before committing, and there are no indicators of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
Name/description (commit and push local changes) align with the content: SKILL.md only references git commands and commit message formatting. Nothing requested (no env vars, no binaries, no installs) is unexpected for this purpose.
Instruction Scope
Instructions stay within the task (git status/diff/log/add/commit/push). One actionable recommendation (git add -A) stages everything which is coherent but can be risky if secrets or unintended files exist; the SKILL.md does include gates and checks to review diffs before committing, which mitigates that risk.
Install Mechanism
Instruction-only skill with no install spec and no code files — nothing is written to disk or downloaded. This is the lowest-risk install model and matches the stated functionality.
Credentials
No environment variables, credentials, or config paths are requested. The skill does not ask for unrelated secrets or elevated access.
Persistence & Privilege
always is false and disable-model-invocation is true (the model cannot autonomously invoke the skill). The skill does not request persistent presence or modify other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install commit-push
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /commit-push 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.5
- Introduced a step-by-step "Gates" system to ensure each commit and push action is validated before proceeding. - Clarified pre-commit and pre-push checks, including staging verification and remote target confirmation. - Updated instructions to explicitly advise checking command output rather than relying on memory. - Improved post-push verification by adding concrete criteria for ensuring the branch is clean and in sync with the remote. - Revised commit workflow examples and guidance to align with the new gate-focused process.
v1.1.4
- Improved SKILL.md documentation with step-by-step guidance for committing and pushing using Conventional Commits. - Added specific instructions for analyzing changes, writing commit messages, and referencing issues. - Included commit message templates and real-world examples for features, bug fixes, and breaking changes. - Clarified steps for staging, committing, and pushing changes to a remote repository. - Provided tips for maintaining consistent commit conventions and project scopes.
元数据
Slug commit-push
版本 1.1.5
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 2
常见问题

Commit Push 是什么?

commit and push all local changes to remote repo. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 135 次。

如何安装 Commit Push?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install commit-push」即可一键安装,无需额外配置。

Commit Push 是免费的吗?

是的,Commit Push 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Commit Push 支持哪些平台?

Commit Push 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Commit Push?

由 Kevin Anderson(@anderskev)开发并维护,当前版本 v1.1.5。

💬 留言讨论