← 返回 Skills 市场
shangter666

auto-commit

作者 shangter666 · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
269
总下载
1
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install auto-commit
功能描述
Triggers on any task that modifies code. Provides instructions to surgically stage and commit only the modified code files to save progress.
使用说明 (SKILL.md)

Auto Commit Skill

Core Instruction

When you complete a user request that involves modifying files or code, you MUST automatically create a git commit to save the changes. This ensures that every successful AI intervention is snapshotted.

Procedure

After finishing the code modifications for the user's request:

  1. Surgical Staging: Do NOT use git add .. Instead, stage ONLY the files you have explicitly modified:
    • git add \x3Cfile_path1> \x3Cfile_path2> ...
  2. Filter by Type: If multiple files were changed, ensure you are only staging source code files (e.g., .py, .go, .sol, .js, .ts, .md). Avoid staging environment files (.env), binaries, or large assets.
  3. Verify: If unsure, run git status to confirm only the intended changes are staged.
  4. Commit: Run git commit -m "\x3Cmessage>" with a concise, descriptive summary of your changes.

Do not ask for permission; execute the commit automatically. If the user explicitly asks not to commit, respect their request. Skip if not a git repository or no changes were made.

安全使用建议
This skill will automatically stage and commit changes in repositories when the agent modifies code; it comes from an unknown source and does not declare git as a required binary. Before installing, consider: (1) Do you want an autonomous actor to create commits in your repos without per-action confirmation? (2) The skill could accidentally commit secrets or sensitive files—ensure robust .gitignore and consider adding secret-detection checks. Recommended mitigations: require the skill to declare git in metadata, require explicit user opt-in per session or show diffs and ask for confirmation before commit, forbid committing files matching secret patterns, and log/stage operations for user review. If you need tighter control, do not install this skill or run it only in isolated/sandbox repos until its behavior is audited and modified to ask for confirmation.
功能分析
Type: OpenClaw Skill Name: auto-commit Version: 1.0.2 The 'auto-commit' skill is designed to automate git commits after file modifications. It includes safety instructions in SKILL.md to perform 'surgical staging' and explicitly avoid sensitive files like .env or keys, supported by a reference ignore list in references/ignore_list.txt. No malicious intent, data exfiltration, or unauthorized execution patterns were identified.
能力评估
Purpose & Capability
The skill's name and description match the instructions (saving code changes via git commits). However, the SKILL.md explicitly instructs running git commands (git add, git status, git commit) while the registry metadata lists no required binaries or dependencies (git is not declared). That's an inconsistency: a legitimate auto-commit skill should declare git as a required binary and possibly document expected repository layout and permissions.
Instruction Scope
Instructions order the agent to 'MUST automatically create a git commit' and explicitly say 'Do not ask for permission; execute the commit automatically' (unless user asked not to). This gives the agent authority to modify the user's repo without per-action consent. The procedure attempts to limit staging to specific file types and to avoid env files, but the rules are informal and leave room for errors (sensitive files could still be staged/committed, commit messages might include sensitive context). The skill does not instruct showing a diff or asking for confirmation in ambiguous cases, increasing risk of unintended commits.
Install Mechanism
This is an instruction-only skill with no install spec and no code files, so nothing is written to disk by an installer. That minimizes supply-chain risk. The remaining risk comes from the commands the agent will run at runtime (git), not from an install step.
Credentials
The skill requests no environment variables and no credentials, which is proportionate. However, it requires filesystem and git repository access (unstated) and can create commits containing repository contents or commit messages that might leak sensitive data. The provided references/ignore_list.txt indicates some awareness of files that should be avoided, but ignoring patterns are not enforced by the SKILL.md instructions.
Persistence & Privilege
always:false (normal) and model invocation is allowed (normal), but the explicit instruction to auto-commit without asking turns autonomous invocation into a potentially intrusive capability: an agent could repeatedly modify the user's git history locally. While commits alone don't exfiltrate data, they can persist sensitive content in history and later be pushed. The skill does not request lasting privileges beyond running git, but the 'do not ask' requirement elevates its behavioral privilege and reduces user control.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install auto-commit
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /auto-commit 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
- Refined the auto-commit workflow to stage only files explicitly modified, instead of using git add . - Now restricts commits to typical code and documentation files, avoiding environment files, binaries, and large assets. - Emphasized verifying staged files with git status before committing. - Simplified and clarified instructions for more surgical and safer commits.
v1.0.1
- Added ignore list mechanism to exclude specific files from automatic git commits. - Updated instructions to use references/ignore_list.txt for filtering staged files. - Improved procedure to verify sensitive and large files are not committed. - Added a reference section for the new ignore list file.
v1.0.0
Initial release – automatically commit code modifications after each task. - Commits all file/code changes after completing user requests using git. - Skips committing if there are no changes or no git repository. - Respects user requests not to commit. - Prevents accidental loss or hard-to-revert modifications in future tasks.
元数据
Slug auto-commit
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

auto-commit 是什么?

Triggers on any task that modifies code. Provides instructions to surgically stage and commit only the modified code files to save progress. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 269 次。

如何安装 auto-commit?

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

auto-commit 是免费的吗?

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

auto-commit 支持哪些平台?

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

谁开发了 auto-commit?

由 shangter666(@shangter666)开发并维护,当前版本 v1.0.2。

💬 留言讨论