-
Notifications
You must be signed in to change notification settings - Fork 0
Add Agent Git Workflow skill page #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+79
−0
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| --- | ||
| title: Agent Git Workflow | ||
| description: A practical Git + PR workflow for OpenClaw agents working with clean history, fast reviews, and safe merges. | ||
| --- | ||
|
|
||
| A practical [OpenClaw](https://openclaw.ai) skill for shipping code through GitHub pull requests with consistent branch naming, clean commits, and reliable review loops. | ||
|
|
||
| ## Branch ownership naming | ||
|
|
||
| Use branch names that make ownership and intent obvious: | ||
|
|
||
| - Pattern: `<owner>/<scope>-<change>` | ||
| - Example: `obrera/skills-agent-git-workflow` | ||
|
|
||
| This helps reviewers immediately see who owns the branch and what the change is about. | ||
|
|
||
| > **Note on `obrera`:** `obrera` is an example GitHub handle prefix. Replace it with your own. | ||
|
|
||
| ## One PR / one commit discipline | ||
|
|
||
| Default to one focused commit per pull request: | ||
|
|
||
| 1. Keep scope tight (single feature/fix/docs unit) | ||
| 2. Make one clean commit with a clear message | ||
| 3. Open one PR for that commit | ||
|
|
||
| Why this works: | ||
|
|
||
| - Faster review and lower cognitive load | ||
| - Easier revert if needed | ||
| - Cleaner project history | ||
|
|
||
| ## PR hygiene + self-review | ||
|
|
||
| Before requesting review: | ||
|
|
||
| 1. **Rebase your branch onto `main`** and resolve conflicts locally | ||
| 2. **Self-review** the full diff in GitHub (files changed + rendered docs/screenshots) | ||
| 3. **Check PR metadata**: | ||
| - clear title | ||
| - concise description (what changed, why, risk) | ||
| - test/build notes | ||
| 4. **Remove noise** (debug logs, unrelated formatting, accidental file changes) | ||
|
|
||
| ## Review loop | ||
|
|
||
| Treat review as a tight operational loop: | ||
|
|
||
| 1. Fetch review comments via API/CLI (review + inline threads) | ||
| 2. Apply requested fixes in the same branch as **new commits** (consider `git commit --fixup` for easier squashing later; these can be squashed on merge; no amend/force-push required) | ||
| 3. Reply to each comment with what changed | ||
| 4. Resolve completed threads | ||
| 5. Request re-review | ||
|
|
||
| Repeat until all blocking feedback is cleared. | ||
|
|
||
| ## CI gates, merge strategy, and cleanup | ||
|
|
||
| ### CI gates | ||
|
|
||
| Merge only when required checks are green and branch protection rules are satisfied. | ||
|
|
||
| ### Merge strategy | ||
|
|
||
| Prefer **squash merge** for this workflow to preserve one-PR/one-commit history in `main`. | ||
|
|
||
| ### Post-merge cleanup | ||
|
|
||
| After merge: | ||
|
|
||
| 1. Delete remote branch | ||
| 2. Delete local branch | ||
| 3. Pull latest `main` | ||
| 4. Confirm follow-up tasks (if any) are tracked separately | ||
|
|
||
| ## Source | ||
|
|
||
| Built by [colmena](https://github.com/colmena) for [OpenClaw](https://openclaw.ai) agents. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.