I. Skill Overview
This skill processes a batch of minor OpenClaw bug fix tasks (default batch size: 5, hard upper limit: 20), and converts them into fully validated, merge-ready pull requests via a standardized end-to-end workflow.
Core Guiding Philosophy: Prioritize actionable PR artifacts over raw audit notes. Before presenting a PR URL to maintainers, the candidate must pass the full mandatory validation pipeline below:
- Rebased against the latest
main branch
- All local test suites pass
- Zero actionable findings from automated
$autoreview inspection
- Pushed to remote, with full GitHub CI workflows returning green passing status
Explicit Out-of-Scope Work (automatically excluded from processing):
- Plugin SDK / API boundary changes under
src/plugin-sdk/**
- New feature implementations
- New configuration parameter additions
- Security & authentication boundary modifications
- UI/UX adjustments requiring formal product team judgment
II. Core Functional Capabilities
1. Strict Candidate Eligibility Bar
A thread qualifies for sweep processing only if it satisfies all of the following criteria simultaneously:
| Eligibility Condition |
Detailed Specification |
| Genuine Functional Bug |
Defined as a runtime defect or documented logical flaw; feature requests, product enhancements, support inquiries, and pure documentation edits are disqualified |
| Verifiable Root Cause |
The source of the defect can be pinpointed within the current upstream main source code |
| Validated Dependencies |
If external dependency behavior contributes to the bug, the logic is cross-verified against upstream SDK documentation, source code, and type definitions |
| Minimal Code Diff |
Production/runtime code changes are well under 500 total lines of code; a strict hard limit of 500 LOC applies |
| Expanded Test Scope Allowed |
Test file additions/rewrites may exceed the 500 LOC cap, but must remain tightly focused on reproducing the target bug |
| No New Third-Party Dependencies |
No additional npm/pip module dependencies are introduced |
| No New Config Options |
No fresh user-facing or internal configuration flags added |
| Non-Breaking Change |
No backwards-incompatible runtime behavior introduced |
| No Security / Product Decision Gates |
Does not require sign-off from security leads, product managers, or repository owners for boundary adjustments |
| No Plugin SDK Modifications |
Does not touch any logic within the src/plugin-sdk/** boundary |
| No Major Refactoring Scope |
Not a large-scale structural code rewrite disguised as a bug fix |
| Feasible Targeted Validation |
A narrow, reproducible proof of the defect and its resolution can be constructed |
Eligible Valid Use Cases
- Mismatched provider API parameter mapping (validated against upstream API contracts & type definitions)
- CLI command behavior inconsistent with adjacent sibling CLI subcommands
- Narrow runtime state or serialization defects (accompanied by failing regression test cases)
- Issues already fully resolved on the
main branch (with supporting source proof to mark duplicates as closed)
Disqualified Rejected Use Cases
- Feature requests, new toggle switches, database migrations, release pipeline adjustments, internal workflow policy changes, general support inquiries
- Plugin SDK/API boundary modifications (including compatibility shims, new SDK methods, exported SDK interfaces, plugin-facing channel/provider abstraction layers)
- Authentication & security boundary edits (unless explicitly assigned to the sweep workflow)
- Bugs requiring unavailable live API credentials for reproduction or validation
- Pull requests with failing red CI workflows (unless fully fixed, rebased, re-pushed, and revalidated to green status)
- PRs only reviewed locally without rebasing, remote push, or live GitHub CI validation
- PRs with unresolved actionable defects flagged by
$autoreview automated inspection
- Defect fixes that inherently require broader architectural refactoring
- Speculative bug reports lacking reproducible steps or verifiable root cause evidence
- UI/UX visual adjustments requiring formal product team review and approval
2. Batch Size & Input Source Modes
| Parameter |
Definition |
batch_size |
Target count of merge-ready PRs to generate; default value = 5, maximum hard limit = 20 |
source_mode |
Two operational modes: discovery (default auto-scan) / provided-prs (user-supplied reference list) |
provided_prs |
Activated when source_mode=provided-prs; explicit list of Issue/PR numeric references supplied as input |
In provided-prs mode, the workflow only audits the supplied PR references and their directly linked duplicate/related threads, unless broader repository discovery is required to validate the optimal fix implementation.
3. Complementary Supporting Skills
| Auxiliary Skill |
Core Purpose Within Sweep Workflow |
$gitcrawl |
Offline repository thread discovery & semantic duplicate clustering |
$openclaw-pr-maintainer |
Enforce live GitHub repository mutation & state validation rules |
$github-author-context |
Evaluate contributor trust tiers and handle attribution credit logic |
$openclaw-testing |
Generate targeted local, Testbox, and live runtime validation proofs |
$autoreview |
Automated pre-merge static inspection executed prior to PR publication |
$crabbox |
Run comprehensive end-to-end and live environment validation suites |
4. Standard 8-Step Sweep Iteration Loop
Step 1: Pre-Workflow Repository Preparation
git status -sb
git pull --ff-only
Validate the active working branch matches the expected target (almost always the main branch).
Step 2: Build Candidate Defect Clusters
- Run
gitcrawl to scan open Issues, PRs, related adjacent threads, and keyword-matched defect groups
- Fetch live real-time thread metadata via
gh issue view / gh pr view
- Ingest cross-linked PR references and duplicate issue tags embedded within thread bodies
Step 3: Individual Cluster Triage & Classification
- Read full Issue/PR body text, comment history, applied labels, cross-referenced links, current upstream source code, and adjacent test suites
- Automatically skip PRs created by wide-permission core maintainers within the last 14 days; this rule can only be overridden for explicitly named PRs or formal maintainer work requests
- Record the original thread opener / PR author to preserve proper contributor attribution credit
- Assign a final disposition for the cluster:
repair-existing-pr: Patch and refine an existing open pull request
create-new-pr: Generate an entirely new pull request from scratch
close-fixed-on-main: Mark the thread closed with proof the bug is already resolved on main
close-duplicate: Mark the thread closed as a duplicate of an existing tracked defect
reject: Disqualify the thread from sweep processing per candidate eligibility rules
Step 4: Pre-Fix Defect Proof Validation
Construct verifiable proof of the original defect before implementing any patch:
- Failing automated test cases
- Minimal targeted reproduction script
- Runtime log / source code root cause audit
- Upstream dependency API contract mismatch validation
If the bug is already resolved on main, compile source, test, and commit proof, then close the original thread with a polite explanatory comment.
Step 5: Implement Targeted Bug Patch
- Prioritize reusing existing open PRs if the submission meets quality standards and the sweep workflow retains write push permissions to the author’s branch
- If the original PR is uneditable or structurally unsound, create a dedicated sweep-owned PR while preserving valid contributor attributions via co-author tags
- Generate a brand-new PR if no existing PR addresses the target bug
- Add focused regression test cases where applicable
- Insert release-note context for user-facing fixes within the PR description or commit message; explicitly credit original bug reporters and code contributors
Step 6: Automated Review, Rebase & Remote Publication
- Rebase or refresh the PR branch against the latest remote
origin/main
- Resolve code drift and newly surfaced CI failures introduced by the rebase; unresolved drift disqualifies the PR from batch counting
- Never modify
CHANGELOG.md within sweep-generated PRs — release automation pipelines generate consolidated changelog entries from PR and commit history post-merge
- Execute minimal meaningful local / Testbox / live runtime validation tests against the rebased commit HEAD
- Re-run
$autoreview repeatedly until zero unresolved actionable findings remain
- Create or update the PR with a complete body containing dedicated proof metadata fields
- Push the fully audited final commit HEAD to the remote repository
- Validate live GitHub CI workflows return solid green passing status — PRs with pending, failed, merge-conflicting, or externally blocked CI runs are excluded from the finished batch count
Step 7: Repository Hygiene & Thread Cleanup
- Immediately close duplicate threads and defects already resolved on
main mid-sweep, attaching supporting proof links in the closing comment
- Limit modifications to a maximum of 5 associated threads per single defect cluster; additional edits require explicit manual confirmation
- All automated bot comments must remain polite, specific, and embed direct links to supporting proof, PRs, or resolving commits
Step 8: Iterate Loop
Repeat the full 8-step cycle until the target batch_size count of merge-ready PR URLs is accumulated, or all eligible candidate threads are exhausted.
5. Standard PR Body Proof Format
All sweep-generated PRs follow the repository’s official PR template with two mandatory sections:
## What Problem This Solves
## Evidence
The PR body focuses exclusively on core functional intent and the most critical validation proof artifacts. Source code, test coverage, and CI results are reviewed separately to confirm correctness before marking the PR as merge-ready.
6. Handling Rules for Pre-Existing Open PRs
| Scenario |
Standard Processing Logic |
| High-quality valid existing PR |
Rebase & refresh against latest main, resolve minor defects, run local validation + clean autoreview, push remote, only count toward batch quota after CI returns green |
| Low-quality PR with valuable core ideas |
Reimplement the fix locally in a new sweep PR, add co-author attribution where appropriate, politely close the original PR with a thank-you note and explanation |
| PR addresses duplicate / already resolved bug |
Post comment with supporting proof artifacts, close the original thread |
| No push permissions to contributor’s branch |
Create a separate sweep-owned branch & PR, retain original valid commits or contributor attribution credits |
| CI turns red after local proof validation |
Treated as standard triage workflow: inspect failed job logs, apply corrective patches or reject the candidate, re-run validation; only counted after CI fully passes green |
III. Primary Applicable Use Cases
- Batch Generation of Merge-Ready Bug Fix PRs
Systematically filter, patch, and output a validated list of fully mergeable PR URLs from raw Issue/PR backlogs.
- Accelerate Maintainer Daily Triage
Automatically separate actionable minor bug reports from disqualified out-of-scope requests, drastically reducing manual maintainer review overhead.
- Pre-Release Bug Backlog Cleanup
Bulk resolve confirmed, reproducible minor defects with clear minimal fix paths ahead of beta/stable release cycles to uphold release quality standards.
- Upgrade Existing Community PR Quality
Rebase, patch, auto-inspect, and CI-validate third-party contributor PRs to bring them up to repository merge eligibility standards.
- Automated Duplicate & Resolved Thread Housekeeping
Identify and auto-close duplicate Issues/PRs and defects already fixed on the main branch mid-sweep with attached supporting proof.
IV. Standard Structured Output Ledger
The skill maintains a persistent running audit ledger with three segmented groups:
accepted:
- PR URL:
source refs:
bug:
root cause:
fix:
risk:
rebase/head:
left-test:
autoreview:
CI:
credit/thanks:
cleanup:
rejected:
- ref:
reason:
closed:
- ref:
reason:
proof/comment:
V. Critical Governing Principles
- PR-First Mandate Over Raw Notes: Never surface unvalidated PR URLs to maintainers without completing the full end-to-end validation pipeline
- Strict Candidate Eligibility Threshold: Enforce <500 production LOC limit, ban new dependencies/configs, exclude all plugin SDK boundary edits
- Auto-Skip Recent Maintainer PRs: PRs created by wide-permission core maintainers within 14 days are automatically excluded from sweep processing
- No CHANGELOG Edits In Sweep PRs: Changelog generation is delegated exclusively to dedicated release automation workflows
- Green CI Is Hard Blocker: PRs with pending or failing CI runs are not counted toward the target batch size
- Per-Cluster Edit Cap: Modify a maximum of 5 associated threads per defect cluster; additional edits require explicit human confirmation
- Polite, Specific Automated Comments: All bot-generated thread comments must include direct links to supporting proof, PRs, or resolving commits
- No Artificial Batch Padding: If the pool of eligible candidates is exhausted early, return fewer PRs than the requested
batch_size instead of inflating the batch with low-quality disqualified fixes
VI. Summary
OpenClaw Landable Bug Sweep is a maintainer-focused automated batch bug resolution skill for generating production-ready mergeable pull requests. It enforces rigid candidate eligibility filters, follows a standardized 8-step processing loop, and leverages $autoreview automated inspection to convert raw Issue/PR backlogs into fully validated, high-quality PR artifacts. The workflow exclusively produces actionable merge-ready PRs instead of static analysis notes, and explicitly excludes high-risk work categories including plugin SDK boundary changes, new feature additions, new configuration parameters, and security modifications. Built for OpenClaw core maintainers, it streamlines pre-release minor bug cleanup, accelerates daily repository triage, and elevates the quality of community-submitted pull requests at scale.