From 425d5667fcc363797c14995e858ee2cf0cb0aac8 Mon Sep 17 00:00:00 2001 From: obrera <24781037+obrera@users.noreply.github.com> Date: Mon, 23 Feb 2026 10:41:41 +0000 Subject: [PATCH 1/3] Add Agent Git Workflow skill documentation --- src/content/docs/skills/agent-git-workflow.md | 78 +++++++++++++++++++ src/content/docs/skills/index.md | 1 + 2 files changed, 79 insertions(+) create mode 100644 src/content/docs/skills/agent-git-workflow.md diff --git a/src/content/docs/skills/agent-git-workflow.md b/src/content/docs/skills/agent-git-workflow.md new file mode 100644 index 0000000..f50ea83 --- /dev/null +++ b/src/content/docs/skills/agent-git-workflow.md @@ -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: `/-` +- Example: `obrera/skills-agent-git-workflow` + +This helps reviewers immediately see who owns the branch and what the change is about. + +> **Note on `obrera` in examples:** `obrera` is the assistant's GitHub handle and is used here as a concrete example prefix for branch names. It is an example, not a required value — replace it with your own handle. + +## 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/sync** with `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 +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. diff --git a/src/content/docs/skills/index.md b/src/content/docs/skills/index.md index fb727a5..feda1c1 100644 --- a/src/content/docs/skills/index.md +++ b/src/content/docs/skills/index.md @@ -7,6 +7,7 @@ description: OpenClaw agent skills we've built and use daily. ## Available +- **[agent-git-workflow](/skills/agent-git-workflow/)** — Run clean, reviewable GitHub PR workflows with disciplined commits, review loops, and safe merges. - **[deploy](/skills/deploy/)** — Detect, generate, and deploy projects to Dokploy — fully automated. - **[gh-repo-setup](/skills/gh-repo-setup/)** — Standardize GitHub repository settings with branch protection, metadata, and best-practice defaults. - **[static-deploy](/skills/static-deploy/)** — Deploy static sites to Dokploy with CI, domains, and auto-deploy webhooks. From 62fcb8e5e0402ba3654054f6263d003ec29a4c72 Mon Sep 17 00:00:00 2001 From: obrera <24781037+obrera@users.noreply.github.com> Date: Mon, 23 Feb 2026 10:46:37 +0000 Subject: [PATCH 2/3] docs: clarify rebase wording and review-fix commit flow --- src/content/docs/skills/agent-git-workflow.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/skills/agent-git-workflow.md b/src/content/docs/skills/agent-git-workflow.md index f50ea83..8bc75c8 100644 --- a/src/content/docs/skills/agent-git-workflow.md +++ b/src/content/docs/skills/agent-git-workflow.md @@ -34,7 +34,7 @@ Why this works: Before requesting review: -1. **Rebase/sync** with `main` and resolve conflicts locally +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 @@ -47,7 +47,7 @@ Before requesting review: 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 +2. Apply requested fixes in the same branch as **new commits** (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 From bc59cd148f96bc507ff1d28907d4efa784a4f2cd Mon Sep 17 00:00:00 2001 From: obrera <24781037+obrera@users.noreply.github.com> Date: Mon, 23 Feb 2026 10:50:24 +0000 Subject: [PATCH 3/3] docs: address Gemini review wording suggestions --- src/content/docs/skills/agent-git-workflow.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/skills/agent-git-workflow.md b/src/content/docs/skills/agent-git-workflow.md index 8bc75c8..92790fc 100644 --- a/src/content/docs/skills/agent-git-workflow.md +++ b/src/content/docs/skills/agent-git-workflow.md @@ -14,7 +14,7 @@ Use branch names that make ownership and intent obvious: This helps reviewers immediately see who owns the branch and what the change is about. -> **Note on `obrera` in examples:** `obrera` is the assistant's GitHub handle and is used here as a concrete example prefix for branch names. It is an example, not a required value — replace it with your own handle. +> **Note on `obrera`:** `obrera` is an example GitHub handle prefix. Replace it with your own. ## One PR / one commit discipline @@ -47,7 +47,7 @@ Before requesting review: 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** (these can be squashed on merge; no amend/force-push required) +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