Cleanup always loses to feature work. Your AI drafts small cleanup changes you can review in the morning.
What happened
xAI's own guide, written by Lingxi Li, says nightly Grok Bot agents work on code quality. It says they remove dead logic, fix load-time and bundle-size problems, and return new pull requests on GitHub. The guide doesn't say who approves merging them.
Download the .zip. In Settings, find Skills, choose Upload skill and pick the file. Code execution has to be turned on.
Claude Code
Run this in your terminal:mkdir -p ~/.claude/skills/prepare-code-cleanup-pull-requests-overnight && curl -fsSL https://botcurrent.com/skills/prepare-code-cleanup-pull-requests-overnight/SKILL.md -o ~/.claude/skills/prepare-code-cleanup-pull-requests-overnight/SKILL.md
Codex
Run this in your terminal:mkdir -p ~/.agents/skills/prepare-code-cleanup-pull-requests-overnight && curl -fsSL https://botcurrent.com/skills/prepare-code-cleanup-pull-requests-overnight/SKILL.md -o ~/.agents/skills/prepare-code-cleanup-pull-requests-overnight/SKILL.md
04Draft pull-request contents and human review gates; leave edits and scheduling unconfigured.
Advanced prompt availability
Advanced prompt
No accepted companion is available for this record. The original material below retains its original status.
Technical setup & run design — optional
Starter
Separate short starter version composed-v1. Untested.
Advanced prompt
No accepted advanced companion is available. Legacy material remains in the original notes with its status.
Compatibility
Unknown; check the actual tool, account and permissions.
Run design
No reviewed run design. No runtime or schedule is activated by BotCurrent.
Setup and access
Proposed inputs
Name
Maintenance candidate sample
Owner
Maintainer
Minimum scope
Selected code descriptions, warnings and baseline metric definitions
Quality check
Separate suspected dead code from verified unused paths.
Name
Work boundary
Owner
Repository owner
Minimum scope
Allowed directories, change types and resource cap
Quality check
Identify prohibited interfaces and unrelated refactors.
Access and setup — proposed or unknown
Proposed minimum
Offline candidate descriptions and a private maintenance-plan register.
Compatibility unknowns
Unknown: current runtime, code indexing, benchmark reliability and pull-request integration.
External actions requiring approval
Scheduled editing, compute allocation, repository publication and any merge or release.
Source evidence, attribution & limitations
Full source evidence
Vendor report · Coding orchestration
Original task title: Prepare overnight code-maintenance PRs
Editorial candidate. This is source-backed reporting or a documented workflow. BotCurrent has not independently tested this task. A proposed Canadian adaptation is not evidence of a Canadian deployment or compliance certification.
Editorial classification; no execution or compatibility test is implied.
No tool mapping reviewed for this task.
Source-backed example. Practical decision guidance is proposed and untested; this is not a full implementation guide.
The problem
Code cleanup and performance maintenance can remain neglected when developers must prioritize visible feature work during the day.
Suggested task
Run scoped overnight maintenance to improve code quality, remove dead logic and address loading or bundle issues through new PRs.
What you could produce
Maintenance pull requests with changes and supporting checks for human review before merge.
Where these suggestions come from
Core problem: Our interpretation of the task
Agent job: Our interpretation of the task
Expected output: Our interpretation of the task
Relevant job roles: Our interpretation of the task
Benefit type: Our interpretation of the task
Suggestions and their limits
Describes the task’s purpose and intended output; measured benefit, safe unsupervised operation and successful delivery are not established by this framing.
Editorial synthesis based on the linked source. This framing does not add evidence of successful delivery or results.
Before you try it · suggestions untested
Case-specific decision guidance and first checks are original proposals. The linked source supports the attributed task; this added guidance has not been executed.
Maintenance work can be appealing precisely because it seems routine, yet supposedly dead code may support an uncommon configuration and a smaller bundle may change application behavior. Unattended editing also risks accumulating broad changes that nobody can review efficiently.
A maintenance proposal queue could constrain each candidate to a clear rationale, affected area and required evidence. Maintainers could choose focused changes for later authorized work instead of receiving a large cleanup whose benefit and regression risk are hard to separate.
Why an agent / simpler alternative
Useful judgment
Spot maintenance candidates and explain why a removal or optimization needs evidence beyond superficial code appearance.
Simpler alternative
Use scheduled dependency reports, linters and bundle dashboards when the maintenance criteria are deterministic.
Unsuitable when
The process lacks bounded scope, compute limits or a human reviewer for resulting changes.
Expected deliverable and review checks
Proposed artifact
Small maintenance proposals with rationale, preservation requirements and proposed regression evidence.
Critical checks
Each proposal has a narrow reviewable scope and a defined baseline.
Performance improvement remains a hypothesis until comparable measurements exist.
Missing output evidence
No new workflow run or output inspection was performed for this overlay; use the canonical source-outcome references.
First check — proposed, unexecuted
Status
proposed_unexecuted
Synthetic fixture
A fictional queue includes a rare-config branch and a cleanup mixing three unrelated change types.
Acceptance checks
Retain the uncertain branch.
Split the mixed proposal without claiming improved performance.
Stop conditions
Repository edits, scheduled jobs, benchmarks or pull-request creation is required.
Maintenance pull requests with changes and supporting checks for human review before merge.
What you need: The source names Grok Bot, coding agents and GitHub. Authorize repository access and define allowed changes, checks and compute limits. Compatibility and costs are unverified.
Run scoped overnight maintenance to improve code quality, remove dead logic and address loading or bundle issues through new PRs.
Proposed check: compare equivalent benchmarks and test uncommon configurations before accepting a removal.
Specific nightly merge approval is not stated. Recommended: approve the schedule and scope, then review each PR before merging.
Vendor-described nightly workflow; BotCurrent has not run maintenance or verified performance gains.
Related tasks
Suggestions share task wording or context; compatibility and execution remain unverified.
Allow optional analytics to help us improve BotCurrent? We use PostHog to see which pages and buttons people use, including recordings with anything you type hidden. Searches and saved items are excluded. Privacy details