agent-coordination
How to dispatch, monitor, recover, and trust subagents and worktree-isolated peers safely in a repo other agents may also be touching.
Skill by xberg-io
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/xberg-io-agent-coordination
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/agent-coordination
What's inside
- Skill name
agent-coordination- Description
- How to dispatch, monitor, recover, and trust subagents and worktree-isolated peers safely in a repo other agents may also be touching. Use this skill whenever you spawn a subagent, check on one that has gone quiet, merge an agent's branch, act on a subagent's claimed diagnosis, or write a brief for another agent to execute.
- License
- MIT
- Instructions
- 129 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- name: missing
Files (2)
- SKILL.md
- index.md
SKILL.md (first lines)
# Agent Coordination Multi-agent work in a shared repo fails in specific, recurring ways. Each one below has cost real work; the fix is procedural, not a matter of being more careful. ## Who compiles, and how agents stay out of each other's way The split (subagents edit and run static checks, the orchestrator integrates, compiles and tests; disjoint worktrees; implement-review-adjust rounds) is the agent-workflow rule. The reason it is strict: concurrent compiles fill the disk, contend for a shared target directory and reuse each other's half-edited artifacts, and a subagent's green build proves little about the integrated result. A subagent dispatched for build or test work gets its own target directory. ## Worktrees: the polyrepo task, never the harness's Every worktree lives at `<polyrepo root>/.worktrees/<repo>/<name>` (the layout is in the polyrepo-structure context). Create it before dispatch, from the root, with `mise run worktree:add <repo> <branch> [--base <ref>]`, name its absolute path in the brief, and remove it after the merge with `mise run worktree:remove <repo> <branch>`. Do not use Claude Code's built-in worktrees: the EnterWorktree tool, `claude --worktree` and Agent `isolation: "worktree"` all create them under `.claude/worktrees/` inside the session's repo. They also fork the session's own repo, not the repo the agent is told to work on, so an agent sent to another repo edits that repo's shared checkout directly. Saying "you have your own worktree" in a prompt does not create one; outside the polyrepo, enforce one writer per repo by scheduling. ## Stash, checkout, reset, and clean are shared, not worktree-local The bans are in `safe-git-operations`; this is why they hold across worktrees and how to recover. The stash lives in the shared `.git`, so agents running stash/test/pop cycles in separate worktrees hand each other their uncommitted changes. To compare against a baseline, use `git show HEAD:<path>` or a scratch copy outside the repo. If a stash collision does happen, the files are not lost: they sit in the other worktree's stash list; read them from there and reapply, never try to "un-pop" a stash. Put the bans in every subagent brief explicitly; the agents that collided were each doing the locally sensible thing. Also shared: a `~/.cargo/bin/<tool>`-style install path, and — treat this as probabilistic, not guaranteed — the working tree itself. A sibling agent has been observed operating directly inside what looked like another agent's own isolated worktree. Before trusting a "clean baseline," check `git log` for commits you did not make. ## Rebase silently drops merge-conflict resolutions Edits made while resolving a merge conflict live only in the merge commit. `git rebase` (without `--rebase-merges`) discards merge commits, so those edits vanish with no warning and no conflict. Never let real work enter a merge commit — resolve the conflict, then commit the change separately. After any rebase, verify with a tree comparison against a tag or branch of the pre-rebase HEAD (`git diff <backup> HEAD --stat`), not by re-reading commit messages. ## `git cherry-pick --continue` (and `rebase`/`merge --continue`) can hang If `--continue` blocks indefinitely regardless of `GIT_EDITOR`/`core.editor` overrides in this environment, resolve conflicts by staging the files, confirming the sequencer state file exists (`git rev-parse --git-dir`), then running a plain `git commit -m "<subject>"` directly — that completes the operation without invoking the editor. Interactive flags (`-i`) may be unavailable entirely; cherry-pick the commits you want onto a new base instead of trying to drop commits during a rebase. ## After a bulk delete, verify per path `safe-git-operations` forbids deleting by ignore status or directory name. If a bulk delete has run, check every tracked path rather than trusting `git status`, and preview future deletes with `-print` before `rm -rf`: ```bash git ls-files | while read -r f; do [ -e "$f" ] || echo "MISSING: $f"; done ``` ## A sibling agent can write into a shared main tree A peer reached through cross-session messaging, not spawned by you, can edit the same main working tree you are releasing from or relying on as a baseline — worktree isolation only covers agents *you* spawn. Check `git status --porcelain` before every merge and before every tag; foreign dirt is not hypothetical. If you find it: preserve first (`git diff > rescue.patch` plus byte copies), tell the peer explicitly where their work is safe, then reconcile — never `stash`/`checkout --` /`reset`/`clean` over it. Publish a file-ownership map (locked/free by path) early when multiple agents may touch the same repo. ## A parked agent is never automatically resumed An agent that ends its turn to "wait for a background run" strands finished, uncommitted work that nobody reads — a stopped subagent is not resumed on its own. An in-prompt warning against backgrounding does not reliably prevent this. Brief every agent to **commit as soon as each piece works**, before running tests, not at the end — a commit costs seconds and is the only thing that survives a hard failure (a worktree agent that dies loses everything uncommitted). When to skip hooks with `--no-verify` is in `commit-procedure`. Brief long-running verification as narrow, scoped commands run in the foreground with a generous timeout, not a full sweep — the coordinator runs the full sweep after merging. When checking on an agent, inspect the worktree **before** reading its summary: `git log --oneline <default>..HEAD` (`<default>`: the branch `git symbolic-ref --short refs/remotes/origin/HEAD` names, not always `main`) plus `git status --porcelain`. A parked agent shows uncommitted files and zero commits; recover by naming its exact dirty files, giving one narrow next command, saying explicitly "do not open a new line of investigation," and confirming `<default>` has moved so it must not rebase or merge itself. ## An agent's branch is not always the notification's branch The branch name surfaced in a completion notification can differ from the branch the agent actually committed to. Merging the notification's name can print "already up to date" and merge nothing — indistinguishable from real success. After merging any agent branch, prove it landed: `git merge-base --is-ancestor <sha> <default> && echo MERGED`. A second cause of the same false "already up to date": the merge command ran from inside the agent's own worktree because a prior backgrounded command silently moved the shell's working directory — check `git rev-parse --show-toplevel` before merging. Re-run the project's real lint/build gate after merging, too; a fast linter and the CI-authoritative one can disagree. ## Verify a subagent's claim before acting on it Re-run a subagent's tests yourself before trusting its diagnosis, and rebuild first — a stale build can make a passing test look like a failure. Check whether the claimed root cause survives one cheap empirical probe. When an agent blames "someone else's uncommitted work," check the blame before accepting it. "I ran the tool" is not the same claim as "I fed it the real artifact" — confirm exactly what was tested, not just that a command executed. ## Verify your own premise before it goes in a brief A detailed brief propagates the coordinator's own errors at full confidence, and a compliant agent will act on them without question. Before a factual claim goes into a brief, run the command that would falsify it — a listing tool can lie about what's tracked, a remembered commit subject can
From xberg-io/agent-conventions, MIT.
More from xberg-io/agent-conventions
- 0.564score
feature-flag-conventions
xberg-io
The shared Cargo feature-flag naming and semantics contract across xberg-io Rust libraries — the same flag names mean the same thing everywhere (otel…
SkillAFreshness: A★ 8Claude Code +9 - 0.564score
release-workflow
xberg-io
Release/publish a Rust core crate or CLI in an xberg-io polyglot repo (crawlberg, html-to-markdown, xberg, tree-sitter-language-pack, liter-llm).
SkillAFreshness: A★ 8Claude Code +9 - 0.564score
tracing-conventions
xberg-io
The canonical contract for tracing as a first-class product observability surface across xberg-io Rust libraries and services — level semantics, span/field…
SkillAFreshness: A★ 8Claude Code +9 - 0.564score
xberg-brand-and-docs
xberg-io
Canonical xberg.io brand, product catalog, docs-site (Astro Starlight + @xberg-io/docs-theme), alef badge, docs task commands, prose style, Google Analytics…
SkillAFreshness: A★ 8Claude Code +9 - 0.564score
consumer-release-gates
xberg-io
Reproduce an alef-generated consumer repo's release gate locally before cutting a release, and verify published package names against the real manifest rather…
SkillAFreshness: A★ 8Claude Code +9 - 0.564score
binding-architecture
xberg-io
Architecture rules for the polyglot binding layer and the C FFI boundary — crate naming, distribution paths, ownership and null-safety invariants…
SkillAFreshness: A★ 8Claude Code +9 - 0.561score
quick-start
xberg-io
Developer quick-start for xberg-io repos — prerequisites, initial setup, and the core build/test/lint workflow.
SkillAFreshness: A★ 8Claude Code +9 - 0.561score
basemind-tools
xberg-io
How to use basemind's MCP tools and CLI for structural and historical code questions instead of grep, file reads, and naked git.
SkillAFreshness: A★ 8Claude Code +9 - 0.561score
taskfile-structure
xberg-io
Standard Taskfile conventions across xberg-io repos — task discovery, common and language-scoped tasks, build profiles, the alef and e2e task families…
SkillAFreshness: A★ 8Claude Code +9 - 0.561score
poly-lint-format
xberg-io
Reference for poly, the single-binary multi-language linter and formatter — per-language engines, the lint/fmt commands, poly.toml configuration, severity…
SkillAFreshness: A★ 8Claude Code +9 - 0.561score
create-e2e-fixture
xberg-io
How to author a new e2e test fixture for cross-language test generation — fixture fields, assertion types, and id conventions.
SkillAFreshness: A★ 8Claude Code +9 - 0.560score
scoop-distribution
xberg-io
Maintain the Windows Scoop release channel: the per-repo manifest template and config, the publish-scoop-manifest job, and the shared xberg-io/scoop-bucket.
SkillAFreshness: A★ 8Claude Code +9
Signals
- Stars
- 8
- Forks
- 2
- Open issues
- 0
- Last commit (this folder)
- Oct 14, 2026 (16 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/xberg-io/agent-conventions
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from xberg-io
- 0.769score
feature-flag-policy
xberg-io
Cargo feature flags for crates/xberg — ORT-incompatible targets (WASM, Android x86_64 emulator), type-only and tract inference companion features…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
crate-structure
xberg-io
The Xberg workspace layout — the version source of truth (root Cargo.toml [workspace.package] version), the 19 workspace members and 3 excluded crates, the…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
config-loading-precedence
xberg-io
How Xberg resolves configuration — CLI-mode and server/MCP-mode precedence orders, project config walk-up, user config fallback, field-level inline JSON merge…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
alef-generated-bindings
xberg-io
Alef-managed generated bindings in packages/* and binding crates — the regeneration workflow (task alef:generate / alef:verify), the alef.toml section layout…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
wasm-constraints
xberg-io
WASM build constraints for the crates/xberg-wasm crate — the wasm-target feature set, no-tokio sync-only internal APIs, the crate-private SyncExtractor trait…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
mime-detection-routing
xberg-io
MIME type detection and extractor routing in core/mime.rs — the FORMATS registry that EXT_TO_MIME and SUPPORTED_MIME_TYPES are derived from, the path-based…
SkillAFreshness: A★ 9.4KClaude Code +9
Cite this page
agent-coordination skill. Agent Mart. https://agentmart.dev/skills/xberg-io-agent-coordination (last updated 2026-10-24)