Install
openclaw skills install agent-swarm-orchestratorClawHub Security found sensitive or high-impact capabilities. Review the scan results before using.
Orchestrate OpenClaw Agent Swarm workflows for multi-project coding automation with Obsidian task intake, Claude coding, Codex review, GitLab MR flow, merge+sync, and done-status closure.
openclaw skills install agent-swarm-orchestratorMulti-project coding automation: Obsidian task intake → Claude Code → Codex review → GitLab MR → merge + sync.
Obsidian note (status: ready)
→ scan-obsidian.sh (cron 5min)
→ spawn-agent.sh
├── git worktree + branch
├── prompt file (task + context.md)
└── tmux session → run-agent.sh
├── claude -p "$PROMPT" | tee log
└── review-and-push.sh
├── codex review (graded)
├── push + glab mr create --yes
└── notification → Telegram
merge-and-sync.sh (manual trigger)
├── glab mr merge <iid>
├── sync-project-main.sh (fast-forward local main)
└── check-agents.sh (background) → mark done + send notification
check-agents.sh (cron 3min / called by merge-and-sync)
├── dead tmux + commits → trigger review
├── >60min → timeout notification
└── MR merged → mark done in tasks.json + .notification → Telegram
| Path | Purpose |
|---|---|
~/agent-swarm/ | Control plane (scripts, registry, tasks) |
~/agent-swarm/registry.json | Project configs (repo, paths, branch) |
~/agent-swarm/tasks.json | Task state machine |
~/GitLab/repos/ | Local repos |
~/GitLab/worktrees/ | Per-task worktrees |
~/Documents/Obsidian Vault/agent-swarm/ | Task intake notes |
| Script | Purpose |
|---|---|
spawn-agent.sh | Create worktree + prompt + tmux → run-agent |
run-agent.sh | claude -p → check commits → trigger review |
review-and-push.sh | Codex review → graded fix → push → MR |
check-agents.sh | Cron + post-merge: detect done/stuck, mark done, send notification |
scan-obsidian.sh | Parse Obsidian notes, spawn status: ready tasks |
send-notifications.sh | Send .notification files via OpenClaw CLI |
merge-and-sync.sh | Merge MR + sync local main |
sync-project-main.sh | Fast-forward local repo to origin/main |
new-project.sh | Initialize project (GitLab + registry + context + Obsidian) |
cleanup.sh | Daily archive old tasks, clean worktrees/logs |
~/agent-swarm/scripts/spawn-agent.sh <project> "<task description>"
tmux attach -t agent-<task-id> # live output
tail -f ~/agent-swarm/logs/<task-id>.log # log file
~/agent-swarm/scripts/merge-and-sync.sh <project> <mr-iid>
~/agent-swarm/scripts/new-project.sh <project-name>
starting → running → [no-output | reviewing]
reviewing → [ready_to_merge | review-error | needs-manual-fix | fixing]
fixing → reviewing (retry, max 2)
ready_to_merge → done (auto on MR merged)
~/.claude.json oauthAccount)~/.claude/settings.json: skipDangerousModePermissionPrompt: true~/.claude.json projects: trust ~/GitLab/worktrees and ~/GitLab/repos (hasTrustDialogAccepted: true)ANTHROPIC_* env vars leaking into tmux (causes proxy conflicts)claude CLI (Claude Code)codex CLI (OpenAI Codex, for review)glab CLI (GitLab)jq, python3, tmuxPATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
*/3 * * * * ~/agent-swarm/scripts/check-agents.sh
*/5 * * * * ~/agent-swarm/scripts/scan-obsidian.sh
0 3 * * * ~/agent-swarm/scripts/cleanup.sh
Configure in ~/agent-swarm/registry.json:
{
"notifyMethod": "openclaw",
"notifyChannel": "telegram",
"notifyTarget": "<chat_id>"
}
swarm_notify() in config.sh reads these values and calls:
openclaw message send --channel telegram --target <chat_id> --message "..."
⚠️ Do NOT use >/dev/null 2>&1 in swarm_notify — errors must be visible so failed sends are not silently marked as sent.
Each task gets a prompt file with:
context.md)status: active | stop controls project scanning### Task Name + status: ready + > description### INIT_PROJECT + status: ready triggers new-project.sh-p mode, auto-exit)codex exec review)needs-manual-fixmkdir -p ~/agent-swarm/{scripts,logs,projects}
cp -f <skill_dir>/scripts/*.sh ~/agent-swarm/scripts/
chmod +x ~/agent-swarm/scripts/*.sh
echo '{"projects":{}}' > ~/agent-swarm/registry.json
echo '{"tasks":[]}' > ~/agent-swarm/tasks.json
Then: register projects in registry.json, set cron, configure notifications.
When a user message matches one of these intents, take the corresponding action immediately without asking for confirmation:
| User says | Context | Action |
|---|---|---|
| "合并" / "merge" / "merge it" | Replied to a PR_READY notification | Extract <project> and <mr-iid> from the notification, run merge-and-sync.sh <project> <mr-iid> |
| "起任务" / "spawn" / "新任务" | With a task description | Run spawn-agent.sh <project> "<desc>" |
| "查状态" / "check status" | Any | Run check-agents.sh and summarize output |
| "新项目" / "new project" | With a project name | Run new-project.sh <project-name> |
PR_READY notifications follow this format:
✅ PR_READY
Project: <project>
Task: <desc>
Task ID: <task-id>
Branch: <branch>
MR: https://gitlab.com/.../-/merge_requests/<mr-iid> | Review ...
Extract Project → <project>, and the number at the end of the MR URL → <mr-iid>.
When a user reports an issue or requests a change to project code:
The coding agent runs in a full worktree with complete project context — it is better positioned to read code, diagnose issues, and implement fixes than you are from a chat session.
done, ready_to_merge, review-error, needs-manual-fix