metagit-agent-coordination
Isolate concurrent agents with RFC-0007 ACL primitives: allocate agent/* branches, acquire branch leases, create exclusive git worktrees, and declare advisory…
Skill by metagit-ai
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/metagit-ai-metagit-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: 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 and code. Checked Oct 26, 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/metagit-agent-coordination
What's inside
- Skill name
metagit-agent-coordination- Description
- Isolate concurrent agents with RFC-0007 ACL primitives: allocate agent/* branches, acquire branch leases, create exclusive git worktrees, and declare advisory file claims. Use when launching multiple agents, avoiding shared checkouts, preventing branch collisions, or coordinating file ownership before coding. Distinct from handoff claim TTL leases.
- License
- MIT
- Metadata
- internal: true
- Instructions
- 144 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Metagit Agent Coordination Layer (ACL)
Use when **more than one agent** may edit the same repository, or when an
orchestrator must give each agent an exclusive checkout.
Full reference: [docs/reference/agent-coordination.md](../../../../docs/reference/agent-coordination.md)
<!-- modality:acl_branch -->
<!-- modality:acl_lease -->
<!-- modality:acl_worktree -->
<!-- modality:acl_claim -->
<!-- modality:acl_manifest -->
<!-- modality:task_graph -->
<!-- modality:semantic_ownership -->
<!-- modality:merge_orchestrator -->
<!-- modality:agent_scheduler -->
<!-- modality:aos_status -->
Task graphs (`metagit task …`) can store ACL command hints on nodes via
`metagit task bind-acl` without running git — see
[docs/reference/task-graph.md](../../../../docs/reference/task-graph.md).
Merge orchestration (`metagit merge …`) records conflicts with ACL command
hints only; it does not allocate branches or worktrees automatically.
The agent scheduler (`metagit schedule next`) scores ready task nodes and
returns dispatch hints without launching models or mutating git — see
[docs/reference/agent-scheduler.md](../../../../docs/reference/agent-scheduler.md).
For a composed operator snapshot and next-work envelope across ACL + task
graph + optional 0009–0012, use skill **`metagit-aos`**
(`metagit aos|coord status|doctor|next`) — see
[docs/reference/aos.md](../../../../docs/reference/aos.md).
## When to use
- Dispatching parallel subagents on the same repo
- `handoff.acl_commands` appears in `metagit agent dispatch-plan`
- Preventing two agents from sharing a working directory
- Declaring intended file paths before coding (advisory claims)
- Cleaning up expired leases / orphan worktrees
## Do not confuse with handoff leases
| Concept | Command | Owns |
|---------|---------|------|
| **Handoff claim TTL** | `metagit context handoff claim --ttl` | Task-queue row |
| **ACL branch lease** | `metagit lease acquire` | `agent/*` branch |
## Happy path
```bash
export METAGIT_AGENT_MODE=true
# 1. Allocate an exclusive agent branch
metagit branch allocate \
--repository project/repo \
--agent-id agent-1 \
--task-id 412 \
--description auth \
--json
# 2. Lease it (default TTL 30m; renew while working)
metagit lease acquire \
--repository project/repo \
--agent-id agent-1 \
--task-id 412 \
--allocate \
--ttl 30m \
--json
# 3. Create an isolated worktree (requires active lease)
metagit worktree create \
--repository project/repo \
--agent-id agent-1 \
--task-id 412 \
--branch agent/412-auth \
--json
# 4. Optional: advisory file claims before editing
metagit claim declare \
--repository project/repo \
--agent-id agent-1 \
--pattern 'src/auth/*' \
--json
# 5. Show execution manifest written on create
metagit worktree manifest agent-1
```
Or allocate + lease in one step with `--allocate` on `lease acquire`.
## Paths
- **Metadata:** `.metagit/{branches,leases,worktrees,claims,agents,events}/` under the manifest/session root
- **Checkouts:** `<session-root>/<worktrees_path>/<agent-id>/<project>/<repo>/`
- Default `worktrees_path`: `.worktrees`
- Appconfig: `workspace.worktrees_path`
- Env: `METAGIT_WORKSPACE_WORKTREES_PATH`
- Path basenames (e.g. `worktrees`, `.worktrees`, `campaigns`, `_campaigns`) are **reserved** and cannot be workspace project names
## MCP tools (ACTIVE gate)
| Area | Tools |
|------|-------|
| Branch | `metagit_branch_allocate`, `metagit_branch_list`, `metagit_branch_release` |
| Lease | `metagit_lease_acquire`, `metagit_lease_renew`, `metagit_lease_release`, `metagit_lease_list` |
| Worktree | `metagit_worktree_create`, `metagit_worktree_destroy`, `metagit_worktree_status`, `metagit_worktree_list` |
| Claim | `metagit_claim_declare`, `metagit_claim_check`, `metagit_claim_list`, `metagit_claim_release` |
Events appear in `metagit context events` / `metagit_events` with `source=acl`.
## Conflict handling
- **Branch already allocated** — choose a different `task-id` / description, or wait for release
- **Lease held by another agent** — wait, renew is owner-only; do not force unless authorized
- **Claim overlap** — advisory; response includes `owner` + overlapping patterns; subdivide, wait, or override with `--strict` off (default allows declare with conflict event)
- **Worktree already exists for agent+repo** — destroy/gc first; one active worktree per `(agent_id, repository)`
## CleanupFrom metagit-ai/metagit-cli, MIT.
More from metagit-ai/metagit-cli
- 0.614score
metagit-agent-access
metagit-ai
Optimize any repository for minimal-token agent onboarding — llms.txt, AGENTS.md, hidden HTML agent blocks, docs/agents.md.
SkillAFreshness: A★ 4Claude Code +9 - 0.611score
metagit-bootstrap
metagit-ai
Create or refine a local .metagit.yml.
SkillAFreshness: A★ 4Claude Code +9 - 0.609score
metagit-aos
metagit-ai
Compose ACL, task graph, scheduler, merge, and related coordination subsystems via metagit aos|coord status|doctor|next.
SkillAFreshness: A★ 4Claude Code +9 - 0.609score
metagit-config-refresh
metagit-ai
Refresh or bootstrap `.metagit.yml` using deterministic init/validate.
SkillAFreshness: A★ 4Claude Code +9 - 0.606score
metagit-campaign
metagit-ai
Plan and track cross-project multi-repo campaigns — YAML overlays, repo rollups, objective fan-out, and MR status.
SkillAFreshness: A★ 4Claude Code +9 - 0.597score
metagit-cli
metagit-ai
CLI-only shortcuts for metagit agents — workspace catalog, discovery, prompts, sync, layout, and config.
SkillAFreshness: A★ 4Claude Code +9
Signals
- Stars
- 4
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jul 10, 2026 (3 months ago)
- Last release
- Oct 2, 2026 (27 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/metagit-ai/metagit-cli
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from metagit-ai
- 0.614score
metagit-agent-access
metagit-ai
Optimize any repository for minimal-token agent onboarding — llms.txt, AGENTS.md, hidden HTML agent blocks, docs/agents.md.
SkillAFreshness: A★ 4Claude Code +9 - 0.611score
metagit-bootstrap
metagit-ai
Create or refine a local .metagit.yml.
SkillAFreshness: A★ 4Claude Code +9 - 0.609score
metagit-aos
metagit-ai
Compose ACL, task graph, scheduler, merge, and related coordination subsystems via metagit aos|coord status|doctor|next.
SkillAFreshness: A★ 4Claude Code +9 - 0.609score
metagit-config-refresh
metagit-ai
Refresh or bootstrap `.metagit.yml` using deterministic init/validate.
SkillAFreshness: A★ 4Claude Code +9 - 0.606score
metagit-campaign
metagit-ai
Plan and track cross-project multi-repo campaigns — YAML overlays, repo rollups, objective fan-out, and MR status.
SkillAFreshness: A★ 4Claude Code +9 - 0.597score
metagit-cli
metagit-ai
CLI-only shortcuts for metagit agents — workspace catalog, discovery, prompts, sync, layout, and config.
SkillAFreshness: A★ 4Claude Code +9
Cite this page
metagit-agent-coordination skill. Agent Mart. https://agentmart.dev/skills/metagit-ai-metagit-agent-coordination (last updated 2026-10-24)