GB-Power-Market-JJ repo-guardian
install
source · Clone the upstream repo
git clone https://github.com/GeorgeDoors888/GB-Power-Market-JJ
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/GeorgeDoors888/GB-Power-Market-JJ "$T" && mkdir -p ~/.claude/skills && cp -r "$T/openclaw-skills/skills/bloodandeath/repo-guardian" ~/.claude/skills/georgedoors888-gb-power-market-jj-repo-guardian && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/GeorgeDoors888/GB-Power-Market-JJ "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/openclaw-skills/skills/bloodandeath/repo-guardian" ~/.openclaw/skills/georgedoors888-gb-power-market-jj-repo-guardian && rm -rf "$T"
manifest:
openclaw-skills/skills/bloodandeath/repo-guardian/SKILL.mdsource content
Repo Guardian — Dual-Model PR Review & Issue Triage
Automated repository maintenance with cross-model review consensus.
Scope & Boundaries
Repo Guardian handles PR review governance and repo maintenance automation: reviewing PRs, enforcing quality via dual-model consensus, auto-merging when approved, and triaging repository state.
It is not the issue-to-fix implementation pipeline. If the job is to fetch issues, spawn coding agents, implement fixes, open PRs, and monitor review feedback, use gh-issues instead.
It is also not a general-purpose GitHub CLI toolkit. For direct
gh CLI
operations such as listing PRs, commenting, checking CI, or making ad hoc API
queries, use the github skill.
NOT For
- Implementing issue fixes end-to-end — fetching issues, spawning coding agents, writing code, and opening PRs belongs to the gh-issues skill
- General GitHub CLI operations — listing PRs, commenting, checking CI, or ad-hoc
queries belong to the github skillgh - Code authoring or refactoring — Repo Guardian reviews and gates merges; it does not write new code
What It Does
Every 6 hours (configurable), Repo Guardian:
- Checks for open PRs on the target repo
- Reviews each PR with two independent models (Opus + GPT-5.4)
- Merges if both models approve
- Requests changes if either model finds issues
- Optionally prepares follow-up remediation for review-discovered issues
- Checks for open issues and triages them for the appropriate next step
Cron Setup
# Run the guardian script via OpenClaw cron # Add to ~/.openclaw/cron/jobs.json: { "repo-guardian": { "schedule": "0 */6 * * *", "agent": "keats", "message": "Run repo-guardian for your-org/your-repo", "skill": "repo-guardian" } }
Or run manually:
bash <skill_dir>/scripts/guardian.sh your-org/your-repo
Review Process
PR Review (Dual-Model Consensus)
Open PR detected │ ├─→ Opus reviews (security, architecture, correctness) ├─→ Sonnet reviews (code quality, edge cases, tests) │ (fallback: Haiku if Sonnet unavailable) │ ├─ Both APPROVE → auto-merge (squash) ├─ One APPROVE, one REQUEST_CHANGES → post review comments, do not merge ├─ Both REQUEST_CHANGES → post review comments, do not merge └─ Either finds CRITICAL issue → post comments + label "needs-fix"
Issue Triage
Open issue detected │ ├─ Assess complexity and routing (ready for automation vs needs human) ├─ Ready for implementation: hand off to the issue-fix pipeline (gh-issues) └─ Complex or unclear: add label "needs-human", post analysis comment
Review Criteria
Each model evaluates independently against:
- Correctness — Does the code do what the PR claims?
- Security — Any vulnerabilities, secret exposure, injection risks?
- Tests — Are changes tested? Do existing tests still pass?
- Scope — Does the PR stay within its stated purpose?
- Quality — Code style, error handling, edge cases, naming
Each model returns a structured verdict:
{ "verdict": "APPROVE|REQUEST_CHANGES|CRITICAL", "summary": "One-line summary", "findings": [ {"severity": "critical|major|minor", "file": "...", "line": 0, "issue": "...", "fix": "..."} ], "confidence": "high|medium|low" }
Configuration
Environment variables (set in shell or
.env):
— GitHub token with repo access (required)GH_TOKEN
— Default repo (e.g.,GUARDIAN_REPO
)your-org/your-repo
— Enable auto-merge on consensus (GUARDIAN_AUTO_MERGE
/true
, default:false
)true
— Enable auto-fix for issues (GUARDIAN_AUTO_FIX
/true
, default:false
)false
— Max PRs to review per run (default:GUARDIAN_MAX_PRS
)5
— Max issues to process per run (default:GUARDIAN_MAX_ISSUES
)3
Safety
- Never force-pushes or modifies protected branches
- Squash merges only — clean history
- Labels PRs with review status for audit trail
- Posts review comments with model attribution (which model said what)
- Requires dual consensus — single model cannot merge alone
- Skips PRs by org members marked with
labelskip-guardian - Dry-run mode available (
flag)--dry-run
Models Used
| Role | Primary | Fallback |
|---|---|---|
| Reviewer A | anthropic/claude-opus-4-6 | anthropic/claude-sonnet-4-6 |
| Reviewer B | anthropic/claude-sonnet-4-6 | anthropic/claude-haiku-4-5 |
| Issue triage | anthropic/claude-sonnet-4-6 | anthropic/claude-haiku-4-5 |
Note: GPT-5.4 (
) can be used as Reviewer B if the OpenAI Codex agent is configured and available in your deployment. When using GPT, set Reviewer B primary toopenai-codex/gpt-5.4with fallbackopenai-codex/gpt-5.4.anthropic/claude-sonnet-4-6
Requirements
CLI authenticatedgh
with repo accessGH_TOKEN- OpenClaw with Opus + GPT agents configured