# GIT Delegation

将所有 git 操作委托给 Manager 执行。Worker 无法直接访问 git credentials，因此任何需要认证的 git...

- 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 -g -a claude-code -y`
Codex: `npx skills add agentscope-ai/AgentTeams --skill git-delegation -g -a codex -y`
Cursor: `npx skills add agentscope-ai/AgentTeams --skill git-delegation -g -a cursor -y`
Gemini CLI: `npx skills add agentscope-ai/AgentTeams --skill git-delegation -g -a gemini-cli -y`

## Description

将所有 git 操作委托给 Manager 执行。Worker 无法直接访问 git credentials，因此任何需要认证的 git 操作（clone、push、fetch 等）都需要通过此机制委托给 Manager。

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

# Git Delegation

This skill allows you to delegate **any git operation** to the Manager. Since Workers don't have access to git credentials, all git commands that require authentication must be delegated.

## What Can Be Delegated

**Any git command**, including but not limited to:

- `git clone` - Clone repositories
- `git fetch` / `git pull` - Fetch/pull from remote
- `git push` - Push to remote
- `git checkout` / `git switch` - Switch branches
- `git branch` - Manage branches
- `git add` / `git commit` - Stage and commit
- `git merge` - Merge branches
- `git rebase` - Rebase commits (including interactive)
- `git cherry-pick` - Cherry-pick commits
- `git reset` / `git revert` - Undo changes
- `git stash` - Stash changes
- `git tag` - Manage tags
- `git submodule` - Manage submodules
- And any other git command...

**If git can do it, you can delegate it.**

---

## When to Use This Skill vs github-operations

| Task | Use git-delegation | Use github-operations |
|------|-------------------|----------------------|
| Clone repository | ✅ | |
| Pull/fetch changes | ✅ | |
| Read/write files | ✅ | |
| Create/switch branches | ✅ | |
| Commit/push code | ✅ | |
| Rebase/cherry-pick | ✅ | |
| Manage tags | ✅ | |
| Create PR | | ✅ |
| Review/merge PR | | ✅ |
| Comment on PR | | ✅ |
| Create/update Issue | | ✅ |

---

## Message Format

Send a `git-request:` message to the Manager.

**First, get your actual Matrix domain:**
```bash
echo $AGENTTEAMS_MATRIX_DOMAIN
# e.g.: matrix-local.agentteams.io:18080
```

Then send (substitute the real domain, do NOT write `$AGENTTEAMS_MATRIX_DOMAIN` literally):

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