Markdown Converter
Agent skill for markdown-converter
Repo Updater - Multi-repo synchronization with AI-assisted review orchestration. Parallel sync, agent-sweep for dirty repos, ntm integration, git plumbing. 17K LOC Bash CLI.
Sign in to like and favorite skills
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.
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.
The problem it solves:
cd ~/project && git pull for each repoRU uses git plumbing commands exclusively—never parses human-readable output:
# WRONG: Locale-dependent, version-fragile git pull 2>&1 | grep "Already up to date" # RIGHT: Machine-readable plumbing git rev-list --left-right --count HEAD...@{u} git status --porcelain git rev-parse HEAD
Human-readable output goes to stderr; data to stdout:
ru sync --json 2>/dev/null | jq '.summary' # Progress shows in terminal, JSON pipes to jq
cdAll git operations use
git -C. Never changes working directory.
# Sync all configured repos ru sync # Parallel sync (much faster) ru sync -j8 # Dry run - see what would happen ru sync --dry-run # Resume interrupted sync ru sync --resume # JSON output for scripting ru sync --json 2>/dev/null | jq '.summary'
# Check all repos without modifying ru status # JSON output ru status --json
# Initialize configuration ru init # Add repos to sync list ru add owner/repo ru add https://github.com/owner/repo ru add owner/repo@branch as custom-name # Remove from list ru remove owner/repo # List configured repos ru list # Detect orphaned repos (in projects dir but not in list) ru prune # Preview ru prune --delete # Actually remove ru prune --archive # Move to archive directory
ru doctor # System health check ru self-update # Update ru itself
RU includes a powerful review orchestration system for managing AI-assisted code review across your repositories.
1. NEVER Stash User Changes
If repositories have uncommitted changes, NEVER use
. This risks losing user work. Stashed changes can be difficult to recover, especially untracked files which require git stash
git show stash@{0}^3:path to extract.
2. NEVER Modify Working Tree Without Permission Do not run
git checkout, git reset, git clean, or any command that modifies uncommitted changes without explicit user permission.
3. Commit Changes First (The Correct Approach) If repos have uncommitted changes and the user wants to proceed with review, commit the changes first with logical groupings and detailed messages, then push.
4. Let ru Skip Dirty Repos The
ru review command automatically skips repositories with uncommitted changes. This is correct behavior—let it skip them rather than forcing them clean.
Found uncommitted changes in repos? ├── User wants to proceed with ru review? │ ├── YES → Ask: "Should I commit these changes first?" │ │ ├── User says YES → Commit with logical groupings, push, then run ru review │ │ └── User says NO → Let ru skip those repos, review clean repos only │ └── NO → Stop, let user handle their changes └── No uncommitted changes → Run ru review normally
Phase 1: Discovery (
)--plan
Phase 2: Application (
)--apply
--push)# Discovery - see what issues/PRs exist ru review --dry-run # Plan mode - generate review plans, no mutations ru review --plan # After reviewing AI suggestions ru review --apply --push
| Factor | Points | Logic |
|---|---|---|
| Type | 0-20 | PRs: +20, Issues: +10, Draft PRs: -15 |
| Labels | 0-50 | security/critical: +50, bug/urgent: +30 |
| Age (bugs) | 0-50 | >60 days: +50, >30 days: +30 |
| Recency | 0-15 | Updated <3 days: +15, <7 days: +10 |
| Staleness | -20 | Recently reviewed: -20 |
Priority levels: CRITICAL (≥150), HIGH (≥100), NORMAL (≥50), LOW (<50)
| Driver | Description | Best For |
|---|---|---|
| Auto-detect best available | Default |
| Named Tmux Manager integration | Multi-agent workflows |
| Direct tmux sessions | Simple setups |
ru review --mode=ntm --plan ru review --mode=local --plan # Use if ntm has issues ru review -j 4 --plan # Parallel sessions
ru review --max-repos=10 --plan # Limit repos ru review --max-runtime=30 --plan # Minutes budget ru review --skip-days=14 --plan # Skip recently reviewed ru review --repos=PATTERN --plan # Filter by regex ru review --analytics # View past review stats
The
ru review command includes this contribution policy in its prompts:
We don't allow PRs or outside contributions to this project as a matter of policy. Feel free to submit issues, and even PRs if you want to illustrate a proposed fix, but know I won't merge them directly. Instead, I'll have Claude or Codex review submissions via
and independently decide whether and how to address them.gh
Key principle: Independently verify and validate all user reports. Don't trust submitted fixes blindly—use them as inspiration but verify everything against actual code and documentation.
When multiple agents review repos simultaneously:
When reviewing issues and PRs:
git stash - NEVER stash user changesgit checkout -- . - NEVER discard changesgit reset --hard - NEVER reset working treegit clean -fd - NEVER clean untracked filesgh commands for bulk operations - use ru's orchestrationru review --dry-run to discover work items--mode=local if ntm has issuesIf someone accidentally stashed changes:
Tracked Files (Easy):
git stash pop # Restore tracked changes
Untracked Files (Harder):
# List untracked files in stash git show stash@{0}^3 --name-only # Extract a specific untracked file git show stash@{0}^3:path/to/file.rs > path/to/file.rs
If Stash Was Dropped:
# Find dangling stash commits git fsck --unreachable | grep commit # For each commit, check if it's your stash git show <commit-hash> # Recover if found git stash apply <commit-hash>
The
ru agent-sweep command orchestrates AI coding agents to automatically process repositories with uncommitted changes.
# Process all repos with uncommitted changes ru agent-sweep # Dry run - preview what would be processed ru agent-sweep --dry-run # Process 4 repos in parallel ru agent-sweep -j4 # Filter to specific repos ru agent-sweep --repos="myproject*" # Include release step after commit ru agent-sweep --with-release # Resume interrupted sweep ru agent-sweep --resume # Start fresh ru agent-sweep --restart
Phase 1: Planning (
--phase1-timeout, default 300s)
Phase 2: Commit (
--phase2-timeout, default 600s)
Phase 3: Release (
--phase3-timeout, default 300s, requires --with-release)
--execution-mode=agent # Full AI-driven workflow (default) --execution-mode=plan # Phase 1 only: generate plan, stop --execution-mode=apply # Phase 2+3: execute existing plan
Each repo is validated before spawning an agent:
| Check | Skip Reason |
|---|---|
| Is git repository | |
| Git email configured | |
| Not a shallow clone | |
| No rebase in progress | |
| No merge in progress | |
| Not detached HEAD | |
| Has upstream branch | |
| Not diverged | |
File Denylist - Never committed regardless of agent output:
| Category | Patterns |
|---|---|
| Secrets | , , , , |
| Build artifacts | , , , , |
| Logs/temp | , , , |
| IDE files | , , |
Secret Scanning:
--secret-scan=none # Disable --secret-scan=warn # Warn but continue (default) --secret-scan=block # Block push on detection
| Code | Meaning |
|---|---|
| All repos processed successfully |
| Some repos failed (agent error, timeout) |
| Quality gate failures (secrets, tests) |
| System error (ntm, tmux missing) |
| Invalid arguments |
| Interrupted (use ) |
~/.config/ru/ ├── config # Main config file └── repos.d/ ├── public.list # Public repos (one per line) └── private.list # Private repos (gitignored) ~/.local/state/ru/ ├── logs/ │ └── YYYY-MM-DD/ ├── agent-sweep/ │ ├── state.json │ └── results.ndjson └── review/ ├── digests/ └── results/
# ~/.config/ru/repos.d/public.list owner/repo another-owner/another-repo@develop private-org/repo@main as local-name https://github.com/owner/repo.git
| Layout | Example Path |
|---|---|
| |
| |
| |
ru config --set LAYOUT=owner-repo
# ~/.../your-repo/.ru-agent.yml agent_sweep: enabled: true max_file_size: 5242880 # 5MB extra_context: "This is a Python project using FastAPI" pre_hook: "make lint" post_hook: "make test" denylist_extra: - "*.backup" - "internal/*"
When ntm (Named Tmux Manager) is available, RU uses its robot mode API:
| Function | Purpose |
|---|---|
| Create Claude Code session in new tmux pane |
| Send prompts with chunking for long messages |
| Block until session completes with timeout |
| Query real-time session state |
| Get status of all managed sessions |
| Send Ctrl+C to interrupt long operations |
--json)ru sync --json 2>/dev/null
{ "version": "1.2.0", "timestamp": "2025-01-03T14:30:00Z", "summary": { "total": 47, "cloned": 8, "updated": 34, "current": 3, "conflicts": 2 }, "repos": [...] }
{"repo":"mcp_agent_mail","action":"pull","status":"updated","duration":2} {"repo":"beads_viewer","action":"clone","status":"cloned","duration":5}
# Get paths of all cloned repos ru sync --json 2>/dev/null | jq -r '.repos[] | select(.action=="clone") | .path' # Count by status cat ~/.local/state/ru/logs/latest/results.ndjson | jq -s 'group_by(.status) | map({status: .[0].status, count: length})'
ru sync # Default: ff-only (safest) ru sync --rebase # Rebase local commits ru sync --autostash # Auto-stash before pull ru sync --force # Force update (use with caution)
| Strategy | Behavior |
|---|---|
| Fast-forward only; fails if diverged |
| Rebase local commits on top of remote |
| Create merge commit if needed |
Before applying changes, RU runs automated quality gates:
Auto-detection by project type:
| Project Type | Test Command | Lint Command |
|---|---|---|
| npm/yarn | | |
| Cargo (Rust) | | |
| Go | | |
| Python | | |
| Makefile | | |
| Shell scripts | (none) | |
RU includes an adaptive parallelism governor:
| Condition | Action |
|---|---|
| GitHub remaining < 100 | Reduce parallelism to 1 |
| GitHub remaining < 500 | Reduce parallelism by 50% |
| Model 429 detected | Pause new sessions for 60s |
| Error rate > 50% | Open circuit breaker |
| Code | Meaning |
|---|---|
| Success - all repos synced or current |
| Partial failure - some repos failed |
| Conflicts exist |
| Dependency error (gh missing, auth failed) |
| Invalid arguments |
| Interrupted (use ) |
| Variable | Description | Default |
|---|---|---|
| Base directory for repos | |
| Path layout | |
| Parallel workers | |
| Network timeout (seconds) | |
| Pull strategy | |
| GitHub token | (from gh CLI) |
| Issue | Fix |
|---|---|
| |
| or set |
| Use or push first |
| Commit changes or use |
| |
# View latest run log cat ~/.local/state/ru/logs/latest/run.log # View specific repo log cat ~/.local/state/ru/logs/latest/repos/mcp_agent_mail.log # Run with verbose output ru agent-sweep --verbose --debug
# View why repos were skipped ru agent-sweep --json 2>/dev/null | jq '.repos[] | select(.status == "skipped")'
# One-liner curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/repo_updater/main/install.sh | bash # Verify ru doctor
mkdir (works on all POSIX systems)| Tool | Integration |
|---|---|
| Agent Mail | Notify agents when repos are updated; coordinate reviews |
| BV | Track repo sync as recurring beads |
| CASS | Search past sync sessions and agent-sweep logs |
| NTM | Robot mode API for session orchestration |
| DCG | RU runs inside DCG sandbox protection |