Home / john-walks-slow / rabbit-skills · .apm/skills/commit-own-changes/SKILL.md · GitHub

commit-own-changes skillA

commit-own-changes is agent-read markdown (skill) from john-walks-slow/rabbit-skills: 基于 git-hunk 提交改动,防止带入其他无关的未提交修改。事关安全,在执行任何 `git add`,`git commit` 命令前 **必须** 使用本技能。例外:若你当前在单独 worktree 中工作,则无需使用本技能。.

Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.

What the file says

# commit-own-changes

基于 git-hunk 精准选择提交范围,防止带入其他无关的未提交修改。

## 依赖

本技能依赖 [git-hunk](https://github.com/wkentaro/git-hunk)(按 hunk 精选提交范围)。

安装:

```bash
pip install git-hunk
```

安装后 `git-hunk` 命令可用(`git-hunk list` / `git-hunk show <id>` / `git-hunk stage <id>`)。详见 <https://github.com/wkentaro/git-hunk>。

## 工作流程

1. **获取锁**

防止同一时间其他 Agent 进行 Git 操作:

```bash
{skill_dir}/scripts/git-lock.sh acquire <task-id>   # Linux/macOS
```

```powershell
{skill_dir}\scripts\git-lock.ps1 -Action acquire -TaskId <task-id>   # Windows
```

`<task-id>` 建议用本次任务的极简英文 summary,如 `fix-login-crash`、`add-dark-mode`。获取锁和释放锁时必须使用同一 ID。

**重要:** acquire 会自动等待直到上一个锁释放;请不要设置超时时间,耐心等待。禁止手动检查/删除锁文件。禁止跳过本步骤进行后续操作。
若 acquire 执行失败(输出不包含 `acquired`),立即中止提交,向用户报告异常。

2. **列举修改状态**

确认有哪些 hunk 是需要提交的:

```powershell
git status             # 确认仓库状态
git-hunk list          # 全部 hunk
git-hunk list <files...>   # 或只看特定文件的 hunk
```

可以使用 `show` 确认 hunk 的内容:

```powershell
git-hunk show <hunk_ids...>
```

3. **清除暂存区**

防止过去残留的暂存项干扰本次提交:

```powershell
git restore --staged .
```

4. **暂存**

如果文件的所有改动都属于本轮提交,直接全量暂存:

```powershell
git add <files...>
```

否则用 git-hunk stage 精确选择:

```powershell
git-hunk stage <hunk_ids...>
…

Read the whole file at its exact version.

How to install

Latest version
mdr add john-walks-slow/rabbit-skills/commit-own-changes@git:20260915.c34e588
Exact content
mdr add john-walks-slow/rabbit-skills/commit-own-changes@sha256:999b512ce66a32ba

Pin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_y3tt7xpg7xtpv7gl.svg)](https://markdownregistry.com/a/art_y3tt7xpg7xtpv7gl)

1 badge views in 30 days

Versions

versioncommittedcommitsizeaudit
git:20260915.c34e588 latest2026-09-15 c34e588 3,992 BA view · diff
git:20260806.9b7a0472026-08-06 9b7a047 3,680 BA view · diff
git:20260731.ddf6a812026-07-31 ddf6a81 3,585 BA view · diff
git:20260725.231f8ad2026-07-25 231f8ad 2,661 BA view · diff
git:20260724.eba32ae2026-07-24 eba32ae 3,585 BA view

Audit of the latest version

A  17 of 17 checks passed. Deterministic, no model, same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (3992 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

john-walks-slow/rabbit-skills · 14 stars · license none · pushed 2026-09-20 · branch master

API

GET https://markdownregistry.com/api/v1/artifacts/art_y3tt7xpg7xtpv7gl
GET https://markdownregistry.com/api/v1/resolve?ref=john-walks-slow/rabbit-skills/commit-own-changes
GET https://markdownregistry.com/api/v1/blob/999b512ce66a32ba4decd8bef3400c393cd75626b612a6ee770b637b5a29d7a7

Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

More from john-walks-slow/rabbit-skills

bad-smell skill
john-walks-slow/rabbit-skills · .apm/skills/bad-smell/SKILL.md · 你觉得代码写得好吗?当你觉得代码难于理解、设计混乱或不易维护时主动使用本技能。
git:20260718.f90f3b5 · audit A · 14 stars
code-deep-dive skill
john-walks-slow/rabbit-skills · .apm/skills/code-deep-dive/SKILL.md · 为 vibe coding 项目编写中文深度 markdown 长文,帮助用户在碎片时间(通勤、午休、睡前,手机观看)补齐代码知识。每次由用户明确指定主题(如某个框架机制、某段核心逻辑、某个技术概念),输出一篇完全自包含(代码完整内嵌、无需…
git:20260809.a7569fc · audit A · 14 stars
cross-check skill
john-walks-slow/rabbit-skills · .apm/skills/cross-check/SKILL.md · 使用子代理对当前的想法、结论、计划或决策进行批判性检查和核实。当你对计划感到不踏实;感觉某个结论"可能有问题但说不清";决策证据不充足;决策判断失误代价高、希望二次确保准确性时主动使用。
git:20260716.97068d6 · audit A · 14 stars
full-auto skill
john-walks-slow/rabbit-skills · .apm/skills/full-auto/SKILL.md · 进入 full auto 模式。所有需要向用户提问、决策、授权的地方,替换为询问 auto_human 子代理。
git:20260919.002abc2 · audit A · 14 stars
grilling skill
john-walks-slow/rabbit-skills · .apm/skills/grilling/SKILL.md · 围绕计划对用户进行刨根问底的追问。当用户想厘清计划的疑难点,或使用任何 "grill" 相关关键词时使用。
git:20260711.ac4022a · audit A · 14 stars
handoff skill
john-walks-slow/rabbit-skills · .apm/skills/handoff/SKILL.md · 编写交接文档,将工作上下文传递给另一个 agent、同事、检视者或 oncall。可选参数:目标受众或方向(例如 "to reviewer"、"给 QA"、"for oncall")。
git:20260711.ac4022a · audit A · 14 stars
max-effort skill
john-walks-slow/rabbit-skills · .apm/skills/max-effort/SKILL.md · max-effort 模式。在对用户精力消耗最少的情况下,将简略 idea 转变为具有极致体验的完整可交付产物。
git:20260915.2f7edee · audit A · 14 stars
spawn-deep-researcher skill
john-walks-slow/rabbit-skills · .apm/skills/spawn-deep-researcher/SKILL.md · 使用 deep-researcher 子代理对特定主题进行深度、广泛、准确的网络调研。当需要对特定主题进行高质量调研时优先使用。拉起 deep-researcher 子代理前必须阅读。
git:20260714.0bc4e04 · audit A · 14 stars
spawn-e2e-tester skill
john-walks-slow/rabbit-skills · .apm/skills/spawn-e2e-tester/SKILL.md · 使用 e2e-tester 子代理进行端到端测试。拉起 e2e-tester 子代理前必须阅读。
git:20260915.f0bf4c5 · audit A · 14 stars
spawn-reviewer skill
john-walks-slow/rabbit-skills · .apm/skills/spawn-reviewer/SKILL.md · 使用 reviewer 子代理进行高质量的代码审查。拉起 reviewer 子代理前必须阅读。
git:20260714.5f75a5d · audit A · 14 stars
tidy skill
john-walks-slow/rabbit-skills · .apm/skills/tidy/SKILL.md · 清理无用/冗余的修改,
git:20260804.26b3307 · audit A · 14 stars
try skill
john-walks-slow/rabbit-skills · .apm/skills/try/SKILL.md · 为目标文件创建可回退的备份。要对特定文件做不确定的破坏性修改或用户希望可以轻松回退时必须使用。
git:20260721.ea71520 · audit A · 14 stars

Every file in john-walks-slow/rabbit-skills

Browse by kind, by grade A, or by owner.