Install
npx skillscat add brycewang-stanford/auto-empirical-research-skills/commit Install via the SkillsCat registry.
We need to produce a 2-3 sentence plain-text summary, objective, factual, no marketing, no bullet points, no markdown, no quotes. At most 60 words. Must explain what the skill does, what problem it solves, when to use it. Provide only the summary text. No extra formatting. Let's craft about 45 words. Possible summary: "This skill automates the workflow of staging selected files, committing with a descriptive message, creating a pull request, and merging it into the main branch.
Commit, PR, and Merge
Stage changes, commit with a descriptive message, create a PR, and merge to main.
Steps
- Check current state:
git status
git diff --stat
git log --oneline -5- Create a branch from the current state:
git checkout -b <short-descriptive-branch-name>- Stage files — add specific files (never use
git add -A):
git add <file1> <file2> ...Do NOT stage .claude/settings.local.json or any files containing secrets.
- Commit with a descriptive message:
If $ARGUMENTS is provided, use it as the commit message. Otherwise, analyze the staged changes and write a message that explains why, not just what.
git commit -m "$(cat <<'EOF'
<commit message here>
EOF
)"- Push and 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>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"- Merge and clean up:
gh pr merge <pr-number> --merge --delete-branch
git checkout main
git pull- Report the PR URL and what was merged.
Important
- Always create a NEW branch — never commit directly to main
- Exclude
settings.local.jsonand sensitive files from staging - Use
--merge(not--squashor--rebase) unless asked otherwise - If the commit message from
$ARGUMENTSis provided, use it exactly