Skip to content
Automation
Skill

/commit

Stage, commit, and push changes for the sewage project. Creates a branch, commits with a descriptive message, pushes, and optionally creates a PR. This skill should be used when asked to "commit", "save changes", "push", or "create a PR".

From plugin
auto-empirical-research-skills
3.8k200 skills
Install
$ npx -y skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill commit --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/commit

Context preview

The summary Claude sees to decide when to auto-load this skill.

Stage, commit, and push changes for the sewage project. Creates a branch, commits with a descriptive message, pushes, and optionally creates a PR. This skill should be used when asked to "commit", "save changes", "push", or "create a PR".

SKILL.md

commit.SKILL.md
name: commit
description: Stage, commit, and push changes for the sewage project. Creates a branch, commits with a descriptive message, pushes, and optionally creates a PR. This skill should be used when asked to "commit", "save changes", "push", or "create a PR".
argument-hint: "[optional: commit message]"
allowed-tools: ["Bash", "Read", "Glob"]

Commit and Push

Stage changes, commit with a descriptive message, and push to remote.

Steps

1. **Check current state:**

git status
git diff --stat
git log --oneline -5

2. **Create a branch** from current state:

git checkout -b <short-descriptive-branch-name>

3. **Stage files** — add specific files (never use `git add -A`):

git add <file1> <file2> ...

Do NOT stage:

  • `.claude/settings.local.json`
  • Any files containing secrets or API keys
  • Large data files (anything in `data/`)
  • Temporary files (anything in `data/temp/`)

4. **Commit** with a descriptive message:

If `$ARGUMENTS` is provided, use it as the commit message. Otherwise, analyse the staged changes and write a message that explains *why*, not just *what*.

git commit -m "$(cat <<'EOF'
<commit message here>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EOF
)"

5. **Push and optionally create PR:**

git push -u origin <branch-name>
gh pr create --title "<short title>" --body "$(cat <<'EOF'
## Summary
<1-3 bullet points>

## Test plan
<checklist>
EOF
)"

6. **Merge and clean up** (only if user confirms):

gh pr merge <pr-number> --merge --delete-branch
git checkout main
git pull

7. **Report** the PR URL and what was merged.

Important

  • Always create a NEW branch — never commit directly to main
  • Exclude data files, temp files, and secrets from staging
  • Use `--merge` (not `--squash` or `--rebase`) unless asked otherwise
  • If the commit message from `$ARGUMENTS` is provided, use it exactly
  • Follow existing commit message style (see recent `git log`)
Read more
Ships withauto-empirical-research-skills

📌 文档结构(2026-07-22 起): 本文件是中文默认入口 —— banner + badges + 信任面 + 9 阶段流水线速览 + 76 行合集总表。 每个合集的完整描述、按用途分组、精确数字、验证方法在 docs/CONTENT_ZH.md(扩展正文,总表行内的 → 直接跳转到对应锚点)。 English version: README-en.md · 中文扩展正文:docs/CONTENT_ZH.md · README-zh-CN.md 已弃用(重定向占位) 🌐 语言: English |

Get the whole plugin