Automated summary
Automates OpenClaw issue and pull request sweeps, repair job creation, and guarded fix PRs through the ClawSweeper GitHub App.
Strengths
- Describes an end-to-end flow from sweep report to repair job and dispatch.
- Clearly separates review workers, deterministic scripts, and short-lived GitHub App tokens.
- Provides concrete commands for status, audit, reconciliation, and job validation.
- Includes safeguards against duplicate PRs and keeps merge and write gates closed by default.
Limitations
- Tightly coupled to the private ClawSweeper repository, the `clawsweeper` GitHub App, and the OpenClaw ecosystem.
- Requires multiple secrets, GitHub App permissions, and specific runners before the full workflow can run.
- The provided text stops mid-way through the dispatch step and does not cover manual backfills or detailed gate configuration.
Use it when diagnosing or rerunning the ClawSweeper bot, producing a sweep report, or preparing an OpenClaw repair job.
Avoid it for a GitHub project without the ClawSweeper App or when you need a generic issue-triage automation.
Security analysis
CautionThe skill is a legitimate internal maintenance-bot playbook, but it wields high-privilege operations: a GitHub App private key, contents/actions write scopes, and commands that flip merge/automerge gates open to allow unattended merges and self-healing workflow dispatches. There is no exfiltration or destructive pattern, and the skill actually documents meaningful guardrails (workers without mutation creds, default-closed gates, deterministic executors, security-routing boundary). Because an agent would be routinely performing merges, PR writes, and gate changes, this warrants 'caution' rather than 'safe'.
- •Skill directs opening powerful write/merge gates via `gh variable set CLAWSWEEPER_ALLOW_EXECUTE/ALLOW_FIX_PR/ALLOW_MERGE/ALLOW_AUTOMERGE --body 1`, enabling automated branch repair, PR creation, and unattended merging; it also notes gates may be intentionally left open at '1' by a maintainer, so an agent following this could enable merge automation without a per-action confirmation.
- •Handles a GitHub App private key (`CLAWSWEEPER_APP_PRIVATE_KEY`) and broad app scopes (contents write, actions write, issues/PR write). Mitigated by the stated token boundary (key used only in `actions/create-github-app-token`, workers run without mutation creds), but this is a high-blast-radius credential surface.
- •Freeform maintainer mentions (`@clawsweeper <question or safe action request>`) are converted into one-off instructions for an AI assist review, which is a prompt-injection surface; the skill does state that action-looking prose must map to structured recommendations and pass deterministic gates, which limits the risk.
- •Runs arbitrary code from a checkout (`pnpm run build:all`, `pnpm run repair:*`, `pnpm local-review`) and does `git pull --ff-only` before building, so the skill executes whatever is in the target repo.
- •No destructive, exfiltration, or obfuscated patterns (no curl|sh, rm -rf, base64 payloads, or safety-disabling). Mutation is confined to legitimate GitHub operations on named repos, and there is an explicit security-routing boundary for vulnerabilities and secrets.
- •Skill drives a privileged GitHub App automation: it instructs writing repository Actions variables that open write/merge gates (CLAWSWEEPER_ALLOW_EXECUTE, ALLOW_FIX_PR, ALLOW_MERGE, ALLOW_AUTOMERGE, CLAWSWEEPER_COMMENT_ROUTER_EXECUTE), enabling unattended branch pushes, PR creation and merges.
- •Requires use of a GitHub App private key env var (CLAWSWEEPER_APP_PRIVATE_KEY) and short-lived app tokens; the text correctly scopes it to create-github-app-token steps, but the skill still depends on long-lived high-privilege credentials in the agent's environment.
- •Guidance explicitly permits leaving gates at '1' during a maintainer window rather than resetting, which leaves a persistent autonomous-merge capability in place.
- •Heavy shell/git/gh/pnpm execution with real mutation of a remote repository (dispatch jobs, close superseded PRs, fast-forward main), though each step is documented and gated rather than obfuscated or destructive.
Examples
In ~/Projects/clawsweeper, run the status and audit commands, then summarize open ClawSweeper sweep findings for openclaw/openclaw with counts and report links. Keep this read-only and do not post GitHub comments.Create a ClawSweeper repair job for openclaw/openclaw refs 123,456 using /tmp/clawsweeper-prompt.md, run the duplicate check with --dry-run, validate the job file, and stop before dispatch.Use the ClawSweeper report at records/openclaw-openclaw/items/123.md to create a repair job, then show the exact dispatch command for autonomous mode with the documented runners and model, but ask before running it.name: clawsweeper description: "Use for all ClawSweeper work: OpenClaw issue/PR sweep reports, repair jobs, cloud fix PRs, @clawsweeper maintainer mention commands, trusted ClawSweeper-reviewed autofix/automerge, GitHub Actions monitoring, permissions, gates, and manual backfills."
ClawSweeper
ClawSweeper lives at ~/Projects/clawsweeper. It is the one OpenClaw
maintenance bot for sweeping, repair jobs, and guarded fix PRs.
Use this skill whenever asked about reports, findings, dispatch health,
repair/cloud PR creation, comment commands, automerge, permissions, or gates.
Start
cd ~/Projects/clawsweeper
git status --short --branch
git pull --ff-only
pnpm run build:all
Do not overwrite unrelated edits. If the tree is dirty, inspect first and keep read-only report work read-only unless the requester asked to commit.
One Bot, One App
Use the ClawSweeper repo and the clawsweeper GitHub App. Use only
CLAWSWEEPER_* configuration for this automation. Do not use legacy apps,
variables, labels, or skills.
Required app setup:
CLAWSWEEPER_APP_CLIENT_ID: public app client ID forclawsweeper.CLAWSWEEPER_APP_PRIVATE_KEY: private key used only insideactions/create-github-app-tokensteps.- Target app permissions: read target scan context; write issues and pull
requests; contents write for report commits, repair branches, and workflow
inputs; Actions write on
openclaw/clawsweeperfor comment-router re-review dispatch, workflow dispatch, run cancellation, and self-heal.
Token boundary:
- Codex workers do not get mutation credentials.
- Review workers run with stripped secret/token env.
- Deterministic scripts own comments, labels, branch pushes, PR creation, closes, and merges through short-lived GitHub App tokens.
- Merge and write gates default closed.
Hosted Commit Reviews
Hosted per-commit reports and commit Check Runs are retired. For the retained
offline review of a committed branch, use pnpm local-review -- --base main.
$autoreview --mode commit --commit <sha> remains a separate general-purpose
review path.
Sweep Reports
Issue/PR reports live at:
records/<repo-slug>/items/<number>.md
records/<repo-slug>/closed/<number>.md
Lead with counts, concrete findings, and report links. Do not post unsolicited GitHub comments from report-reading work. Public surfaces are markdown reports, durable ClawSweeper review comments, and optional checks.
PR reports include Codex /review-style reviewFindings with priority,
confidence, repository-relative file, and line range. Public PR comments show a
short Review findings: list when findings exist; full review comments,
evidence links, likely owners, and runtime details stay inside the collapsed
Review details block.
Useful commands:
pnpm run status
pnpm run audit
pnpm run reconcile
pnpm run apply-decisions -- --dry-run
Create One Repair Job
Create a job from issue/PR refs and a maintainer prompt:
pnpm run repair:create-job -- \
--repo openclaw/openclaw \
--refs 123,456 \
--prompt-file /tmp/clawsweeper-prompt.md
Create from an existing ClawSweeper report:
pnpm run repair:create-job -- \
--from-report ../clawsweeper/records/openclaw-openclaw/items/123.md
The job creator checks for an existing open PR, body match, or remote
clawsweeper/<cluster-id> branch before writing another job. Use --dry-run
to inspect. Use --force only after deciding the duplicate guard is stale.
Validate, commit, then dispatch:
pnpm run repair:validate-job -- jobs/openclaw/inbox/clawsweeper-openclaw-openclaw-123.md
pnpm run repair:dispatch -- jobs/openclaw/inbox/clawsweeper-openclaw-openclaw-123.md \
--mode autonomous \
--runner blacksmith-4vcpu-ubuntu-2404 \
--execution-runner blacksmith-16vcpu-ubuntu-2404 \
--model gpt-5.6-sol
Do not dispatch a just-created job before the job file is committed and pushed; the workflow reads the job path from GitHub.
Replacement PRs
For a useful but uneditable/stale/unsafe source PR, make the maintainer prompt explicit:
Treat #123 as useful source work. If the source branch cannot be safely updated
because it is uneditable, stale, draft-only, unmergeable, or unsafe, create a
narrow ClawSweeper replacement PR instead of waiting. Preserve the source PR
author as co-author, credit the source PR in the replacement PR body, and close
only that source PR after the replacement PR is opened.
The worker should emit repair_strategy=replace_uneditable_branch and list the
source PR URL in source_prs. The deterministic executor opens or updates
clawsweeper/<cluster-id>, adds non-bot source authors as Co-authored-by
trailers, and closes superseded source PRs only after replacement exists.
Gates
Open execution windows intentionally and close them after the run:
gh variable set CLAWSWEEPER_ALLOW_EXECUTE --repo openclaw/clawsweeper --body 1
gh variable set CLAWSWEEPER_ALLOW_FIX_PR --repo openclaw/clawsweeper --body 1
gh variable set CLAWSWEEPER_ALLOW_MERGE --repo openclaw/clawsweeper --body 1
gh variable set CLAWSWEEPER_ALLOW_AUTOMERGE --repo openclaw/clawsweeper --body 1
Reset gates only when explicitly requested; the active maintainer window may intentionally
leave them at 1.
Important gates:
CLAWSWEEPER_ALLOW_EXECUTE: allows deterministic write lanes.CLAWSWEEPER_ALLOW_FIX_PR: allows branch repair/replacement PRs.CLAWSWEEPER_ALLOW_MERGE: allows merge-capable applicators.CLAWSWEEPER_ALLOW_AUTOMERGE: allows comment-router automerge.CLAWSWEEPER_COMMENT_ROUTER_EXECUTE: lets scheduled comment routing post replies and dispatch repair.
Maintainer Mentions
Prefer @clawsweeper comments for all maintainer-facing control. Slash
commands still parse as compatibility aliases, but examples and live guidance
should use mentions.
@clawsweeper status
@clawsweeper re-review
@clawsweeper review
@clawsweeper fix ci
@clawsweeper address review
@clawsweeper rebase
@clawsweeper autofix
@clawsweeper automerge
@clawsweeper approve
@clawsweeper explain
@clawsweeper stop
@clawsweeper <question or safe action request>
@clawsweeper[bot] re-review
@openclaw-clawsweeper fix ci
@openclaw-clawsweeper[bot] fix ci
Accepted aliases: review, re-review, rereview, review again,
rerun review, and run review. review and re-review dispatch a fresh
ClawSweeper issue/PR review without starting repair. fix ci,
address review, and rebase dispatch the
repair worker only for ClawSweeper PRs or PRs opted into
clawsweeper:autofix or clawsweeper:automerge. autofix runs the bounded
review/fix loop without merging. automerge runs the bounded review/fix/merge
loop, but draft PRs stay fix-only until GitHub marks them ready for review.
Freeform maintainer mentions such as @clawsweeper why did automerge stop?
or @clawsweeper: can you explain this failure? dispatch a read-only assist
review with the mention text as one-off instructions. The answer lands in the
next public ClawSweeper review comment. Action-looking prose does not directly
mutate GitHub; it must map to existing structured recommendations and pass the
normal deterministic gates.
Default accepted maintainers: OWNER, MEMBER, COLLABORATOR; fallback
repository permission accepts admin, maintain, or write. Contributor
comments are ignored without a reply.
Run router manually:
pnpm run repair:comment-router -- --repo openclaw/openclaw --lookback-minutes 180
pnpm run repair:comment-router -- --repo openclaw/openclaw --execute --wait-for-capacity
Scheduled routing stays dry unless
CLAWSWEEPER_COMMENT_ROUTER_EXECUTE=1.
Trusted Autofix And Automerge
@clawsweeper autofix opts an existing PR into the bounded review/fix loop.
@clawsweeper automerge opts an existing PR into the bounded review/fix/merge
loop. The router:
- verifies maintainer authorization;
- labels the PR
clawsweeper:autofixorclawsweeper:automerge; - dispatches ClawSweeper review for the current head SHA;
- creates or reuses a durable adopted job;
- repairs at most the configured caps;
- never merges autofix PRs or draft PRs;
- merges automerge PRs only when ClawSweeper passed the exact current head, checks are green, GitHub says mergeable, no human-review label is present, the PR is not draft, and both merge gates are open.
Missing changelog is never a review finding or merge blocker. CHANGELOG.md is release-only; record user-facing release-note context in the PR body or squash message, never edit the changelog for normal repairs.
If ClawSweeper passes while merge gates are closed, it labels
clawsweeper:merge-ready and comments instead of merging. @clawsweeper stop
adds clawsweeper:human-review.
When asked to create a PR and enable ClawSweeper automerge, do not
leave the local OpenClaw checkout on the PR branch. After the PR is created,
pushed, and the @clawsweeper automerge request is posted or otherwise
confirmed, return the local checkout to main and fast-forward it when the
working tree is clean:
git switch main
git pull --ff-only
If unrelated local edits or an in-progress rebase prevent switching, report the blocker instead of stashing, deleting, or overwriting work.
Repair caps:
CLAWSWEEPER_MAX_REPAIRS_PER_PR=10
CLAWSWEEPER_MAX_REPAIRS_PER_HEAD=1
Security Boundary
Do not stage unapproved security-sensitive work for ClawSweeper Repair. Route vulnerability reports, CVE/GHSA/advisory work, leaked secrets/tokens/keys, plaintext secret storage, SSRF, XSS, CSRF, RCE, auth bypass, privilege escalation, and sensitive data exposure to central OpenClaw security handling.
For PRs explicitly opted into clawsweeper:autofix or
clawsweeper:automerge, security-sensitive review findings may dispatch
bounded repair, but merge remains blocked until a later exact-head review is
clean and the normal merge gates pass. Trust deterministic ClawSweeper security
markers, labels, and job frontmatter; do not infer security handling from vague
prose.
Monitoring
Receiver workflows:
gh run list --repo openclaw/clawsweeper --workflow sweep.yml \
--limit 12 --json databaseId,displayTitle,event,status,conclusion,createdAt,updatedAt,url
gh run list --repo openclaw/clawsweeper --workflow repair-cluster-worker.yml \
--limit 12 --json databaseId,displayTitle,event,status,conclusion,createdAt,updatedAt,url
gh run list --repo openclaw/clawsweeper --workflow repair-comment-router.yml \
--limit 12 --json databaseId,displayTitle,event,status,conclusion,createdAt,updatedAt,url
gh run list --repo openclaw/clawsweeper --workflow github-activity.yml \
--limit 12 --json databaseId,displayTitle,event,status,conclusion,createdAt,updatedAt,url
Target dispatcher:
gh run list --repo openclaw/openclaw --workflow "ClawSweeper Dispatch" \
--limit 8 --json databaseId,displayTitle,event,status,conclusion,headSha,url
Reading Output
For findings or failures, summarize:
- target repo, item/PR, run, report path
- result, confidence, severity, and exact blocker
- affected files or cluster refs
- validation commands and whether they passed
- whether mutation gates were open or closed
- next deterministic action
Keep the broom small: one cluster, one branch, one PR, narrow proof, clear owner-visible evidence.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/clawsweeper-maintenance-prs-mte1lljv/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/clawsweeper-maintenance-prs-mte1lljv' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/clawsweeper-maintenance-prs-mte1lljv/download' --output '.skill-downloads/clawsweeper-maintenance-prs-mte1lljv/SKILL.md.part' && mv '.skill-downloads/clawsweeper-maintenance-prs-mte1lljv/SKILL.md.part' '.skill-downloads/clawsweeper-maintenance-prs-mte1lljv/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/clawsweeper-maintenance-prs-mte1lljv/SKILL.md' && test -s '.skill-downloads/clawsweeper-maintenance-prs-mte1lljv/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/clawsweeper' && cp -R '.skill-downloads/clawsweeper-maintenance-prs-mte1lljv' '.claude/skills/clawsweeper'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/clawsweeper-maintenance-prs-mte1lljv'openskills read 'clawsweeper-maintenance-prs-mte1lljv'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/clawsweeper-maintenance-prs-mte1lljv/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Configure a Chat Channel with SecretRefs
DevOps
Set up chat channels using non-interactive commands, with secrets only as SecretRefs. Covers gather, mutate, repair, and prove steps for reliable delivery.
Investigate ClickHouse CI Failures
DevOps
Investigate a ClickHouse CI failure end-to-end from a PR or S3 report URL. Fetches failed tests, classifies flaky vs real regression, and checks for existing issues/fixes.
Ansible PR Review
DevOps
Reviews an Ansible PR following the project's standardized process, including changelog checks, test coverage validation, and feedback tracking.