autopilot-commit

autopilot-commit is a skill for Claude Code from strzhao/autopilot. It costs 24 tokens per session (3,081 once invoked), scanned A, original, MIT.

A coding-agent skill for creating Git commits, which are saved checkpoints of changes in a repository.

In plain words
What is it for?
It is for handling requests to commit code, run git commit, or “提交” (commit).
Why use it?
It gives the agent a defined workflow when code needs to be committed.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool.

Part of the autopilot plugin — 5 skills, 4 hooks shipped together

Good fit It is for handling requests to commit code, run git commit, or “提交” (commit).

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/strzhao/autopilot/autopilot-commit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add strzhao/autopilot --skill autopilot-commit
Clone the repo
git clone --depth 1 https://github.com/strzhao/autopilot

Made for: Claude Code.

Or install autopilot, the plugin that ships this one along with the rest of its 5 skills, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for autopilot-commit

README.md
[![agentmods](https://agentmods.dev/badge/skills/strzhao/autopilot/autopilot-commit/github.svg)](https://agentmods.dev/skills/strzhao/autopilot/autopilot-commit)
Your own site
<a href="https://agentmods.dev/skills/strzhao/autopilot/autopilot-commit"><img src="https://agentmods.dev/badge/skills/strzhao/autopilot/autopilot-commit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for autopilot-commit

Your own site · 80×15
<a href="https://agentmods.dev/skills/strzhao/autopilot/autopilot-commit"><img src="https://agentmods.dev/badge/skills/strzhao/autopilot/autopilot-commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,081 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.03081
Opus 5.5 $0.00010 $0.01232
Sonnet 5.5 $0.00005 $0.00616
Haiku 4.5 $0.00002 $0.00308

Measured 1mo ago against content hash 8e24cc441033, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

autopilot-commit scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **运行时验证模式**(无测试框架,或 bug 涉及外部系统交互):实际执行代码路径,获取运行时输出作为证据。手段由 AI 自主判断——curl 调接口、写临时脚本跑一次、启动 dev server 手动触发、读日志——任何能产出可观察证据的方式都行。
plugins/autopilot/skills/autopilot-commit/SKILL.md · 193 lines

How it starts

The opening of the file, as written. The whole thing — 193 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git 智能提交工作流

这是一个高效的 Git 提交工具,在提交前自动分析代码改动,调用相关优化技能,并生成高质量的提交信息。

核心原则

信任 AI 的智能判断:您已经具备强大的代码分析能力,本工具旨在提供框架而非限制您的判断。

高自由度设计:React 检测、优化应用、提交信息生成都依赖上下文判断,您可以根据具体情况选择最佳方法。

简洁高效:只提供必要的工作框架,避免过度指导。

并行优先:Phase 2 中的任务彼此独立,应在同一轮响应中并行发起(多个 Agent 或工具调用)。只有存在数据依赖时才串行等待。某个任务被跳过时不需要等待——直接标记跳过,继续推进。

假设需要证据:代码中对外部世界的假设(数据格式、接口行为、环境状态、第三方响应结构)不能仅凭文档或推理确认。提交前必须有运行时证据证明关键假设成立。这条原则贯穿 Bugfix 验证和代码理解测验。

上下文感知

autopilot-commit 有两种调用场景,需要智能判断并跳过多余步骤:

  • 主链路模式:当前项目根目录存在活跃 autopilot 状态文件(.autopilot/runtime/active.ptr 指向的 .autopilot/runtime/requirements/<slug>/state.md,worktree 中位于 .autopilot/runtime/sessions/<name>/requirements/<slug>/state.md)且 phase 为 "merge" → 代码已通过五层 QA,跳过 Phase 1.5(代码优化)、Bugfix 验证、代码理解测验。再优化可能破坏已验证状态。
  • 独立模式:其他所有情况 → 执行完整流程。

工作框架

创建一个简洁的任务列表来跟踪进度:

使用 TaskCreate 工具创建 Git 提交工作流:

Phase 1 — 基础分析(串行)
- [ ] 分析 Git 状态:检查可提交更改,分析改动内容和类型

Phase 1.5 — 代码优化(串行,会修改代码,后续任务需基于优化后的代码)
- [ ] 代码优化(条件性):检测 React 代码 + 调用优化技能 + 用户确认
      跳过条件:主链路模式 / 无需优化

Phase 2 — 独立任务(并行执行,基于优化后的代码)
- [ ] Bugfix 验证(主链路模式跳过)
- [ ] 代码理解测验(主链路模式跳过)
- [ ] 项目元数据更新(CLAUDE.md + 版本号)

Phase 3 — 收尾流程(串行,等待 Phase 2 全部完成)
- [ ] 执行智能提交 + 任务同步(ai-todo)+ 提交总结

调度原则:

  • Phase 1.5 串行执行,因为代码优化会修改文件,后续 bugfix 验证和代码测验必须基于优化后的代码
  • Phase 1.5 无需优化时直接跳过,不阻塞流程
  • Phase 2 的任务之间没有数据依赖,应尽可能在一轮响应中并行发起
  • 需要用户交互的任务(如代码测验)与其他任务同时发起,等待用户回答期间其他任务已完成
  • 任何 Phase 2 任务的失败或跳过不阻塞其他任务
  • Phase 3 必须等待 Phase 2 全部完成(包括用户交互结束)

关键决策点

1. 代码优化(Phase 1.5,串行)

为何前置:代码优化会修改文件,必须在 bugfix 验证和代码测验之前完成,否则后续任务验证的是优化前的代码。

自主判断改动中是否涉及 React/前端代码,决定调用哪些优化技能:

  • react best practice:React 最佳实践(检测到 React 代码时调用)
  • code simple:代码简化(建议总是调用)

调用前向用户展示建议的改动,获得确认后应用。技能调用失败时记录警告并跳过(优雅降级)。

2. Bugfix 验证

目的:bugfix 提交时,拿到运行时证据证明修复生效——"修了就要验"。

触发条件:commit type 为 fix。无测试框架不等于跳过,而是切换验证模式。

两种验证模式:

  • 自动化测试模式(项目有测试框架):找到或创建对应测试 → 补充 bug 场景用例 → 运行相关测试确认通过 → 测试文件加入暂存区。
  • 运行时验证模式(无测试框架,或 bug 涉及外部系统交互):实际执行代码路径,获取运行时输出作为证据。手段由 AI 自主判断——curl 调接口、写临时脚本跑一次、启动 dev server 手动触发、读日志——任何能产出可观察证据的方式都行。

Read the full file on GitHub · 193 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 193 lines · 24 tokens per session scan A 8e24cc441033

Subscribe to this mod's changes

autopilot-commit is a skill published in the GitHub repository strzhao/autopilot (32 stars, last pushed 7d ago), licensed MIT. It adds 24 tokens to every session and 3,081 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.