$npx -y skills add Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations --skill ruRepo Updater - Multi-repo synchronization with AI-assisted review orchestration. Parallel sync, agent-sweep for dirty repos, ntm integration, git plumbing. 17K LOC Bash CLI.
| 1 | # RU - Repo Updater |
| 2 | |
| 3 | A comprehensive Bash CLI for synchronizing dozens or hundreds of GitHub repositories. Beyond basic sync, RU includes a full AI-assisted code review system and agent-sweep capability for automatically processing uncommitted changes across your entire projects directory. |
| 4 | |
| 5 | ## Why This Exists |
| 6 | |
| 7 | When you work with 47+ repos (personal projects, forks, dependencies), keeping them synchronized manually is tedious. But synchronization is just the beginning—RU also orchestrates AI coding agents to review issues, process PRs, and commit uncommitted work at scale. |
| 8 | |
| 9 | **The problem it solves:** |
| 10 | - Manual `cd ~/project && git pull` for each repo |
| 11 | - Missing updates that accumulate into merge conflicts |
| 12 | - Dirty repos that never get committed |
| 13 | - Issues and PRs that pile up across repositories |
| 14 | - No coordination for AI agents working across repos |
| 15 | |
| 16 | ## Critical Concepts |
| 17 | |
| 18 | ### Git Plumbing, Not Porcelain |
| 19 | |
| 20 | RU uses git plumbing commands exclusively—never parses human-readable output: |
| 21 | |
| 22 | ```bash |
| 23 | # WRONG: Locale-dependent, version-fragile |
| 24 | git pull 2>&1 | grep "Already up to date" |
| 25 | |
| 26 | # RIGHT: Machine-readable plumbing |
| 27 | git rev-list --left-right --count HEAD...@{u} |
| 28 | git status --porcelain |
| 29 | git rev-parse HEAD |
| 30 | ``` |
| 31 | |
| 32 | ### Stream Separation |
| 33 | |
| 34 | Human-readable output goes to stderr; data to stdout: |
| 35 | |
| 36 | ```bash |
| 37 | ru sync --json 2>/dev/null | jq '.summary' |
| 38 | # Progress shows in terminal, JSON pipes to jq |
| 39 | ``` |
| 40 | |
| 41 | ### No Global `cd` |
| 42 | |
| 43 | All git operations use `git -C`. Never changes working directory. |
| 44 | |
| 45 | ## Essential Commands |
| 46 | |
| 47 | ### Sync (Primary Use Case) |
| 48 | |
| 49 | ```bash |
| 50 | # Sync all configured repos |
| 51 | ru sync |
| 52 | |
| 53 | # Parallel sync (much faster) |
| 54 | ru sync -j8 |
| 55 | |
| 56 | # Dry run - see what would happen |
| 57 | ru sync --dry-run |
| 58 | |
| 59 | # Resume interrupted sync |
| 60 | ru sync --resume |
| 61 | |
| 62 | # JSON output for scripting |
| 63 | ru sync --json 2>/dev/null | jq '.summary' |
| 64 | ``` |
| 65 | |
| 66 | ### Status (Read-Only Check) |
| 67 | |
| 68 | ```bash |
| 69 | # Check all repos without modifying |
| 70 | ru status |
| 71 | |
| 72 | # JSON output |
| 73 | ru status --json |
| 74 | ``` |
| 75 | |
| 76 | ### Repo Management |
| 77 | |
| 78 | ```bash |
| 79 | # Initialize configuration |
| 80 | ru init |
| 81 | |
| 82 | # Add repos to sync list |
| 83 | ru add owner/repo |
| 84 | ru add https://github.com/owner/repo |
| 85 | ru add owner/repo@branch as custom-name |
| 86 | |
| 87 | # Remove from list |
| 88 | ru remove owner/repo |
| 89 | |
| 90 | # List configured repos |
| 91 | ru list |
| 92 | |
| 93 | # Detect orphaned repos (in projects dir but not in list) |
| 94 | ru prune # Preview |
| 95 | ru prune --delete # Actually remove |
| 96 | ru prune --archive # Move to archive directory |
| 97 | ``` |
| 98 | |
| 99 | ### Diagnostics |
| 100 | |
| 101 | ```bash |
| 102 | ru doctor # System health check |
| 103 | ru self-update # Update ru itself |
| 104 | ``` |
| 105 | |
| 106 | ## AI-Assisted Review System |
| 107 | |
| 108 | RU includes a powerful review orchestration system for managing AI-assisted code review across your repositories. |
| 109 | |
| 110 | ### Two-Phase Review Workflow |
| 111 | |
| 112 | **Phase 1: Discovery (`--plan`)** |
| 113 | - Queries GitHub for open issues and PRs across all repos |
| 114 | - Scores items by priority using label analysis and age |
| 115 | - Creates isolated git worktrees for safe review |
| 116 | - Spawns Claude Code sessions in terminal multiplexer |
| 117 | |
| 118 | **Phase 2: Application (`--apply`)** |
| 119 | - Reviews proposed changes from discovery phase |
| 120 | - Runs quality gates (ShellCheck, tests, lint) |
| 121 | - Optionally pushes approved changes (`--push`) |
| 122 | |
| 123 | ```bash |
| 124 | # Discover and plan reviews |
| 125 | ru review --plan |
| 126 | |
| 127 | # After reviewing AI suggestions |
| 128 | ru review --apply --push |
| 129 | ``` |
| 130 | |
| 131 | ### Priority Scoring Algorithm |
| 132 | |
| 133 | | Factor | Points | Logic | |
| 134 | |--------|--------|-------| |
| 135 | | **Type** | 0-20 | PRs: +20, Issues: +10, Draft PRs: -15 | |
| 136 | | **Labels** | 0-50 | security/critical: +50, bug/urgent: +30 | |
| 137 | | **Age (bugs)** | 0-50 | >60 days: +50, >30 days: +30 | |
| 138 | | **Recency** | 0-15 | Updated <3 days: +15, <7 days: +10 | |
| 139 | | **Staleness** | -20 | Recently reviewed: -20 | |
| 140 | |
| 141 | Priority levels: CRITICAL (≥150), HIGH (≥100), NORMAL (≥50), LOW (<50) |
| 142 | |
| 143 | ### Session Drivers |
| 144 | |
| 145 | | Driver | Description | Best For | |
| 146 | |--------|-------------|----------| |
| 147 | | `auto` | Auto-detect best available | Default | |
| 148 | | `ntm` | Named Tmux Manager integration | Multi-agent workflows | |
| 149 | | `local` | Direct tmux sessions | Simple setups | |
| 150 | |
| 151 | ```bash |
| 152 | ru review --mode=ntm --plan |
| 153 | ru review -j 4 --plan # Parallel sessions |
| 154 | ``` |
| 155 | |
| 156 | ### Cost Budgets |
| 157 | |
| 158 | ```bash |
| 159 | ru review --max-repos=10 --plan |
| 160 | ru review --max-runtime=30 --plan # Minutes |
| 161 | ru review --skip-days=14 --plan # Skip recently reviewed |
| 162 | ru review --analytics # View past review stats |
| 163 | ``` |
| 164 | |
| 165 | ## Agent Sweep (Automated Dirty Repo Processing) |
| 166 | |
| 167 | The `ru agent-sweep` command orchestrates AI coding agents to automatically process repositories with uncommitted changes. |
| 168 | |
| 169 | ### Basic Usage |
| 170 | |
| 171 | ```bash |
| 172 | # Process all repos with uncommitted changes |
| 173 | ru agent-sweep |
| 174 | |
| 175 | # Dry run - preview what would be processed |
| 176 | ru agent-sweep --dry-run |
| 177 | |
| 178 | # Process 4 repos in parallel |
| 179 | ru agent-sweep -j4 |
| 180 | |
| 181 | # Filter to specific repos |
| 182 | ru agent-sweep --repos="myproject*" |
| 183 | |
| 184 | # Include release step after commit |
| 185 | ru agent-sweep --with-release |
| 186 | |
| 187 | # Resume interrupted sweep |
| 188 | ru agent-sweep --resume |
| 189 | |
| 190 | # Start fresh |
| 191 | ru agent-sweep |