AI & Integration v1.0.2

auto-commit

Triggers on any task that modifies code. Provides instructions to surgically stage and commit only the modified code...

shangter666 更新于 2026-03-17 1 浏览
下载 SKILL

技能说明

Triggers on any task that modifies code. Provides instructions to surgically stage and commit only the modified code files to save progress.

使用场景

Triggers on any task that modifies code. Provides instructions to surgically stage and commit only the modified code files to save progress.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/auto-commit
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

5 个文件 · 15 kB
SKILL.md text/markdown
---
name: auto-commit
description: Triggers on any task that modifies code. Provides instructions to surgically stage and commit only the modified code files to save progress.
---

# 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 <file_path1> <file_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 "<message>"` 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.

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。