From tend-ci-runner
Nightly code quality sweep — resolves bot PR conflicts, reviews recent commits, surveys existing code, and closes resolved issues.
npx claudepluginhub max-sixty/tend --plugin tend-ci-runnerThis skill uses the workspace's default tool permissions.
Three phases: resolve conflicts on bot PRs, review recent commits, and survey a slice of existing
Daily review of the previous night's CI runs — identifies problems and improves repo-local skills and workflows.
Conducts systematic code reviews of GitHub pull requests, auditing CLAUDE.md compliance, bugs, git history, prior PR comments, and code comments for actionable feedback.
Performs repo-wide or PR diff readiness sweeps dispatching parallel agents across security (shieldkit), tests (testkit), codebase (lenskit), evolution (timewarp), and instructions (alignkit) for synthesized reports.
Share bugs, ideas, or general feedback.
Three phases: resolve conflicts on bot PRs, review recent commits, and survey a slice of existing code/docs.
BOT_LOGIN=$(gh api user --jq '.login')
gh pr list --author "$BOT_LOGIN" --json number,title,mergeable,headRefName \
--jq '.[] | select(.mergeable == "CONFLICTING")'
For each conflicted PR, dispatch a subagent to:
gh pr checkout <number>git merge origin/maingit add, git commit --no-edit/tend-ci-runner:running-in-cigit merge --abort and comment explaining manual resolution is
neededRun subagents in parallel. Each must work in isolation (git worktree add /tmp/pr-<number> <branch>). After all complete, clean up temp worktrees.
Skip if no PRs have conflicts.
git log --since='24 hours ago' --oneline main
If no commits in the past 24 hours, skip this step.
Get the aggregate diff:
OLDEST=$(git log --since='24 hours ago' --format='%H' main | tail -1)
git diff ${OLDEST}^..HEAD
git log --since='24 hours ago' --format='%h %s' main
Read the project's CLAUDE.md before reviewing. Apply the review checklist below to the diff, focusing on changes rather than unchanged code. Also check whether CLAUDE.md itself needs updating to reflect the new code (e.g., new file paths, changed commands, removed patterns).
gh issue list --state open --json number,title
gh pr list --state open --json number,title,headRefName
For each open issue, check whether recent commits or the current codebase state already resolve
it. If resolved, comment briefly and close with gh issue close. Skip partially unresolved issues.
Run the survey script to get today's file list (~10 files, rotating through the full repo over 28 days):
${CLAUDE_PLUGIN_ROOT}/scripts/todays-survey-files.sh
Before reviewing files, read the project's CLAUDE.md and any project-specific skills or review criteria it references. Apply the review checklist below to each file in full.
Used by both Step 2 (applied to recent diffs) and Step 4 (applied to full files).
General quality:
Convention compliance (from CLAUDE.md and project skills):
Before acting on findings, check for duplicates and existing work:
gh issue list --state open --json number,title
gh pr list --state open --json number,title,headRefName
The default action is a PR, not an issue. If there's a plausible fix, make it — explain uncertainty in the PR description.
For each finding:
Report: commits reviewed, files surveyed, findings, actions taken, assessment (clean / minor issues / needs attention).