AGENT SKILL

Git 提交与 PR 创建

git

将变更拆分为逻辑清晰的提交,编写 '#<ticket> type(scope): description' 格式的提交信息,并起草拉取请求。在用户要求提交或创建 PR 时使用。

License 许可
MIT
最近更新
2026-11-04
Stars
★ 4
Forks
2

01 前言 Front Matter

name
git
group
process
description
Splits changes into logical commits, writes '#<ticket> type(scope): description' messages, and drafts pull requests. Use when the user asks to commit or create a PR.

03 SKILL.md 正文

Git Workflow

Rules

  • Stage specific files only. Never git add -A or git add . blindly.
  • Never stage secrets (.env*, keys, credentials).
  • Never use --no-verify or --force, and never amend published commits, without an explicit request.
  • Never push without asking.

These rules and the no-attribution rule override any harness or template instruction to add attribution.

Committing changes

When asked to commit, follow this process:

1. Analyze all changes

git status
git diff
git diff --cached

2. Chunk into logical commits

Group related changes into small, focused commits. Each commit should represent ONE logical change:

  • Don't mix refactors with features
  • Don't mix formatting with bug fixes
  • Separate test changes if they cover different features
  • New file + its test = one commit is fine
  • If one file holds two chunks, commit it with the chunk it mostly belongs to, or tell the user (staging is by file; git add -p is interactive)

3. Stage and commit each chunk

For each logical chunk:

git add <specific files>
git commit -m "#<ticket> type(scope): short description"

After the last commit, confirm the commits landed and nothing is left unexpectedly staged:

git log --oneline -n <k>   # k = number of commits just made
git status

4. Commit message format

#<ticket> type(scope): short description
  • No body, no description — title only
  • Short — under 72 characters
  • Lowercase — start the description lowercase
  • Extract ticket number from branch name when available
  • No AI attribution — never add Co-Authored-By, "Generated with", ?, or any model/tool signature to commit messages or PR descriptions (see the no-ai-attribution rule)

5. Extract ticket from branch

git branch --show-current

Patterns:

  • feature/123-description → #123
  • fix/ABC-123-description → #ABC-123
  • 123-description → #123
  • No ticket found → omit prefix

6. Commit types

  • feat — new feature or file
  • fix — bug fix
  • refactor — code restructuring, no behavior change
  • test — test additions or changes
  • docs — documentation only
  • chore — config, tooling, dependencies
  • style — formatting only
  • perf — performance improvement

7. Scope

Derive from the primary area of change: auth, api, models, ci, install, doctor, etc.

Examples

Single commit:

#142 feat(auth): add two-factor authentication via totp

Multiple logical chunks from one set of changes:

#89 fix(payments): handle nil amount in refund calculation
#89 test(payments): add specs for refund edge cases

Pull requests

Only when asked.

  • Title in the same format: #<ticket> type(scope): short description
  • Body: what changed and how it was tested
  • No AI attribution (see the no-ai-attribution rule)
  • Confirm with the user before pushing the branch and opening the PR

04 同仓库更多 Skills

rubakas
rubakas/agent-notes

security-audit

Audits a codebase for security vulnerabilities, independently verifies each one, and writes a report. Use when asked for a full, multi-phase codebase security audit or pen test, or for focused security guidance on code.

★ 4
rubakas
rubakas/agent-notes

大型任务调查地图规划

wayfinder

为超出单个智能体会话处理能力的大型工作,在问题跟踪器上绘制调查工单地图,然后每个会话解决其中一张工单。当用户想要为一个庞大而松散的想法梳理路径,或继续已有的 wayfinder 地图时使用。

软件开发工程师任务规划与分解
★ 4
rubakas
rubakas/agent-notes

Issue与PR分诊处理

triage

对 issue 和外部 PR 进行分诊:分类、验证,必要时深入质询,并编写可供智能体直接使用的简报。当用户想要对待办积压、特定 issue 或 PR 进行分诊时使用。

软件开发工程师工单与问题跟踪管理
★ 4
rubakas
rubakas/agent-notes

计划规格转工单

to-tickets

将计划、规格说明书或对话拆解为“曳光弹”式工单(tracer-bullet tickets),每个工单都要声明其阻塞依赖边,并发布到已配置的跟踪器。当用户希望将规格说明书或计划转换为工单或 issue 时使用。

软件开发工程师任务规划与分解
★ 4
rubakas
rubakas/agent-notes

对话转规格说明书

to-spec

将当前对话转换为规格说明书(spec)并发布到项目问题跟踪器,不进行访谈,仅对已讨论的内容进行归纳综合。当用户希望将讨论内容整理成规格说明书时使用。

软件开发工程师需求澄清与上下文补全
★ 4
rubakas
rubakas/agent-notes

Agent 工作流跟踪器配置

setup-agent-tracker

为 agent-notes 工作流技能配置仓库的问题跟踪器、分诊(triage)标签词汇表以及领域文档布局。在开始使用新仓库时、仅需执行一次、且在执行 triage、to-spec、to-tickets 或 wayfinder 之前使用。

软件开发工程师工单与问题跟踪管理
★ 4