git-workflow
Automate the local commit / branch / push / PR cycle with conventional commits, signed commits, and PR-body assembly.
- License 许可
- MIT
- 最近更新
- 2026-11-09
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- git-workflow
- risk
- medium
- source
- openclawskills.net
- aliases
- [ "git", "commit", "pr", "pull-request", "conventional-commits", "push" ]
- enabled
- true
- version
- 1.0.0
- category
- coding_and_devops
- keywords
- [ "git", "commit", "pr", "push", "branch", "conventional", "signed", "hook", "changelog" ]
- metadata
- { "openclaw": { "requires": { "env": [], "bins": [] }, "primaryEnv": null } }
- triggers
- [ "Commit this", "Open a PR", "Push my branch", "Use a conventional commit message", "Sign my commits" ]
- description
- Automate the local commit / branch / push / PR cycle with conventional commits, signed commits, and PR-body assembly.
- required_tools
- [ "git", "gh" ]
03 SKILL.md 正文
Git Commit & PR Automation
Purpose
Wrap the local Git cycle (stage → commit → push → PR) into a single, opinionated operation. The skill enforces conventional commits, optional GPG/SSH signing, and assembles a useful PR body from the commit log and any issue context.
When to Use
- The user is ready to commit and push a change
- The user wants a PR opened against
main/develop - The user wants a clean, conventional commit message generated from a diff
When NOT to Use
- The repo explicitly forbids conventional commits
- The user wants to amend a public commit
- The user wants to force-push to a protected branch
Capabilities
- Run
git status,git diff --staged,git log -n 5to summarize state - Stage interactively (
git add -p) or via glob - Generate a conventional commit message from the diff
- Sign the commit (GPG or SSH) if configured
- Push the current branch, setting upstream
- Open a PR via
gh pr createwith a body assembled from:- the commit log,
- any linked issue (
Closes #123), - a checklist (tests, docs, changelog),
- a one-line risk note.
Inputs
mode:commit|pr|commit-and-pr(defaultcommit-and-pr)type(optional):feat,fix,chore,refactor,docs,test,perfscope(optional): the affected area (auth,cli,docs)sign(default:auto— sign if configured)draft(defaultfalse)
Workflow
- Inspect the working tree (
status,diff --stat,diff --staged). - Confirm scope — show the staged changes and ask the user to confirm.
- Build the message —
type(scope): subjectfrom the diff, body from meaningful hunks, footer forBREAKING CHANGEandCloses #…. - Commit with
--signoff(DCO) and signing persign. - Push the current branch with
--set-upstream. - Open PR with
gh pr create --fill --body <body>(or--draft).
Tools
gitgh(for PR creation; gracefully skip if not installed)commitlint(optional, in pre-commit hook)
Examples
User: "Commit and open a PR for the auth refactor."
Response: Staged: 4 files. Commit: refactor(auth): split user/session tables.
Pushed to feat/auth-split. PR opened: <url>. Checklist: tests ✓, docs ✗, changelog ✗.
User: "Make a chore commit for the dep bump."
Response: Staged: package.json, package-lock.json. Commit:
chore(deps): bump left-pad to 1.3.0. Pushed. No PR opened (branch is up to date).
Safety
- Never
--forcepush without explicit--force-with-leaseconfirmation - Never amend a commit already pushed
- Never skip a pre-commit hook with
--no-verifyunless explicitly asked - Default to draft PR for first-time contributors on a new branch
Source
Auto-generated from openclawskills.net description.
Pairs Well With
github-cli(for the PR side)autoreview(review the diff before PR)security-scanner(gate before merge)npm-auditor(post-install sanity)
04 同仓库更多 Skills
dei-assessment
Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.
dei-action-plan
Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.
culture-fit-assessment
Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.
cowork-to-code-bridge
Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.
counter-offer-response
Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.
continuous-feedback-system
Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.