# GIT Delegation Management

Execute git operations on behalf of Workers who don't have git credentials.

- Repository: https://github.com/agentscope-ai/AgentTeams (5913 stars)
- Category: Git and review
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add agentscope-ai/AgentTeams --skill git-delegation-management -g -a claude-code -y`
Codex: `npx skills add agentscope-ai/AgentTeams --skill git-delegation-management -g -a codex -y`
Cursor: `npx skills add agentscope-ai/AgentTeams --skill git-delegation-management -g -a cursor -y`
Gemini CLI: `npx skills add agentscope-ai/AgentTeams --skill git-delegation-management -g -a gemini-cli -y`

## Description

Execute git operations on behalf of Workers who don't have git credentials. Use when a Worker sends a git-request: message to clone, push, pull, commit, rebase, or perform any git operation.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Git Delegation Management

This skill enables the Manager to execute **any git operation** on behalf of Workers. Workers cannot access git credentials, so they delegate all git operations to the Manager.

## Prerequisites

The Manager has access to:
- Host's `.gitconfig` via `/host-share/.gitconfig` (symlinked to `/root/.gitconfig`)
- Git credentials (SSH keys, credential helpers) configured on the host

This allows git operations to use the correct author name, email, and authentication.

---

## Handling `git-request:` Messages

When a Worker sends a message containing a **properly formatted** `git-request:` block (with `workspace:` and `operations:` fields), execute the requested operations.

```
task-{task-id} git-request:
workspace: /root/agentteams-fs/shared/tasks/{task-id}/workspace/{repo-name}
operations:
  - git clone https://github.com/org/repo.git
  - git checkout -b feature-auth
  - git add .
  - git commit -m "feat: add authentication"
  - git push origin feature-auth
---CONTEXT---
{description of what they're trying to accomplish}
---END---
```

**Extract:**
- `task-id`: Task identifier
- `workspace`: Path to work in (for clone: parent directory; for other ops: repo directory)
- `operations`: List of git commands to execute (literally what to run)
- `context`: (Optional) What the Worker is trying to accomplish

---

## Execution Flow

### 1. Sync and Check Processing Marker

```bash
task_id="task-YYYYMMDD-HHMMSS"
workspace="/root/agentteams-fs/shared/tasks/${task_id}/workspace/{repo-name}"

# Sync from MinIO
mc mirror "${AGENTTEAMS_STORAGE_PREFIX}/shared/tasks/${task_id}/" \
  "/root/agentteams-fs/shared/tasks/${task_id}/"

# Check for processing marker
bash /opt/agentteams/agent/skills/task-coordination/scripts/check-processing-marker.sh "$task_id"
if [ $? -ne 0 ]; then
    # Respond with git-failed: explaining the conflict
    exit 1
fi

The rest: https://github.com/agentscope-ai/AgentTeams/blob/HEAD/manager/agent/skills/git-delegation-management/SKILL.md
